diff sat_templates/templates/bulma/components/common.html @ 322:11ed664a309c

bulma (menu): show active menu
author Goffi <goffi@goffi.org>
date Thu, 29 Apr 2021 20:43:53 +0200
parents 6411615771b6
children b313a7d343af
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 %}