forked from fatfingererr/govzero
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
40 lines (39 loc) · 1.45 KB
/
index.html
File metadata and controls
40 lines (39 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- Favicon: prefer VITE_APP_FAVICON then VITE_APP_LOGO then fallback -->
<link id="dynamic-favicon" rel="icon" type="image/png" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Govo</title>
<script type="module">
const fav = import.meta.env.VITE_APP_FAVICON || import.meta.env.VITE_APP_LOGO
if (fav) {
const el = document.getElementById('dynamic-favicon')
if (el) el.setAttribute('href', fav)
}
const daoName = import.meta.env.VITE_DAO_NAME || 'Govo'
document.title = daoName
</script>
<!-- Early theme application to prevent light-mode flash when user prefers dark -->
<script>
;(() => {
try {
const stored = localStorage.getItem('theme')
const sysDark = window.matchMedia('(prefers-color-scheme: dark)').matches
const theme =
stored === 'light' || stored === 'dark' || stored === 'system' ? stored : 'system'
const finalTheme = theme === 'system' ? (sysDark ? 'dark' : 'light') : theme
document.documentElement.classList.remove('light', 'dark')
document.documentElement.classList.add(finalTheme)
} catch (e) {
/* ignore */
}
})()
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>