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 |
|
61 {{ script.generate_scripts() }} |
|
62 |
|
63 {% for script in scripts %} |
|
64 <script{{ {'src': script.src, 'type': script.type} | xmlattr }}>{{script.content}}</script> |
|
65 {% endfor %} |
|
66 |
|
67 {% block favicon %} |
|
68 <link rel="icon" href="{{media_path}}icons/apps/64/sat.png"> |
|
69 {% endblock favicon %} |
|
70 </head> |
|
71 <body{{ {'onload': body_onload} | xmlattr }}> |
|
72 {% if atom_url is defined %} |
|
73 {{ icon_defs('feed') }} |
|
74 {% endif %} |
|
75 {% if main_menu %} |
|
76 {% block main_menu %} |
|
77 {{ component.menu(main_menu, class="main_menu") }} |
|
78 {% endblock main_menu %} |
|
79 {% endif %} |
|
80 <div id="body" class="container"> |
|
81 {% block body %} |
|
82 {% endblock body %} |
|
83 </div> |
|
84 </body> |
|
85 </html> |