generated from Wind-Explorer/blank-tauri-app-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
32 lines (28 loc) · 897 Bytes
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GPause-2</title>
</head>
<body class="text-foreground bg-background absolute inset-0">
<script type="module">
const prefersDarkMode = window.matchMedia("(prefers-color-scheme: dark)");
const body = document.querySelector("body");
function updateTheme() {
if (prefersDarkMode.matches) {
body.classList.add("dark");
} else {
body.classList.remove("dark");
}
}
updateTheme();
prefersDarkMode.addEventListener("change", updateTheme);
document.addEventListener("contextmenu", (event) => {
event.preventDefault();
});
</script>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>