changeset 322:11ed664a309c

bulma (menu): show active menu
author Goffi <goffi@goffi.org>
date Thu, 29 Apr 2021 20:43:53 +0200 (2021-04-29)
parents c08fadf23c46
children 34b8de7be336
files sat_templates/templates/bulma/components/common.html
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat_templates/templates/bulma/components/common.html	Thu Apr 29 16:56:20 2021 +0200
+++ b/sat_templates/templates/bulma/components/common.html	Thu Apr 29 20:43:53 2021 +0200
@@ -16,7 +16,10 @@
         <div id="main_menu" class="navbar-menu">
             <div class="navbar-start">
             {% for name, url in menus %}
-                  <a class="navbar-item" {{ {'href': url}|xmlattr }}>
+                <a
+                    class="navbar-item {% if name == current_page %}is-tab is-active{% endif%}"
+                    {{ {'href': url}|xmlattr }}
+                >
                     {{ml.label[name] or name}}
                   </a>
             {% endfor %}