annotate default/base/base.html @ 101:920f03abba53

css (blog): min-height re-adjustment
author Goffi <goffi@goffi.org>
date Sun, 21 Jan 2018 21:08:06 +0100
parents 304cbb690f15
children ff7bd09911f7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
7a1626e78d53 base: an embedded variable is set when base is used, this way we can have include templates without including the whole page with base
Goffi <goffi@goffi.org>
parents: 1
diff changeset
1 {% set embedded = True %} {# embedded is set to avoid including base.html several times if a generic page is included (e.g. blog/articles.html) #}
66
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
2 {% import 'components/common.html' as component with context %}
82
6ba0129a9a4e base: don't use default flag for common script (flags now default to "defer" following last changes in backend)
Goffi <goffi@goffi.org>
parents: 78
diff changeset
3 {{ script.include('common', '') }} {# common.js is a common script, so it's useful to import it here #}
0
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
4 <!DOCTYPE html>
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
5 <html>
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
6 <head>
75
9471c7309ecc base: added viewport meta
Goffi <goffi@goffi.org>
parents: 70
diff changeset
7 <meta charset="utf-8">
9471c7309ecc base: added viewport meta
Goffi <goffi@goffi.org>
parents: 70
diff changeset
8 <meta name="viewport" content="width=device-width, initial-scale=1">
25
b046a7835374 base/base.html: if norobots is set, add a <meta> to tell robots no to index or follow this page.
Goffi <goffi@goffi.org>
parents: 20
diff changeset
9
b046a7835374 base/base.html: if norobots is set, add a <meta> to tell robots no to index or follow this page.
Goffi <goffi@goffi.org>
parents: 20
diff changeset
10 {% if norobots %}
b046a7835374 base/base.html: if norobots is set, add a <meta> to tell robots no to index or follow this page.
Goffi <goffi@goffi.org>
parents: 20
diff changeset
11 <meta name="robots" content="noindex, nofollow">
b046a7835374 base/base.html: if norobots is set, add a <meta> to tell robots no to index or follow this page.
Goffi <goffi@goffi.org>
parents: 20
diff changeset
12 {% endif %}
b046a7835374 base/base.html: if norobots is set, add a <meta> to tell robots no to index or follow this page.
Goffi <goffi@goffi.org>
parents: 20
diff changeset
13
0
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
14 <title>{% block title %}{{C.APP_NAME}}{% endblock %}</title>
26
d782227c088d base/base.html: generate <script> element and include css.js by default
Goffi <goffi@goffi.org>
parents: 25
diff changeset
15
1
b13a26d55c64 base: updated CSS handling to follow changes in backend, moved CSS file to /static with splitted files
Goffi <goffi@goffi.org>
parents: 0
diff changeset
16 {% if css_content is defined %}
0
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
17 <style type="text/css">
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
18 {{css_content}}
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
19 </style>
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
20 {% else %}
1
b13a26d55c64 base: updated CSS handling to follow changes in backend, moved CSS file to /static with splitted files
Goffi <goffi@goffi.org>
parents: 0
diff changeset
21 {% for css_file in css_files %}
b13a26d55c64 base: updated CSS handling to follow changes in backend, moved CSS file to /static with splitted files
Goffi <goffi@goffi.org>
parents: 0
diff changeset
22 <link rel='stylesheet' type="text/css" href='{{root_path}}{{css_file}}'>
b13a26d55c64 base: updated CSS handling to follow changes in backend, moved CSS file to /static with splitted files
Goffi <goffi@goffi.org>
parents: 0
diff changeset
23 {% endfor %}
0
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
24 {% endif %}
26
d782227c088d base/base.html: generate <script> element and include css.js by default
Goffi <goffi@goffi.org>
parents: 25
diff changeset
25
19
422c54e0204a event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
Goffi <goffi@goffi.org>
parents: 9
diff changeset
26 {% if background_image is defined %}
422c54e0204a event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
Goffi <goffi@goffi.org>
parents: 9
diff changeset
27 {# Q&D workaround to implement dynamic background-image
422c54e0204a event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
Goffi <goffi@goffi.org>
parents: 9
diff changeset
28 it should be replaced by a better mechanism in the future, avoid using it #}
422c54e0204a event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
Goffi <goffi@goffi.org>
parents: 9
diff changeset
29 <style type="text/css">
422c54e0204a event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
Goffi <goffi@goffi.org>
parents: 9
diff changeset
30 html {
422c54e0204a event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
Goffi <goffi@goffi.org>
parents: 9
diff changeset
31 background-image: url('{{background_image}}');
422c54e0204a event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
Goffi <goffi@goffi.org>
parents: 9
diff changeset
32 background-size: 15em;
422c54e0204a event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
Goffi <goffi@goffi.org>
parents: 9
diff changeset
33 }
422c54e0204a event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
Goffi <goffi@goffi.org>
parents: 9
diff changeset
34 </style>
422c54e0204a event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
Goffi <goffi@goffi.org>
parents: 9
diff changeset
35 {% endif %}
26
d782227c088d base/base.html: generate <script> element and include css.js by default
Goffi <goffi@goffi.org>
parents: 25
diff changeset
36
84
b2ef34e602cf base, js (websocket), css (main style): dynamic pages implementation, first draft:
Goffi <goffi@goffi.org>
parents: 82
diff changeset
37 {# JS handling #}
b2ef34e602cf base, js (websocket), css (main style): dynamic pages implementation, first draft:
Goffi <goffi@goffi.org>
parents: 82
diff changeset
38 {% if websocket is defined %}
b2ef34e602cf base, js (websocket), css (main style): dynamic pages implementation, first draft:
Goffi <goffi@goffi.org>
parents: 82
diff changeset
39 {{ script.include('websocket', '') }}
b2ef34e602cf base, js (websocket), css (main style): dynamic pages implementation, first draft:
Goffi <goffi@goffi.org>
parents: 82
diff changeset
40 {% endif %}
26
d782227c088d base/base.html: generate <script> element and include css.js by default
Goffi <goffi@goffi.org>
parents: 25
diff changeset
41 {{ script.generate_scripts() }}
84
b2ef34e602cf base, js (websocket), css (main style): dynamic pages implementation, first draft:
Goffi <goffi@goffi.org>
parents: 82
diff changeset
42 {% if websocket is defined %}
b2ef34e602cf base, js (websocket), css (main style): dynamic pages implementation, first draft:
Goffi <goffi@goffi.org>
parents: 82
diff changeset
43 <script>var socket=new WSHandler("{{websocket.url}}", "{{websocket.token}}", {{websocket.debug}});</script>
b2ef34e602cf base, js (websocket), css (main style): dynamic pages implementation, first draft:
Goffi <goffi@goffi.org>
parents: 82
diff changeset
44 {% endif %}
94
304cbb690f15 base: added favicon
Goffi <goffi@goffi.org>
parents: 84
diff changeset
45
304cbb690f15 base: added favicon
Goffi <goffi@goffi.org>
parents: 84
diff changeset
46 {% block favicon %}
304cbb690f15 base: added favicon
Goffi <goffi@goffi.org>
parents: 84
diff changeset
47 <link rel="icon" href="{{media_path}}icons/apps/64/sat.png">
304cbb690f15 base: added favicon
Goffi <goffi@goffi.org>
parents: 84
diff changeset
48 {% endblock favicon %}
0
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
49 </head>
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
50 <body>
66
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
51 {% if main_menu is defined %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
52 {% block main_menu %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
53 {{ component.menu(main_menu, class="main_menu") }}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
54 {% endblock main_menu %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
55 {% endif %}
61
f76ec90e0e1e base: menus handling, first draft:
Goffi <goffi@goffi.org>
parents: 48
diff changeset
56
70
90a303a14112 base: use <main> for main area, for better semantic.
Goffi <goffi@goffi.org>
parents: 66
diff changeset
57 <main id='main_area'>
66
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
58 <header>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
59 {% if confirm %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
60 {# confirmation message used when post data has been handled correctly #}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
61 {% block confirm %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
62 <div class="box post_confirm">
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
63 {% block confirm_message %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
64 {% trans %}Your data has been sent correctly.{% endtrans %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
65 {% endblock confirm_message %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
66 </div>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
67 {% endblock confirm %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
68 {% endif %}
48
37fd11d71233 base: confirmation message can now be customised using "confirm" blog
Goffi <goffi@goffi.org>
parents: 39
diff changeset
69
66
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
70 </header>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
71
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
72 <div id="body">
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
73 {% block category_menu scoped %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
74 {% if category_menu is defined %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
75 {{ component.menu(category_menu, class="category_menu") }}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
76 {% endif %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
77 {% endblock category_menu %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
78 {% block body %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
79 {% endblock body %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
80 </div>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents: 61
diff changeset
81 <footer>{% block footer %}{% trans app_name=C.APP_NAME %}Powered by {{app_name}}{% endtrans %}{% endblock %}</footer>
70
90a303a14112 base: use <main> for main area, for better semantic.
Goffi <goffi@goffi.org>
parents: 66
diff changeset
82 </main>
0
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
83 </body>
9a31d2c02f47 SàT templates, initial commit
Goffi <goffi@goffi.org>
parents:
diff changeset
84 </html>