By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 default.html

View raw Download
text/html • 10.1 kiB
HTML document, Unicode text, UTF-8 text
        
            
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
{% block head %}
5
<link rel="stylesheet" href="/static/style.css">
6
<link rel="stylesheet" href="/userstyle">
7
<title>{% block title %}{% trans %}Roundabout{% endtrans %}{% endblock %}</title>
8
<link rel="apple-touch-icon" sizes="512x512" href="/static/apple-touch-icon.png">
9
<link rel="manifest" href="/static/site.webmanifest">
10
<link rel="mask-icon" href="/static/safari-pinned-tab.svg" color="#3f51b5">
11
<link rel="shortcut icon" href="/static/favicon.ico">
12
<meta name="apple-mobile-web-app-title" content="Roundabout">
13
<meta name="application-name" content="Roundabout">
14
<meta name="theme-color" content="#37474f">
15
<link rel="shortcut icon" href="/static/logo.svg">
16
<script src="https://code.iconify.design/iconify-icon/1.0.7/iconify-icon.min.js"></script>
17
<meta name="viewport" content="width=device-width, initial-scale=1" />
18
<script src="/static/htmx.min.js"></script>
19
{% endblock %}
20
</head>
21
<body>
22
<dialog id="sidenav" class="sheet-left">
23
<x-frame style="--width: 320px; --margin: 0;">
24
<article class="card">
25
<section class="card-main">
26
<nav class="sidenav">
27
<ul>
28
{% if logged_in_user %}
29
<li><a href="/{{ logged_in_user }}">
30
<img src="/info/{{ logged_in_user }}/avatar" class="avatar" style="width: 1em; height: 1em;">
31
{{ logged_in_user }}
32
</a></li>
33
<li><a href="/notifications">
34
<iconify-icon icon="ic:baseline-inbox" data-badge="{{ unread }}"></iconify-icon>
35
{% trans %}Notifications{% endtrans %}
36
</a></li>
37
<li><a href="/newrepo">
38
<iconify-icon icon="mdi:folder-plus"></iconify-icon>
39
{% trans %}Create repository{% endtrans %}
40
</a></li>
41
<li><a href="/favourites">
42
<iconify-icon icon="mdi:star"></iconify-icon>
43
{% trans %}Your favourites{% endtrans %}
44
</a></li>
45
<li><a href="/settings">
46
<iconify-icon icon="mdi:cog"></iconify-icon>
47
{% trans %}Settings{% endtrans %}
48
</a></li>
49
<li><a href="/logout">
50
<iconify-icon icon="mdi:logout"></iconify-icon>
51
{% trans %}Log out{% endtrans %}
52
</a></li>
53
{% else %}
54
<li><a href="/accounts">
55
<iconify-icon icon="mdi:account"></iconify-icon>
56
{% trans %}Log in or sign up{% endtrans %}
57
</a></li>
58
{% endif %}
59
</ul>
60
</nav>
61
</section>
62
</article>
63
</x-frame>
64
</dialog>
65
{% block dialogs %}
66
{% endblock %}
67
<x-vbox class="nopad" style="align-items: stretch; height: 100vh;">
68
{% if "cookie-banner" not in request.cookies %}
69
<x-hbox id="cookie-info">
70
<p>
71
{% trans %}By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.{% endtrans %}
72
</p>
73
<x-buttonbox>
74
<a href="/cookie-dismiss" class="button button-flat button-neutral">{% trans %}Dismiss{% endtrans %}</a>
75
</x-buttonbox>
76
</x-hbox>
77
{% endif %}
78
<header>
79
<nav id="global-nav" class="breadcrumbs">
80
<a href="javascript:document.getElementById('sidenav').showModal();" id="sidenav-trigger">
81
<iconify-icon icon="mdi:menu"></iconify-icon>
82
</a>
83
<ul>
84
<li><a href="/">{% trans %}roundabout{% endtrans %} (α)</a></li>
85
{% block breadcrumbs %}{% endblock %}
86
</ul>
87
<div class="flexible-space" id="navbar-separator"></div>
88
<x-buttonbox style="align-items: center; gap: 12px;">
89
{% if logged_in_user %}
90
<a href="/{{ logged_in_user }}">
91
<x-hbox class="box-center" style="--gap-box: 1ch;">
92
<img src="/info/{{ logged_in_user }}/avatar" class="avatar" style="width: 1em; height: 1em;">
93
{{ logged_in_user }}
94
</x-hbox>
95
</a>
96
<a href="/notifications">
97
<iconify-icon icon="ic:baseline-inbox" data-badge="{{ unread }}"></iconify-icon>
98
</a>
99
<a href="/newrepo">
100
<iconify-icon icon="mdi:folder-plus" title="{% trans %}Create repository{% endtrans %}"></iconify-icon>
101
</a>
102
<a href="/favourites">
103
<iconify-icon icon="mdi:star" title="{% trans %}Favourites{% endtrans %}"></iconify-icon>
104
</a>
105
<a href="/settings">
106
<iconify-icon icon="mdi:cog" title="{% trans %}User settings{% endtrans %}"></iconify-icon>
107
</a>
108
<a href="/logout">
109
<iconify-icon icon="mdi:logout" title="{% trans %}Log out{% endtrans %}"></iconify-icon>
110
</a>
111
{% else %}
112
<a href="/accounts">{% trans %}Log in or sign up{% endtrans %}</a>
113
{% endif %}
114
</x-buttonbox>
115
</nav>
116
{% if self.nav() | trim %}
117
<nav id="repo-nav" class="navbar" style="max-height: 100%; flex: 0 0 var(--height-navbar);">
118
{% block nav %}{% endblock %}
119
</nav>
120
{% endif %}
121
</header>
122
<main>
123
{% block content %}
124
{% endblock %}
125
</main>
126
<footer>
127
{{ Markup(config.footer) }}
128
<x-hbox style="justify-content: center;">
129
<details>
130
<summary>{% trans %}English{% endtrans %}</summary>
131
<form method="POST" action="/language">
132
<ul>
133
<li>
134
<button type="submit" value="{{ locale }}" class="link-button" name="language">
135
{% trans %}Automatic{% endtrans %}
136
</button>
137
</li>
138
{% for locale in config.available_locales %}
139
<li>
140
<button type="submit" value="{{ locale }}" class="link-button" name="language">
141
{{ locale_names[locale] }}
142
</button>
143
</li>
144
{% endfor %}
145
</ul>
146
</form>
147
</details>
148
</x-hbox>
149
</footer>
150
</x-vbox>
151
{% with messages = get_flashed_messages(with_categories=true) %}
152
<ol class="toast-container">
153
{% for category, message in messages %}
154
<li
155
style="
156
{% if category %}
157
background-color:
158
{% if category == 'error' %}var(--color-error)
159
{% elif category == 'alert' %}var(--color-alert)
160
{% elif category == 'info' %}var(--color-info)
161
{% elif category == 'success' %}var(--color-success)
162
{% endif %};
163
color:
164
{% if category == 'error' %}var(--color-error-text)
165
{% elif category == 'alert' %}var(--color-alert-text)
166
{% elif category == 'info' %}var(--color-info-text)
167
{% elif category == 'success' %}var(--color-success-text)
168
{% endif %};
169
{% endif %}"
170
>
171
{% if category | split | first == "task" %}
172
{{ message }}
173
{% else %}
174
{{ message }}
175
{% endif %}
176
<x-buttonbox>
177
<button class="button-flat" onclick="removeToast()" style="color: inherit !important;">{% trans %}Close{% endtrans %}</button>
178
</x-buttonbox>
179
</li>
180
{% endfor %}
181
</ol>
182
{% endwith %}
183
<script src="/static/ripples.js"></script>
184
<script src="/static/efficient-ui/dialogs.js"></script>
185
<script src="/static/efficient-ui/toasts.js"></script>
186
{% block scripts %}
187
{% endblock %}
188
</body>
189
</html>
190