newsnow/index.html

28 lines
806 B
HTML
Raw Normal View History

2024-09-26 11:30:21 +08:00
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
2024-10-11 18:47:27 +08:00
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
2024-09-26 11:30:21 +08:00
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2024-10-17 15:43:20 +08:00
<script>
2024-10-19 13:15:48 +08:00
function safeParseString(str) {
try {
return JSON.parse(str)
} catch {
return ""
}
}
const theme = safeParseString(localStorage.getItem("color-scheme")) || "auto"
2024-10-17 15:43:20 +08:00
const isDark = window.matchMedia("(prefers-color-scheme: dark)").matches
if (theme === "auto" ? isDark : theme === "dark") {
document.documentElement.classList.add("dark")
}
</script>
2024-09-26 11:30:21 +08:00
<title>NewsNow</title>
</head>
<body>
2024-09-29 20:57:24 +08:00
<div id="app"></div>
<script type="module" src="/src/app.tsx"></script>
2024-09-26 11:30:21 +08:00
</body>
</html>