summaryrefslogtreecommitdiffstats
path: root/templates/base.html
blob: 1873dd3bceb7e10b1b0baede80a0c1876360e79d (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
{%- set styles = ['layout.css'] + styles|default([]) %}
{%- set scripts = [] + scripts|default([]) %}
<!doctype html>
<html>
  <head>
    <title>{% if title %}{{ title }}{% endif %}spline accounts</title>
    {%- for script in scripts %}
      <script type="text/javascript" src="{{ url_for('static', filename=script) }}"></script>
    {%- endfor %}
    {%- for style in styles %}
      <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename=style) }}">
    {%- endfor %}
  </head>
  <body>

    <h1 id="header"><img src="{{url_for('static', filename='logo.png')}}" alt="Spline" /></h1>

    {% if title %}
      <h2>{{ title }}</h2>
    {% endif %}

    {%- if session.username %}
    <p>Logged in as {{ session.username }}. <a href="{{ url_for('logout') }}">Log out</a></p>
    {%- else %}
    <p>Not logged in. <a href="{{ url_for('index') }}">Log in</a></p>
    {%- endif %}

    {% with messages = get_flashed_messages(with_categories=true) %}
      {% if messages %}
        <ul class="flashes">
        {% for category, message in messages %}
        <li class="{{ category }}">{{ message }}</li>
        {% endfor %}
        </ul>
      {% endif %}
    {% endwith %}

    {% block content %}{% endblock %}

    <pre>{{ session.__repr__() }}</pre>
  </body>
</html>