default.html
HTML document, ASCII text
1
<!DOCTYPE html>
2
<html lang="en-GB">
3
<head>
4
<title>{% block title %}{% endblock %}</title>
5
<meta charset="utf-8">
6
<meta name="viewport" content="width=device-width, initial-scale=1">
7
<link rel="stylesheet" href="/static/style.css">
8
<script src="/static/efficient-ui/dialogs.js"></script>
9
<script src="/static/efficient-ui/toasts.js"></script>
10
<script src="https://cdn.jsdelivr.net/npm/iconify-icon@2.1.0/dist/iconify-icon.min.js"></script>
11
</head>
12
<body>
13
<header>
14
<nav class="navbar">
15
<ul>
16
<li><a href="/">Home</a></li>
17
<li><a href="/object/">Object list</a></li>
18
<li><a href="/query-pictures">Query</a></li>
19
{% if session.username %}
20
<li><a href="/upload">Upload</a></li>
21
{% endif %}
22
</ul>
23
<ul>
24
{% if session.username %}
25
<li><a href="/profile/{{ session.username }}">Profile: {{ session.username }}</a></li>
26
<li><a href="/logout">Log out</a></li>
27
{% else %}
28
<li><a href="/accounts">Accounts</a></li>
29
{% endif %}
30
</ul>
31
</nav>
32
</header>
33
<main>
34
{% block content %}{% endblock %}
35
</main>
36
{% with messages = get_flashed_messages(with_categories=true) %}
37
<ol class="toast-container">
38
{% for category, message in messages %}
39
<li
40
style="
41
{% if category %}
42
background-color:
43
{% if category == 'error' %}var(--color-error)
44
{% elif category == 'alert' %}var(--color-alert)
45
{% elif category == 'info' %}var(--color-info)
46
{% elif category == 'success' %}var(--color-success)
47
{% endif %};
48
color:
49
{% if category == 'error' %}var(--color-error-text)
50
{% elif category == 'alert' %}var(--color-alert-text)
51
{% elif category == 'info' %}var(--color-info-text)
52
{% elif category == 'success' %}var(--color-success-text)
53
{% endif %};
54
{% endif %}"
55
>
56
{% if category | split | first == "task" %}
57
{{ message }}
58
{% else %}
59
{{ message }}
60
{% endif %}
61
<x-buttonbox>
62
<button class="button-flat" onclick="removeToast()" style="color: inherit !important;">Close</button>
63
</x-buttonbox>
64
</li>
65
{% endfor %}
66
</ol>
67
{% endwith %}
68
</body>
69
</html>