forked from hplush/slowreader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
79 lines (78 loc) · 2.33 KB
/
index.html
File metadata and controls
79 lines (78 loc) · 2.33 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
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
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="icon" href="/main/icon.svg" type="image/svg+xml" />
<link rel="manifest" href="/manifest.webmanifest" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="var(--land-color)" />
<title>Slow Reader</title>
<link
rel="preload"
as="font"
href="./node_modules/@fontsource-variable/noto-sans/files/noto-sans-latin-wght-normal.woff2"
type="font/woff2"
crossorigin
/>
<style>
:root {
color-scheme: light dark;
@media (prefers-color-scheme: light) {
background: oklch(0.95 0 70);
}
@media (prefers-color-scheme: dark) {
background: oklch(0.25 0 70);
}
&.is-light-theme {
color-scheme: light;
background: oklch(0.95 0 70);
}
&.is-dark-theme {
color-scheme: dark;
background: oklch(0.25 0 70);
}
&.is-comfort-mode {
@media (prefers-color-scheme: light) {
background: oklch(0.95 0.03 70);
}
@media (prefers-color-scheme: dark) {
background: oklch(0.25 0.03 70);
}
&.is-light-theme {
background: oklch(0.95 0.03 70);
}
&.is-dark-theme {
background: oklch(0.25 0.03 70);
}
}
}
</style>
<style>
@import url(./main/loader.css);
#loader {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
@media (prefers-reduced-motion: reduce) {
display: none;
}
}
</style>
<script>
let root = document.documentElement
if (!location.pathname.startsWith('/fast')) {
root.classList.add('is-comfort-mode')
}
let theme = localStorage.getItem('slowreader:theme') || 'system'
root.classList.toggle('is-dark-theme', theme === 'dark')
root.classList.toggle('is-light-theme', theme === 'light')
</script>
</head>
<body>
<progress class="loader" id="loader" aria-label="App is loading"></progress>
<div id="main" class="main"></div>
<script type="module" src="/main/index.ts"></script>
</body>
</html>