comparison sat_templates/default/base/base.html @ 147:33c7ce833d3f

install: setup.py fix + moved "default" dir in a "sat_templates" dir: the merge request at https://bugs.goffi.org/mr/view/3 was a good basis, but not fully working ("default" dir was removed), this patch fixes it, and do some improvments: - moved "default" in "sat_templates" dir, which correspond to the python module, so it can be found easily from python - added VERSION, and mercurial hash detection, in the same way as for Cagou and backend - slight modification of classifiers - replaces tabs coming from MR by spaces
author Goffi <goffi@goffi.org>
date Sat, 02 Jun 2018 17:25:43 +0200
parents default/base/base.html@04609722add0
children
comparison
equal deleted inserted replaced
146:7dc00829c32f 147:33c7ce833d3f
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) #}
2 {% import 'components/common.html' as component with context %}
3 {{ script.include('common', '') }} {# common.js is a common script, so it's useful to import it here #}
4 <!DOCTYPE html>
5 <html>
6 <head>
7 <meta charset="utf-8">
8 <meta name="viewport" content="width=device-width, initial-scale=1">
9
10 {% if norobots %}
11 <meta name="robots" content="noindex, nofollow">
12 {% endif %}
13
14 <title>{% block title %}{{C.APP_NAME}}{% endblock %}</title>
15
16 {% if css_content is defined %}
17 <style type="text/css">
18 {{css_content}}
19 </style>
20 {% else %}
21 {% for css_file in css_files %}
22 <link rel='stylesheet' type="text/css" href='{{root_path}}{{css_file}}'>
23 {% endfor %}
24 {% endif %}
25
26 {% if xmpp_uri is defined %}
27 <link rel="alternate" type="application/atom+xml" href="{{xmpp_uri}}" >
28 {% endif %}
29
30 {% if dynamic_style is defined %}
31 {# be extra careful about dynamic style, insure escaping if you use untrusted values ! #}
32 <style type="text/css">
33 {{dynamic_style}}
34 </style>
35 {% endif %}
36
37 {# JS handling #}
38 {% if websocket is defined %}
39 {{ script.include('websocket', '') }}
40 {% endif %}
41 {{ script.generate_scripts() }}
42 {% if websocket is defined %}
43 <script>var socket=new WSHandler("{{websocket.url}}", "{{websocket.token}}", {{websocket.debug}});</script>
44 {% endif %}
45
46 {% block favicon %}
47 <link rel="icon" href="{{media_path}}icons/apps/64/sat.png">
48 {% endblock favicon %}
49 </head>
50 <body>
51 {% if main_menu is defined %}
52 {% block main_menu %}
53 {{ component.menu(main_menu, class="main_menu") }}
54 {% endblock main_menu %}
55 {% endif %}
56
57 <main id='main_area'>
58 <header>
59 {% if confirm %}
60 {# confirmation message used when post data has been handled correctly #}
61 {% block confirm %}
62 <div class="box post_confirm">
63 {% block confirm_message %}
64 {% trans %}Your data has been sent correctly.{% endtrans %}
65 {% endblock confirm_message %}
66 </div>
67 {% endblock confirm %}
68 {% endif %}
69
70 </header>
71
72 <div id="body">
73 {% block category_menu scoped %}
74 {% if category_menu is defined %}
75 {{ component.menu(category_menu, class="category_menu") }}
76 {% endif %}
77 {% endblock category_menu %}
78 {% block body %}
79 {% endblock body %}
80 </div>
81 <footer>{% block footer %}<span>{% trans app_name=C.APP_NAME %}Powered by {{app_name}}{% endtrans %}</span>{% endblock %}</footer>
82 </main>
83 </body>
84 </html>