Initial Commit
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<title>Frontend Template</title>
|
||||
<script>
|
||||
// FOUC 방지 — React 마운트 전 [data-theme] + .dark 미리 박음.
|
||||
// 팔레트는 localStorage 'theme' 키, 다크모드는 'theme-store' (zustand persist).
|
||||
;(function () {
|
||||
try {
|
||||
var pal = localStorage.getItem("theme") || "clean-blue"
|
||||
// 이전 기본 베이지는 한 번만 교체. 이후 직접 고른 팔레트는 유지.
|
||||
if (!localStorage.getItem("clean-blue-default-v1")) {
|
||||
if (pal === "warm-tan") {
|
||||
pal = "clean-blue"
|
||||
localStorage.setItem("theme", pal)
|
||||
}
|
||||
localStorage.setItem("clean-blue-default-v1", "1")
|
||||
}
|
||||
document.documentElement.setAttribute("data-theme", pal)
|
||||
var raw = localStorage.getItem("theme-store")
|
||||
var mode = "light"
|
||||
if (raw) {
|
||||
try {
|
||||
mode = (JSON.parse(raw).state || {}).theme || "light"
|
||||
} catch (e) {}
|
||||
}
|
||||
var dark =
|
||||
mode === "dark" ||
|
||||
(mode === "system" &&
|
||||
window.matchMedia &&
|
||||
matchMedia("(prefers-color-scheme: dark)").matches)
|
||||
if (dark) document.documentElement.classList.add("dark")
|
||||
document.documentElement.style.colorScheme = dark ? "dark" : "light"
|
||||
} catch (e) {}
|
||||
})()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user