summaryrefslogtreecommitdiffstats
path: root/templates/base.html
blob: 2ff0f156177276ceba38a2a644c5875672c68ac2 (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
<!DOCTYPE html>
<html>
<head>
    <title>{% block title %}{% endblock %} - {{ config.site_name }}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {% load static %}
    <link rel="stylesheet" href="{% static "css/style.css" %}" type="text/css" media="screen" />
    <link rel="stylesheet" href="{% static "fonts/raleway/raleway.css" %}" type="text/css" />
    <link rel="stylesheet" href="{% static "fonts/font_awesome/all.min.css" %}" type="text/css" />
    {% block extra_head %}{% endblock %}
</head>
<body class="{% block body_class %}{% endblock %}">

    <header>
        <h1>
            <a href="/">
                <img src="{% static "img/icon-128.png" %}" width="32">
                {{ config.site_name }}
            </a>
        </h1>
        <menu>
            <li>
                <a href="#"><i class="fa-solid fa-gear"></i></a>
            </li>
            <li>
                {% if user.is_authenticated %}
                    <a href="/identity/select/">
                        {% if not request.identity %}
                            <img src="{% static "img/unknown-icon-128.png" %}" width="32" title="No identity selected">
                        {% elif request.identity.icon_uri %}
                            <img src="{{ request.identity.icon_uri }}" width="32" title="{{ request.identity.handle }}">
                        {% else %}
                            <img src="{% static "img/unknown-icon-128.png" %}" width="32" title="{{ request.identity.handle }}">
                        {% endif %}
                    </a>
                {% else %}
                    <a href="/auth/login/">Login</a>
                {% endif %}
            </li>
        </menu>
    </header>

    <main>
        {% block content %}
        {% endblock %}
    </main>

</body>
</html>