-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.html
101 lines (92 loc) · 3.88 KB
/
base.html
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{{ define "base" }}
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta hx-preserve="true" charset="UTF-8" />
<meta hx-preserve="true" name="viewport" content="width=device-width, initial-scale=1" />
<link hx-preserve="true" rel="preconnect" href="https://fonts.googleapis.com" />
<link hx-preserve="true" rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link hx-preserve="true"
href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap"
rel="stylesheet" />
<link hx-preserve="true"
href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap"
rel="stylesheet" />
<script src="https://unpkg.com/[email protected]"
integrity="sha384-wS5l5IKJBvK6sPTKa2WZ1js3d947pvWXbPJ1OmWfEuxLgeHcEbjUUA5i9V5ZkpCw"
crossorigin="anonymous"></script>
<script src="https://unpkg.com/[email protected]/head-support.js"
integrity="sha384-CtqhRhV1bHrqMSWc8cQGQL4epjUqCHjq/kJ9ztGHS39vO/1phOgyhFIieE87UKMu"
crossorigin="anonymous"></script>
<script async hx-preserve="true" src="https://analytics.umami.is/script.js"
data-website-id="0c4894fc-34fe-48dd-bf1a-79ec70aa621c"></script>
<link hx-preserve="true" rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.classless.min.css" crossorigin="anonymous" />
<script type="text/javascript" hx-preserve="true" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-svg.js"
integrity="sha384-KKWa9jJ1MZvssLeOoXG6FiOAZfAgmzsIIfw8BXwI9+kYm0lPCbC6yTQPBC00F1/L"
crossorigin="anonymous"></script>
<script hx-preserve="true" src="https://unpkg.com/[email protected]/preload.js"
integrity="sha384-uEcHQUKMFGRZluBh+aIcwM9zZ3DucQbLOV2tjubqidKwiSx0QIlp7saSn0rE6sBi"
crossorigin="anonymous"></script>
<link hx-preserve="true" rel="stylesheet" href="/static/app.css" />
<link hx-preserve="true" rel="icon" type="image/png" href="/static/favicon.png" />
<script hx-preserve="true">
function copyCode(block) {
const code = block.querySelector("code");
let text = "";
code.querySelectorAll(".line").forEach((line) => {
text += line.querySelector(".cl").innerText;
});
block.classList.add("copy-btn-copied");
setTimeout(() => {
block.classList.remove("copy-btn-copied");
}, 1000);
navigator.clipboard.writeText(text);
}
function onLoaded() {
document.querySelectorAll(".code-content").forEach((block) => {
block.querySelector(".copy-btn").addEventListener("click", () => copyCode(block));
});
}
document.addEventListener('DOMContentLoaded', onLoaded);
document.addEventListener('htmx:afterSettle', onLoaded);
// Set MathJax (only once)
document.addEventListener('htmx:afterSettle', function (evt) {
MathJax.typeset();
document.removeEventListener('htmx:afterSettle', arguments.callee);
});
</script>
<script>
{{ template "NavScript" . }}
</script>
{{ template "head" . }}
</head>
<body id="top" hx-ext="head-support,preload" hx-boost="true" hx-swap="innerHTML settle:0.05s swap:0.05s"
style="position: relative">
<!-- Overlays -->
<div style="
position: absolute;
z-index: -1000;
inset: 0;
background-image: url('/static/media/spots1.svg');
background-position: top;
background-repeat: no-repeat;
background-size: cover;
"></div>
<div style="
position: absolute;
z-index: -1000;
top: 0;
left: 0;
height: 100%;
backdrop-filter: blur(20px);
background-color: #13171f80;
"></div>
<!-- Content -->
<header>{{ template "Nav" . }}</header>
<main class="fade-out fade-in">{{ template "body" . }}</main>
<footer>{{ template "Footer" . }}</footer>
</body>
</html>
{{ end }}