feat(ui): semantic light/dark tokens, ThemeProvider with FOUC guard, token-restyle Toaster/Cover

This commit is contained in:
2026-09-08 17:17:44 +08:00
parent 87b7545a94
commit 03bc537308
7 changed files with 202 additions and 72 deletions
+10 -1
View File
@@ -3,8 +3,17 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0c0a09" />
<meta name="theme-color" content="#fafaf9" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<script>
(() => {
try {
const t = localStorage.getItem("ui.theme") ?? "system";
if (t === "dark" || (t === "system" && matchMedia("(prefers-color-scheme: dark)").matches))
document.documentElement.classList.add("dark");
} catch {}
})();
</script>
<title>BookLib — 个人书库</title>
</head>
<body>