summaryrefslogtreecommitdiff
path: root/templates/layout.jinja
blob: b71b6ec0645bed6361dd7c7cba2ad6cc488a88a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <link rel="shortcut icon" href="{{ "images/currency.png" | static_url }}" type="image/icon">
        <title>{{ title or "Kostenverwaltung" }}</title>
        {% block style %}
            <link href="{{ "css/style.css" | static_url }}" rel="stylesheet" type="text/css">
        {% endblock %}
    </head>
    {% if config['DEBUG'] %}<!-- {{ request.environ | safe }} -->{% endif %}
    <body>
        <div id="head-wrapper">
            <div id="logo">
                <img src="{{ "images/currency.png" | static_url }}">
                <h1><a href="{{ url_for("index") }}">Kosten</a></h1>
                {% if current_user.is_authenticated() %}
                    <h2>»   {{ current_user.description | default('von ' ~ current_user.name, true) }}</h2>
                {% endif %}
            </div>

            <div id="header">
                <div id="menu">
                    {% block menu %}
                        {% from "menu.jinja" import menu with context %}
                        <ul>
                            {% for uri, page in menu %}
                                <li class="menu-item"><a href="{{ url_for(uri) }}">{{page}}</a></li>
                            {% endfor %}
                        </ul>
                    {% endblock %}
                </div>
            </div>
        </div>

        <div id="page">
            <div id="content">
                {% with messages = get_flashed_messages(with_categories=true) %}
                    {% if messages %}
                        <ul id="messages">
                            {% for cat,msg in messages %}
                                <li class="msg-{{ cat }}">{{ msg }}</li>
                            {% endfor %}
                        </ul>
                    {% endif %}
                {% endwith %}
                <h1 id="page_heading">{% block heading -%}{%- endblock %}</h1>
                {% block content %}{% endblock %}
            </div>
            <div style="clear: both;"></div>
        </div>
        <div id="footer">
            {% block footer %}
                <p id="legal">
                    powered by <a href="http://flask.pocoo.org">Flask</a> | 
                    © 2010-2014. All Rights Reserved. René Neumann | 
                    with the help of <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.
                </p>
            {% endblock %}
        </div>
        {% if not g.is_mobile %}
            {% block js %}
                <script type="text/javascript" src="{{ "js/jquery-1.10.2.js" | static_url }}"></script>
                <script type="text/javascript" src="{{ "js/kosten.js" | static_url }}"></script>
            {% endblock %}
            {% if JSFunction %}<script type="text/javascript">{{ JSFunction }}()</script> {% endif %}
        {% endif %}
    </body>
</html>