Mercurial > libervia-templates
annotate sat_templates/templates/bulma/base/base.html @ 287:7670752665e0
bulma (photo/album): added a `cover` button to change album cover
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 05 Sep 2020 22:01:07 +0200 |
parents | cf3fcbc797bc |
children | f1a39607d6a5 |
rev | line source |
---|---|
230 | 1 {# embedded is set to avoid including base.html several times if a generic page is included (e.g. blog/articles.html) #} |
2 {% set embedded = True %} | |
3 {% import 'components/common.html' as component with context %} | |
4 {{ script.include('common', '') }} {# common.js is, as its name states, a common script, so it's useful to import it here #} | |
5 <!DOCTYPE html> | |
6 <html> | |
7 <head> | |
8 <meta charset="utf-8"> | |
9 <meta name="viewport" content="width=device-width, initial-scale=1"> | |
10 {# using SVG directly doesn't always play well with Bulma, so we also use the icon font #} | |
11 <link rel='stylesheet' type="text/css" href='{{media_path}}fonts/fontello/css/fontello.css'> | |
12 <link rel='stylesheet' type="text/css" href='{{build_path}}bulma_sat.css'> | |
13 | |
14 {% if norobots %} | |
15 <meta name="robots" content="noindex, nofollow"> | |
16 {% endif %} | |
17 | |
18 <title>{% block title %}{{C.APP_NAME}}{% endblock %}</title> | |
19 | |
20 {% if css_content is defined %} | |
21 <style type="text/css"> | |
22 {{css_content}} | |
23 </style> | |
24 {% if css_content_noscript is defined %} | |
25 <noscript> | |
26 <style type="text/css"> | |
27 {{css_content_noscript}} | |
28 </style> | |
29 </noscript> | |
30 {% endif %} | |
31 {% else %} | |
32 {% for css_file in css_files %} | |
33 <link rel='stylesheet' type="text/css" href='{{css_file}}'> | |
34 {% endfor %} | |
35 {% if css_files_noscript %} | |
36 <noscript> | |
37 {% for css_file in css_files_noscript %} | |
38 <link rel='stylesheet' type="text/css" href='{{css_file}}'> | |
39 {% endfor %} | |
40 </noscript> | |
41 {% endif %} | |
42 {% endif %} | |
43 | |
44 {% if links is defined %} | |
45 {% for link_data in links %} | |
46 <link{{link_data|xmlattr}}> | |
47 {% endfor %} | |
48 {% endif %} | |
49 | |
50 {% if xmpp_uri is defined %} | |
51 <link rel="alternate" type="application/atom+xml" href="{{xmpp_uri}}" > | |
52 {% endif %} | |
53 | |
54 {% if dynamic_style is defined %} | |
55 {# be extra careful about dynamic style, insure escaping if you use untrusted values ! #} | |
56 <style type="text/css"> | |
57 {{dynamic_style}} | |
58 </style> | |
59 {% endif %} | |
60 | |
237
caa3767707fb
base/base.html: expose CSRF token to script + fixed script content
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
61 {% if csrf_token is defined %} |
267
5a1d7c2d965a
bulma (base/base.html): expose `session_uuid` to scripts
Goffi <goffi@goffi.org>
parents:
244
diff
changeset
|
62 <script>var csrf_token = "{{csrf_token}}"; var session_uuid="{{session_uuid}}";</script> |
237
caa3767707fb
base/base.html: expose CSRF token to script + fixed script content
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
63 {% endif %} |
caa3767707fb
base/base.html: expose CSRF token to script + fixed script content
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
64 |
230 | 65 {{ script.generate_scripts() }} |
66 | |
67 {% for script in scripts %} | |
237
caa3767707fb
base/base.html: expose CSRF token to script + fixed script content
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
68 <script{{ {'src': script.src, 'type': script.type} | xmlattr }}>{{script.content|safe}}</script> |
230 | 69 {% endfor %} |
70 | |
71 {% block favicon %} | |
72 <link rel="icon" href="{{media_path}}icons/apps/64/sat.png"> | |
73 {% endblock favicon %} | |
74 </head> | |
75 <body{{ {'onload': body_onload} | xmlattr }}> | |
76 {% if atom_url is defined %} | |
77 {{ icon_defs('feed') }} | |
78 {% endif %} | |
79 {% if main_menu %} | |
80 {% block main_menu %} | |
81 {{ component.menu(main_menu, class="main_menu") }} | |
82 {% endblock main_menu %} | |
83 {% endif %} | |
84 <div id="body" class="container"> | |
279
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
85 {% if confirm %} |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
86 <article class="message is-success mt-4"> |
280
cf3fcbc797bc
bulma (base/base.html): remove backend notification/confirm message on delete button click
Goffi <goffi@goffi.org>
parents:
279
diff
changeset
|
87 <div class="message-header"> |
cf3fcbc797bc
bulma (base/base.html): remove backend notification/confirm message on delete button click
Goffi <goffi@goffi.org>
parents:
279
diff
changeset
|
88 {% trans %}Success{% endtrans %} |
cf3fcbc797bc
bulma (base/base.html): remove backend notification/confirm message on delete button click
Goffi <goffi@goffi.org>
parents:
279
diff
changeset
|
89 <button class="delete" aria-label="delete" onclick="this.parentElement.parentElement.remove()"></button> |
cf3fcbc797bc
bulma (base/base.html): remove backend notification/confirm message on delete button click
Goffi <goffi@goffi.org>
parents:
279
diff
changeset
|
90 </div> |
279
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
91 <div class="message-body"> |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
92 {% trans %}Your data has been sent correctly.{% endtrans %} |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
93 </div> |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
94 </article> |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
95 {% endif %} |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
96 {% if notifications %} |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
97 {% for notification in notifications %} |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
98 <article class="message {{ {C.LVL_WARNING: "is-warning"}.get(notification.level, "is-info") }} mt-4"> |
280
cf3fcbc797bc
bulma (base/base.html): remove backend notification/confirm message on delete button click
Goffi <goffi@goffi.org>
parents:
279
diff
changeset
|
99 <div class="message-header"> |
cf3fcbc797bc
bulma (base/base.html): remove backend notification/confirm message on delete button click
Goffi <goffi@goffi.org>
parents:
279
diff
changeset
|
100 {% trans %}Notification{% endtrans %} |
cf3fcbc797bc
bulma (base/base.html): remove backend notification/confirm message on delete button click
Goffi <goffi@goffi.org>
parents:
279
diff
changeset
|
101 <button class="delete" aria-label="delete" onclick="this.parentElement.parentElement.remove()"></button> |
cf3fcbc797bc
bulma (base/base.html): remove backend notification/confirm message on delete button click
Goffi <goffi@goffi.org>
parents:
279
diff
changeset
|
102 </div> |
279
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
103 <div class="message-body"> |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
104 {{ notification.message }} |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
105 </div> |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
106 </article> |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
107 {% endfor %} |
a35ddf972ad2
bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents:
267
diff
changeset
|
108 {% endif %} |
244
a62822c6a114
bulma: added a notification area + first dialog template for confirmation request
Goffi <goffi@goffi.org>
parents:
237
diff
changeset
|
109 <div id="notifs_area"></div> |
230 | 110 {% block body %} |
111 {% endblock body %} | |
112 </div> | |
113 </body> | |
114 </html> |