blob: ff1f3c6109928d54e9e81cda9cb85931fbfc0a56 (
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
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
78
79
80
81
82
83
84
|
{% macro navbutton(path, name=None) -%}
<a class="label" {{ "active" if label_active(path) else "" }} href="{{ path }}">{{ name or path }}</a>
{%- endmacro %}
{% set adminmode = request.path.startswith("/admin") and config["admin_enabled"] and request.path != "/admin/login" %}
<!DOCTYPE html>
<html>
<head>
{% block head %}
<title>Emma | {{ title }}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="og:title" content="Emma | {{ title }}">
<meta name="og:description" content="{{ description }}">
<meta name="og:type" content="website">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/static/stylesheets/base.css">
{% if adminmode %}
<style>
#admin-text {
color: red;
position: absolute;
top: 0;
right: 1rem;
}
</style>
{% endif %}
{% endblock %}
</head>
<body>
<nav>
<div id="nav-padding"></div>
<div id="nav-inner">
{% if adminmode %}
{{ navbutton("/admin/", "home") }}
{{ navbutton("/admin/blog", "blog") }}
{% else %}
{{ navbutton("/", "/home") }}
{{ navbutton("/projects") }}
{{ navbutton("/blog") }}
{{ navbutton("/clocks") }}
{% endif %}
</div>
<div id="nav-padding"></div>
</nav>
<div id="main">
{% block content %}
{% endblock %}
{% if not adminmode %}
<div id="buttons" style="margin-top: 12px;">
<a href="https://88x31.kate.pet">
<img class="button" src="/static/assets/buttons/0_88x31.kate.pet.png" />
</a>
<img class="button" src="/static/assets/buttons/flag-bi.png" alt="taken from kate.pet" />
<img class="button" src="/static/assets/buttons/flag-trans.png" alt="taken from kate.pet" />
<img class="button" src="/static/assets/buttons/lastfm-01.png" alt="taken from kate.pet" />
<img class="button" src="/static/assets/buttons/hackerpowered.gif" alt="taken from kate.pet" />
<a href="https://kernel.org">
<img class="button" src="/static/assets/buttons/xeniatrans_now.gif" alt="taken from kate.pet" />
</a>
<img class="button" src="/static/assets/buttons/python.png" alt="made by yours truly" />
</div>
{% endif %}
</div>
{% if adminmode %}
<p id="admin-text">(admin)</p>
{% endif %}
</body>
</html>
|