-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathindex.html
More file actions
44 lines (39 loc) · 1.41 KB
/
index.html
File metadata and controls
44 lines (39 loc) · 1.41 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favico.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="description" content="Word Tuah - A fun word guessing game" />
<meta name="theme-color" content="#ffffff" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#121213" />
<meta name="color-scheme" content="light dark" />
<title>Word Tuah - Word Guessing Game</title>
<!-- Prevent flash of wrong theme -->
<style>
html.dark-mode {
background-color: #121213;
color: #ffffff;
}
html {
transition: background-color 0s !important;
}
</style>
<script>
// Check for saved theme preference or use system preference
const darkModePreferred =
localStorage.getItem('darkMode') === 'true' ||
(!localStorage.getItem('darkMode') &&
window.matchMedia('(prefers-color-scheme: dark)').matches);
if (darkModePreferred) {
document.documentElement.classList.add('dark-mode');
} else {
document.documentElement.classList.remove('dark-mode');
}
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>