-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathindex.html
More file actions
42 lines (40 loc) · 1.45 KB
/
index.html
File metadata and controls
42 lines (40 loc) · 1.45 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>~</title>
<script>
;(function () {
const themes = __THEMES_DATA__
const defaultTheme = '__DEFAULT_THEME__'
try {
const stored = localStorage.getItem('settings')
let themeName = defaultTheme
if (stored) {
const parsed = JSON.parse(stored)
if (
parsed.currentTheme &&
themes[parsed.currentTheme]
) {
themeName = parsed.currentTheme
}
}
const theme = themes[themeName]
if (theme && theme.colors) {
const colors = theme.colors
const root = document.documentElement
for (const key in colors) {
root.style.setProperty(key, colors[key])
}
}
} catch (e) {}
})()
</script>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>