Mercurial > libervia-templates
view sat_templates/templates/default/components/common.html @ 249:60bf3e45d7b2
bulma (input/field): don't use kwargs anymore:
`**kwargs` syntax is not supported by `nunjucks`. To work around this, most important
arguments have been added directly to macros, and an extra `attrs` argument can be used
for others.
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 16 Jul 2020 09:08:34 +0200 |
parents | 7539d98e1d08 |
children |
line wrap: on
line source
{% 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='') %} <nav class="menu {{class}}"> <ul> {% for name,url in menus %} <li><a class="menu_item menu_item--{{name}}" {{ {'href': url}|xmlattr }}>{{ml.label[name]}}</a></li> {% endfor %} </ul> {% if caller is defined %} {{ caller()}} {% endif %} </nav> {% endmacro %}