From 4a4ba06112dff08490099bcd857561677c84e8c0 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Wed, 19 Sep 2018 13:37:10 +0200 Subject: [PATCH] Use debian font-awesome Rather than going online, use fonts-font-awesome debian package. Also icons were updated to font-awesome 4.7.0 (in debian 9). --- apt_requirements.txt | 1 + logs/templates/logs/sidebar.html | 6 +-- re2o/settings.py | 1 + re2o/templatetags/design.py | 4 +- static/css/base.css | 7 ++++ templates/base.html | 62 ++++++++++++++++--------------- users/templates/users/profil.html | 6 +-- 7 files changed, 49 insertions(+), 38 deletions(-) diff --git a/apt_requirements.txt b/apt_requirements.txt index 46d4c752..8b8c67c4 100644 --- a/apt_requirements.txt +++ b/apt_requirements.txt @@ -14,4 +14,5 @@ libjs-jquery libjs-jquery-ui libjs-jquery-timepicker libjs-bootstrap +fonts-font-awesome graphviz diff --git a/logs/templates/logs/sidebar.html b/logs/templates/logs/sidebar.html index 87011cfc..d2ee3002 100644 --- a/logs/templates/logs/sidebar.html +++ b/logs/templates/logs/sidebar.html @@ -29,15 +29,15 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block sidebar %} {% can_view_app logs %} - + {% trans "Summary" %} - + {% trans "Events" %} - + {% trans "General" %} diff --git a/re2o/settings.py b/re2o/settings.py index 9dd52d1f..0a019d2d 100644 --- a/re2o/settings.py +++ b/re2o/settings.py @@ -174,6 +174,7 @@ BOOTSTRAP_BASE_URL = '/javascript/bootstrap/' # Use only absolute paths with '/' delimiters even on Windows STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static').replace('\\', '/'), + "/usr/share/fonts-font-awesome/", ) # Directory where the static files served by the server are stored STATIC_ROOT = os.path.join(BASE_DIR, 'static_files') diff --git a/re2o/templatetags/design.py b/re2o/templatetags/design.py index c64e9b40..9df37c30 100644 --- a/re2o/templatetags/design.py +++ b/re2o/templatetags/design.py @@ -31,9 +31,9 @@ def tick(valeur, autoescape=False): if isinstance(valeur,bool): if valeur == True: - result = '' + result = '' else: - result = '' + result = '' return mark_safe(result) else: # if the value is not a boolean, display it as if tick was not called diff --git a/static/css/base.css b/static/css/base.css index 168f6c81..393a7c20 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -13,6 +13,13 @@ footer p { margin-bottom: 0; } +/* Reserv space for icons and align */ +a > i.fa { + display: inline-block; + width: 26px; + text-align: center; +} + /* Reduce the padding for the logo in the navbar-brand so the 32px-high logo * is centered in the navbar */ .navbar-brand { diff --git a/templates/base.html b/templates/base.html index 81304ad8..d1306832 100644 --- a/templates/base.html +++ b/templates/base.html @@ -39,22 +39,15 @@ with this program; if not, write to the Free Software Foundation, Inc., - - + - {# Load CSS and JavaScript #} + {# Load CSS #} {% bootstrap_css %} - - + + + + - {% bootstrap_javascript %} - - - - - - - {{ name_website }} : {% block title %}{% trans "Home" %}{% endblock %} @@ -78,17 +71,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,