Mercurial > libervia-templates
annotate sat_templates/templates/bulma/components/common.html @ 289:f1a39607d6a5
bulma (base/base.html): `full_screen_body` parameter + body_wrapper:
- if `full_screen_body` is set in template, the `body--fullscreen` class will be added to
`<body>` element. It will then be a flexbox container (in columns), and displayed on the whole viewport.
- new `body_wrapper` block, if a page needs to replace the `#body` container.
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 28 Sep 2020 17:25:26 +0200 |
parents | a18374320194 |
children | 1743fd741fed |
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 | |
259
a18374320194
bulma (components/common, input/field, input/form): use `xmlattr` for `id`
Goffi <goffi@goffi.org>
parents:
238
diff
changeset
|
38 {% macro action_button(url, label=_("create"), icon="plus-circled", class="is-primary is-rounded", id=none) %} |
a18374320194
bulma (components/common, input/field, input/form): use `xmlattr` for `id`
Goffi <goffi@goffi.org>
parents:
238
diff
changeset
|
39 <a class="button {{class}}" {{ {"href":url, "id": id} | xmlattr }}><i class="icon-{{icon}}"></i> {{label}}</a> |
230 | 40 {% endmacro %} |