Files

45 lines
1.5 KiB
HTML

<!doctype html>
<html lang="en">
<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>Archie</title>
<script>
// Set before the first paint so a reload does not flash the wrong
// palette or layout. Kept in sync with the appearance Pinia store;
// blocked site data falls back to the OS theme, comfortable spacing and
// the system motion preference.
(function () {
var theme = "dark";
try {
theme = matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light";
} catch (e) {
/* dark stands */
}
try {
var storedTheme = localStorage.getItem("archie.theme");
if (storedTheme === "light" || storedTheme === "dark") {
theme = storedTheme;
}
if (localStorage.getItem("archie.density") === "compact") {
document.documentElement.dataset.density = "compact";
}
if (localStorage.getItem("archie.motion") === "reduced") {
document.documentElement.dataset.motion = "reduced";
}
} catch (e) {
/* default stands */
}
document.documentElement.dataset.theme = theme;
})();
</script>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>