comparison default/base/base.html @ 61:f76ec90e0e1e

base: menus handling, first draft: this is a very basic way to handle menu (big buttons on the top), just a first draft to be able to navigate.
author Goffi <goffi@goffi.org>
date Sat, 11 Nov 2017 00:16:35 +0100
parents 37fd11d71233
children 9834106678da
comparison
equal deleted inserted replaced
60:f3c0447b8b4c 61:f76ec90e0e1e
34 34
35 {{ script.generate_scripts() }} 35 {{ script.generate_scripts() }}
36 </head> 36 </head>
37 <body> 37 <body>
38 38
39 {% if confirm %} 39 <header>
40 {# confirmation message used when post data has been handled correctly #} 40 {% if confirm %}
41 {% block confirm %} 41 {# confirmation message used when post data has been handled correctly #}
42 <div class="box post_confirm"> 42 {% block confirm %}
43 {% block confirm_message %} 43 <div class="box post_confirm">
44 {% trans %}Your data has been sent correctly.{% endtrans %} 44 {% block confirm_message %}
45 {% endblock confirm_message %} 45 {% trans %}Your data has been sent correctly.{% endtrans %}
46 </div> 46 {% endblock confirm_message %}
47 {% endblock confirm %} 47 </div>
48 {% endif %} 48 {% endblock confirm %}
49 {% endif %}
50
51 {% if menus %}
52 {% block menu %}
53 <nav class="menu">
54 <ul>
55 {% for url,label,cls in menus %}
56 <li><a class="menu_item button {{cls}}" {{ {'href': url}|xmlattr }}>{{ label }}</a></li>
57 {% endfor %}
58 </ul>
59 </nav>
60 {% endblock menu %}
61 {% endif %}
62 </header>
49 63
50 <div id="body"> 64 <div id="body">
51 {% block body %} 65 {% block body %}
52 {% endblock body %} 66 {% endblock body %}
53 </div> 67 </div>