mirror of
https://github.com/hex248/tsos.git
synced 2026-02-07 18:23:05 +00:00
basic setup
react ts tailwind vite biome bun
This commit is contained in:
38
index.html
Normal file
38
index.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" class="">
|
||||
<!-- class="dark" makes the app dark mode -->
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>The Shape of Sound</title>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
background-color: var(--background);
|
||||
color: var(--foreground);
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
const theme = localStorage.getItem("theme");
|
||||
if (theme === "dark") document.documentElement.classList.add("dark");
|
||||
else if (theme === "light")
|
||||
document.documentElement.classList.remove("dark");
|
||||
|
||||
if (theme === null) {
|
||||
const prefersDark = window.matchMedia(
|
||||
"(prefers-color-scheme: dark)"
|
||||
).matches;
|
||||
if (prefersDark) document.documentElement.classList.add("dark");
|
||||
else document.documentElement.classList.remove("dark");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user