~fluix/tilde

ref: b7b7a142f2a3543093d35b6ec86c2f3080cfff2e tilde/templates/base.html -rw-r--r-- 2.3 KiB
b7b7a142Steven Guikal Update chatting user guide 8 months ago
                                                                                
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
70
71
72
73
74
75
76
77
<!--
SPDX-FileCopyrightText: 2021 Steven Guikal <void@fluix.one>

SPDX-License-Identifier: AGPL-3.0-only
SPDX-License-Identifier: CC-BY-SA-4.0
-->

{% macro input(field) %}
  {% if field.widget.input_type == "checkbox" %}
    {{ field(class="error" if field.errors, *varargs, **kwargs) }}
    {{ field.label }}
  {% else %}
    {{ field.label }}
    {{ field(class="error" if field.errors, *varargs, **kwargs) }}
  {% endif %}
  {% for error in field.errors %}
    <small class="error">{{ error }}</small><br>
  {% endfor %}
{% endmacro %}

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">
    <link rel="stylesheet" href="{{ url_for("static", filename="style.css") }}" type="text/css">
    {% block head %}
    {% endblock %}
  </head>
  <body>
    <header>
      <nav>
        <ul>
          <li>
            <a href="{{ url_for("flatpages.index") }}">home</a>
          </li>
          <li>
            <a href="{{ url_for("auth.account") }}">auth</a>
          </li>
          <li>
            <a href="{{ url_for("flatpages.chat") }}">chat</a>
          </li>
        </ul>
      </nav>
      {% for message in get_flashed_messages() %}
        <p class="message">{{ message }}</p>
      {% endfor %}
    </header>
    <main>
      {% block main %}
      {% endblock %}
    </main>
    <footer>
      <nav>
        <ul>
          <li>
            <a href="{{ url_for("flatpages.coc") }}">code of conduct</a>
          </li>
          <li>
            <a href="{{ url_for("flatpages.privacy") }}">privacy policy</a>
          </li>
          <li>
            <a href="{{ url_for("flatpages.help") }}">help</a>
          </li>
          <li>
            <a href="{{ url_for("flatpages.contact") }}">contact</a>
          </li>
        </ul>
      </nav>
      <p>
        &copy; 2021 Steven Guikal.
        <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSE">Licensed</a> under <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSES/AGPL-3.0-only.txt">AGPL-3.0-only</a>, <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSES/CC-BY-SA-4.0.txt">CC-BY-SA-4.0</a>, and <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSES/CC0-1.0.txt">CC0-1.0</a>.
        <a href="https://sr.ht/~fluix/tilde/">View project</a>.
      </p>
    </footer>
  </body>
</html>