# HG changeset patch # User Goffi # Date 1587931567 -7200 # Node ID 739c3e6999fa9e42a70c3a99bc8c26c37834c2a7 # Parent 3195484abd827916aa0a2eb16c371fe7293a5402 base: `scripts` variable can be used to create suitable tags + new `body_onload` variable diff -r 3195484abd82 -r 739c3e6999fa sat_templates/templates/default/base/base.html --- a/sat_templates/templates/default/base/base.html Sun Apr 19 22:48:57 2020 +0200 +++ b/sat_templates/templates/default/base/base.html Sun Apr 26 22:06:07 2020 +0200 @@ -1,7 +1,7 @@ {# embedded is set to avoid including base.html several times if a generic page is included (e.g. blog/articles.html) #} {% set embedded = True %} {% 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('common', '') }} {# common.js is, as its name states, 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 #} @@ -63,6 +63,9 @@ {# FIXME: following ugly hack is temporarily needed for dom_update, until a proper way to handle gettext dynamicly is implemented #} {{ script.generate_scripts() }} + {% for script in scripts %} + {{script.content}} + {% endfor %} {% if websocket is defined %} {% endif %} @@ -71,7 +74,8 @@ {% endblock favicon %} - + + {% if atom_url is defined %} {{ icon_defs('feed') }} {% endif %}