diff sat_templates/templates/default/base/base.html @ 166:178f55b825b7

small refactoring/redesign, better BEM integration: - blog has been redesigned, and almost all blog CSS has been made generic and moved to main styles.css file. - better noscript handling, dynamic elements are created using "magic" classes (dom_update.js) - using better icons for older/newer messages - better state handling, classes now use "state_XXX" - more classes now use BEM convention - menu labels have been moved to a separate template (components/menu_labels.html), so it can be overriden easily by other sites - better styles.css organisation
author Goffi <goffi@goffi.org>
date Wed, 03 Oct 2018 21:00:24 +0200
parents 9e8d9d754337
children 240bbac435f4
line wrap: on
line diff
--- a/sat_templates/templates/default/base/base.html	Fri Sep 14 19:49:15 2018 +0200
+++ b/sat_templates/templates/default/base/base.html	Wed Oct 03 21:00:24 2018 +0200
@@ -1,6 +1,7 @@
 {% set embedded = True %} {# embedded is set to avoid including base.html several times if a generic page is included (e.g. blog/articles.html) #}
 {% import 'components/common.html' as component with context %}
 {{ script.include('common', '') }} {# common.js is, as its name state, a common script, so it's useful to import it here #}
+{{ script.include('dom_update') }} {# will check page for dom element to modify when javascript is enabled #}
 <!DOCTYPE html>
 <html>
 <head>
@@ -52,6 +53,8 @@
     {% if websocket is defined %}
         {{ script.include('websocket', '') }}
     {% endif %}
+    {# FIXME: following ugly hack is temporarily needed for dom_update, until a proper way to handle gettext dynamicly is implemented #}
+    <script>expand_txt="{% trans %}Click to expand…{% endtrans %}"; reduce_txt="{% trans %}Click to reduce…{% endtrans %}";</script>
     {{ script.generate_scripts() }}
     {% if websocket is defined %}
         <script>var socket=new WSHandler("{{websocket.url}}", "{{websocket.token}}", {{websocket.debug}});</script>
@@ -92,7 +95,7 @@
         {% block body %}
         {% endblock body %}
         </div>
-        <footer>{% block footer %}<span>{% trans app_name=C.APP_NAME %}Powered by {{app_name}}{% endtrans %}</span>{% endblock %}</footer>
+        <footer class="page__footer">{% block footer %}<span>{% trans app_name=C.APP_NAME %}Powered by {{app_name}}{% endtrans %}</span>{% endblock %}</footer>
     </main>
 </body>
 </html>