]> git.gir.st - subscriptionfeed.git/blob - app/templates/base.html.j2
better what-to-bold strategy in base.j2
[subscriptionfeed.git] / app / templates / base.html.j2
1 <!DOCTYPE html>
2 <title>{% block title %}{% endblock %}</title>
3 {% block favicon %}
4 <link rel="shortcut icon" href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300" fill="%23fff"><circle r="150" cx="150" cy="150" fill="%23f00"/><path d="m120 97v106l93-53"/></svg>'>
5 {% endblock %}
6 <link rel="stylesheet" href="/static/style.css">
7 <meta name=viewport content="width=device-width, initial-scale=1">
8
9 {% import 'macros.imp.j2' as macros %}
10
11 {% block header %}
12 <span>
13 {% set do_bold = request.blueprint not in g.header_items|map(attribute='parent') %}
14 <a href="/" class="header-left large {{ 'bold' if do_bold }}">
15 <span style=font-family:serif>&Delta;</span>{{ request.host }}
16 </a>
17 {% for x in g.header_items|sort(attribute="priority", reverse=true) %}
18 <a href="{{ x.url }}" class="header-left {{ 'bold' if request.blueprint == x.parent }}">
19 {{ x.name }}
20 </a>
21 {% endfor %}
22 </span>
23 {% if current_user.is_anonymous %}
24 <a href="/login?next={{ request.url | urlencode }}" style=float:right>log in or sign up</a>
25 {% else %}
26 <span style=float:right>{{ current_user.name }} (<a href="/login">log out</a>)</span>
27 {% endif %}
28 <hr style=clear:both>
29 {% endblock %}
30
31 {% with messages = get_flashed_messages(with_categories=true) %}
32 {% if messages %}
33 <ul class=flashes>
34 {% for (type, message) in messages %}
35 <input type=radio hidden id="flash-{{ loop.index }}" class="flash-radio">
36 <li class="{{ type }}"><label for="flash-{{ loop.index }}" class="flash-close" title="dismiss"></label><div class="flash-msg">{{ message }}</div></li>
37 {% endfor %}
38 </ul>
39 {% endif %}
40 {% endwith %}
41
42 <article>
43 {% block content %}
44 <h1>{{ self.title() }}</h1>
45 {% endblock %}
46 </article>
47
48 {% block footer %}{% endblock %}
Imprint / Impressum