-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
68 lines (68 loc) · 2.93 KB
/
Copy pathindex.html
File metadata and controls
68 lines (68 loc) · 2.93 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!doctype html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="theme-color" content="#f5f6f8" />
<meta name="color-scheme" content="light dark" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="manifest" href="%BASE_URL%manifest.json" />
<link rel="icon" href="%BASE_URL%favicon.png" type="image/png" sizes="192x192" />
<link rel="apple-touch-icon" href="%BASE_URL%brand/apple-touch-icon.png" sizes="180x180" />
<script>
(function () {
var root = document.documentElement;
var mode = "system";
var accent = "plum";
try {
var storedMode = window.localStorage.getItem("codaro-theme");
if (storedMode === "light" || storedMode === "dark") mode = storedMode;
accent = window.localStorage.getItem("codaro-accent");
if (accent !== "blue" && accent !== "teal") accent = "plum";
} catch (storageError) {
mode = "system";
accent = "plum";
}
var prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
var resolved = mode === "system" ? (prefersDark ? "dark" : "light") : mode;
var canvas = resolved === "dark" ? "#151619" : "#f5f6f8";
root.classList.toggle("dark", resolved === "dark");
root.dataset.theme = resolved;
root.dataset.resolvedTheme = resolved;
root.dataset.accent = accent;
root.dataset.density = "studioDense";
root.style.colorScheme = resolved;
root.style.backgroundColor = canvas;
document.querySelector('meta[name="theme-color"]').setAttribute("content", canvas);
})();
</script>
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net" />
<title>Codaro</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script>
const isLocalPreview = ["localhost", "127.0.0.1", "::1"].includes(location.hostname);
if ("serviceWorker" in navigator && location.protocol !== "file:" && !isLocalPreview) {
let codaroRefreshing = false;
navigator.serviceWorker.addEventListener("controllerchange", () => {
if (codaroRefreshing) return;
codaroRefreshing = true;
window.location.reload();
});
window.addEventListener("load", () => {
const serviceWorkerBase = "%BASE_URL%";
navigator.serviceWorker.register(`${serviceWorkerBase}serviceWorker.js`, {
scope: serviceWorkerBase,
})
.then((registration) => registration.update())
.catch(() => {});
});
}
</script>
</body>
</html>