-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
52 lines (52 loc) · 1.91 KB
/
index.html
File metadata and controls
52 lines (52 loc) · 1.91 KB
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
<!doctype html>
<html lang="en">
<head>
<title>Timescape</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.20.1/cdn/themes/light.css"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.20.1/cdn/themes/dark.css"
/>
<script
type="module"
src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.20.1/cdn/shoelace.js"
></script>
<link rel="stylesheet" href="static/main.css" />
<script src="static/main.js" type="module"></script>
<link rel="icon" href="static/assets/appicon.png" />
</head>
<body>
<script>
function setSlTHeme(variant) {
const old =
variant === "dark" ? "sl-theme-light" : "sl-theme-dark";
const next =
variant === "dark" ? "sl-theme-dark" : "sl-theme-light";
if (document.body.classList.contains(old)) {
document.body.classList.replace(old, next);
} else {
document.body.classList.add(next);
}
}
const matcher = window.matchMedia("(prefers-color-scheme: dark)");
if (matcher.matches) {
setSlTHeme("dark");
} else {
setSlTHeme("light");
}
matcher.addEventListener("change", (event) => {
const newScheme = event.matches ? "dark" : "light";
setSlTHeme(newScheme);
});
</script>
<ts-event-panel></ts-event-panel>
<ts-map zoom="7"></ts-map>
<ts-search></ts-search>
<ts-timeline></ts-timeline>
<ts-loader></ts-loader>
</body>
</html>