-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
42 lines (42 loc) · 1.62 KB
/
index.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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="/favicon.png" type="image/png" />
<link
rel="icon"
href="/favicon-dark.svg"
type="image/svg+xml"
media="(prefers-color-scheme: dark)"
/>
<link
rel="icon"
href="/favicon-dark.png"
type="image/png"
media="(prefers-color-scheme: dark)"
/>
<meta name="theme-color" content="#111" media="(prefers-color-scheme: dark)">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>WATcloud Status</title>
<body>
<script>
// This script prevents FOUC (flash of unstyled content) by setting the
// `dark` class and `color-scheme` meta attribute before the page is
// rendered.
const queryParams = new URLSearchParams(document.location.search);
if (queryParams.get('theme') === 'light') {
document.documentElement.classList.toggle('dark', false);
document.documentElement.style.setProperty('color-scheme', 'light');
} else if (queryParams.get('theme') === 'dark') {
document.documentElement.classList.toggle('dark', true);
document.documentElement.style.setProperty('color-scheme', 'dark');
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.classList.toggle('dark', true);
document.documentElement.style.setProperty('color-scheme', 'dark');
}
</script>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>