Mercurial > libervia-templates
annotate sat_templates/templates/bulma/components/common.html @ 238:0e4a2e0da438
bulma (components/common): fixed language dropdown
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 19 Jun 2020 17:57:13 +0200 |
parents | 0e69b5843c2f |
children | a18374320194 |
rev | line source |
---|---|
230 | 1 {% import 'components/menu_labels.html' as ml with context %} |
2 {# we need to use "with context" to disable cache, needed for i18n #} | |
3 | |
4 {% macro menu(menus, class='') %} | |
5 <nav class="navbar has-background-primary"> | |
6 <div class="navbar-brand"> | |
7 <a class="navbar-item" href="/"> | |
8 <img src="{{media_path}}icons/apps/64/sat.png"> | |
9 </a> | |
10 <a role="button" id="main_menu_burger" class="navbar-burger burger" data-target="main_menu"> | |
11 <span aria-hidden="true"></span> | |
12 <span aria-hidden="true"></span> | |
13 <span aria-hidden="true"></span> | |
14 </a> | |
15 </div> | |
16 <div id="main_menu" class="navbar-menu"> | |
17 <div class="navbar-start"> | |
18 {% for name, url in menus %} | |
19 <a class="navbar-item" {{ {'href': url}|xmlattr }}> | |
20 {{name}} | |
21 </a> | |
22 {% endfor %} | |
23 </div> | |
24 <div class="navbar-end"> | |
238
0e4a2e0da438
bulma (components/common): fixed language dropdown
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
25 <div class="navbar-item has-dropdown is-hoverable"> |
230 | 26 <span class="navbar-link">{{locale.language_name}}</span> |
27 <div class="navbar-dropdown"> | |
28 {% for l in locales|reject("eq", locale) %} | |
29 <a class="navbar-item" href="?{{C.KEY_LANG}}={{l}}">{{l.language_name}}</a> | |
30 {% endfor %} | |
31 | |
32 </div> | |
33 </div> | |
34 </div> | |
35 </nav> | |
36 {% endmacro %} | |
37 | |
38 {% macro action_button(url, label=_("create"), icon="plus-circled", class="is-primary is-rounded") %} | |
39 <a class="button {{class}}" {{ {"href":url} | xmlattr }}><i class="icon-{{icon}}"></i> {{label}}</a> | |
40 {% endmacro %} |