# HG changeset patch # User Goffi # Date 1616165486 -3600 # Node ID 6411615771b6836baa7afd013366056c4240484d # Parent c9396c3711e4d899f0e24b8c5c2886520a86d6c0 bulma (base): menu can now be fixed on top with `menu_fixed_top` bool variable diff -r c9396c3711e4 -r 6411615771b6 sat_templates/templates/bulma/base/base.html --- a/sat_templates/templates/bulma/base/base.html Fri Mar 19 15:49:51 2021 +0100 +++ b/sat_templates/templates/bulma/base/base.html Fri Mar 19 15:51:26 2021 +0100 @@ -1,4 +1,12 @@ - {# embedded is set to avoid including base.html several times if a generic page is included (e.g. blog/articles.html) #} +{# base template managing common layout, blocks, links or scripts + + except for special pages, this template should always be extended. + + @variable menu_fixed_top(bool): if true, the menu will always stay on top, and padding will be added to body accordingly. +#} + + +{# 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 states, a common script, so it's useful to import it here #} @@ -72,7 +80,7 @@ {% endblock favicon %} - + {% if atom_url is defined %} {{ icon_defs('feed') }} {% endif %} @@ -91,7 +99,7 @@ {% endif %} {% if main_menu %} {% block main_menu %} - {{ component.menu(main_menu, class="main_menu") }} + {{ component.menu(main_menu) }} {% endblock main_menu %} {% endif %} {% block body_wrapper %} diff -r c9396c3711e4 -r 6411615771b6 sat_templates/templates/bulma/components/common.html --- a/sat_templates/templates/bulma/components/common.html Fri Mar 19 15:49:51 2021 +0100 +++ b/sat_templates/templates/bulma/components/common.html Fri Mar 19 15:51:26 2021 +0100 @@ -1,8 +1,8 @@ {% import 'components/menu_labels.html' as ml with context %} {# we need to use "with context" to disable cache, needed for i18n #} -{% macro menu(menus, class='') %} -