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
105 lines (104 loc) · 2.88 KB
/
index.html
File metadata and controls
105 lines (104 loc) · 2.88 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!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>
<style>
:root {
color-scheme: light dark;
@media (prefers-color-scheme: light) {
background: #e4e4e4;
@media (color-gamut: p3) {
background: oklch(0.92 0 0);
}
}
@media (prefers-color-scheme: dark) {
background: #141414;
@media (color-gamut: p3) {
background: oklch(0.19 0 0);
}
}
}
.is-light-theme {
color-scheme: light;
background: #e4e4e4;
@media (color-gamut: p3) {
background: oklch(0.92 0 0);
}
}
.is-dark-theme {
color-scheme: dark;
background: #141414;
@media (color-gamut: p3) {
background: oklch(0.19 0 0);
}
}
.is-slow-theme {
@media (prefers-color-scheme: light) {
background: #e9e3db;
@media (color-gamut: p3) {
background: oklch(0.92 0.012 75);
}
}
@media (prefers-color-scheme: dark) {
background: #18140f;
@media (color-gamut: p3) {
background: oklch(0.19 0.012 75);
}
}
&.is-light-theme {
background: #e9e3db;
@media (color-gamut: p3) {
background: oklch(0.92 0.012 75);
}
}
&.is-dark-theme {
background: #18140f;
@media (color-gamut: p3) {
background: oklch(0.19 0.012 75);
}
}
}
#loader {
position: absolute;
top: 50%;
left: 50%;
margin: -1px 0 0 -80px;
height: 4px;
width: 160px;
border-radius: 2px;
@media (prefers-color-scheme: light) {
background: #0000001a;
}
@media (prefers-color-scheme: dark) {
background: #ffffff1a;
}
.is-light-theme & {
background: #0000001a;
}
.is-dark-theme & {
background: #ffffff1a;
}
}
</style>
<script>
let root = document.documentElement
if (!location.pathname.startsWith('/fast')) {
root.classList.add('is-slow-theme')
}
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>
<div id="loader"></div>
<div id="main"></div>
<script type="module" src="/main/index.ts"></script>
</body>
</html>