annotate sat_templates/templates/bulma/base/base.html @ 311:c9396c3711e4

bulma (base): add "footer" block
author Goffi <goffi@goffi.org>
date Fri, 19 Mar 2021 15:49:51 +0100
parents 1de599c5a68f
children 6411615771b6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
230
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 {# embedded is set to avoid including base.html several times if a generic page is included (e.g. blog/articles.html) #}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
2 {% set embedded = True %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
3 {% import 'components/common.html' as component with context %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 {{ script.include('common', '') }} {# common.js is, as its name states, a common script, so it's useful to import it here #}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 <!DOCTYPE html>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
6 <html>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 <head>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
8 <meta charset="utf-8">
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
9 <meta name="viewport" content="width=device-width, initial-scale=1">
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 {# using SVG directly doesn't always play well with Bulma, so we also use the icon font #}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 <link rel='stylesheet' type="text/css" href='{{media_path}}fonts/fontello/css/fontello.css'>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
12 <link rel='stylesheet' type="text/css" href='{{build_path}}bulma_sat.css'>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
13
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 {% if norobots %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 <meta name="robots" content="noindex, nofollow">
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
16 {% endif %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
17
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
18 <title>{% block title %}{{C.APP_NAME}}{% endblock %}</title>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
19
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
20 {% if css_content is defined %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 <style type="text/css">
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
22 {{css_content}}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
23 </style>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
24 {% if css_content_noscript is defined %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
25 <noscript>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
26 <style type="text/css">
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
27 {{css_content_noscript}}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
28 </style>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
29 </noscript>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
30 {% endif %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
31 {% else %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
32 {% for css_file in css_files %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
33 <link rel='stylesheet' type="text/css" href='{{css_file}}'>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
34 {% endfor %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
35 {% if css_files_noscript %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
36 <noscript>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
37 {% for css_file in css_files_noscript %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
38 <link rel='stylesheet' type="text/css" href='{{css_file}}'>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
39 {% endfor %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
40 </noscript>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
41 {% endif %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
42 {% endif %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
43
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
44 {% if links is defined %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
45 {% for link_data in links %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
46 <link{{link_data|xmlattr}}>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
47 {% endfor %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
48 {% endif %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
49
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
50 {% if xmpp_uri is defined %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
51 <link rel="alternate" type="application/atom+xml" href="{{xmpp_uri}}" >
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
52 {% endif %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
53
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
54 {% if dynamic_style is defined %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
55 {# be extra careful about dynamic style, insure escaping if you use untrusted values ! #}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
56 <style type="text/css">
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
57 {{dynamic_style}}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
58 </style>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
59 {% endif %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
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
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
65 {{ script.generate_scripts() }}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
66
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
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
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
69 {% endfor %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
70
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
71 {% block favicon %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
72 <link rel="icon" href="{{media_path}}icons/apps/64/sat.png">
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
73 {% endblock favicon %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
74 </head>
289
f1a39607d6a5 bulma (base/base.html): `full_screen_body` parameter + body_wrapper:
Goffi <goffi@goffi.org>
parents: 280
diff changeset
75 <body{{ {'onload': body_onload} | xmlattr }}{{ ' class="body--fullscreen"'|safe if full_screen_body }}>
230
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
76 {% if atom_url is defined %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
77 {{ icon_defs('feed') }}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
78 {% endif %}
295
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
79 {% if loading_screen %}
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
80 <div id="loading_screen" class="modal is-active">
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
81 <div class="modal-background"></div>
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
82 <div class="modal-content">
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
83 <div class="notification has-text-centered">
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
84 <span class="icon is-large">
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
85 <i class="icon-loading icon_animate_spin"></i>
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
86 </span>
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
87 {% trans %}page is loading, please wait…{% endtrans %}
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
88 </div>
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
89 </div>
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
90 </div>
1de599c5a68f bulma (base): loading screen:
Goffi <goffi@goffi.org>
parents: 289
diff changeset
91 {% endif %}
230
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
92 {% if main_menu %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
93 {% block main_menu %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
94 {{ component.menu(main_menu, class="main_menu") }}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
95 {% endblock main_menu %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
96 {% endif %}
289
f1a39607d6a5 bulma (base/base.html): `full_screen_body` parameter + body_wrapper:
Goffi <goffi@goffi.org>
parents: 280
diff changeset
97 {% block body_wrapper %}
230
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
98 <div id="body" class="container">
279
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
99 {% if confirm %}
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
100 <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
101 <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
102 {% 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
103 <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
104 </div>
279
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
105 <div class="message-body">
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
106 {% 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
107 </div>
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
108 </article>
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
109 {% endif %}
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
110 {% if notifications %}
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
111 {% for notification in notifications %}
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
112 <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
113 <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
114 {% 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
115 <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
116 </div>
279
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
117 <div class="message-body">
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
118 {{ notification.message }}
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
119 </div>
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
120 </article>
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
121 {% endfor %}
a35ddf972ad2 bulma (base/base.html): display backend confirmation and notifications
Goffi <goffi@goffi.org>
parents: 267
diff changeset
122 {% endif %}
244
a62822c6a114 bulma: added a notification area + first dialog template for confirmation request
Goffi <goffi@goffi.org>
parents: 237
diff changeset
123 <div id="notifs_area"></div>
230
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
124 {% block body %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
125 {% endblock body %}
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
126 </div>
289
f1a39607d6a5 bulma (base/base.html): `full_screen_body` parameter + body_wrapper:
Goffi <goffi@goffi.org>
parents: 280
diff changeset
127 {% endblock body_wrapper%}
311
c9396c3711e4 bulma (base): add "footer" block
Goffi <goffi@goffi.org>
parents: 295
diff changeset
128 {% block footer %}
c9396c3711e4 bulma (base): add "footer" block
Goffi <goffi@goffi.org>
parents: 295
diff changeset
129 {% endblock footer %}
230
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
130 </body>
0e69b5843c2f theme: bulma theme first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
131 </html>