39 lines
1.7 KiB
HTML
39 lines
1.7 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>OpenSquilla</title>
|
|
<meta name="description" content="OpenSquilla - microkernel control console" />
|
|
<link rel="icon" type="image/png" href="./opensquilla-mark.png" />
|
|
<!-- Anti-flash: stamp the active theme on <html> before first paint, so a
|
|
light/system-light or custom-palette user never sees the :root (dark)
|
|
ground flash to their real theme on cold load. Mirrors the store's
|
|
resolution (localStorage 'opensquilla-theme'; 'system'/absent → OS
|
|
preference). The eager per-theme token block then paints correctly on
|
|
the very first frame; the store re-applies the same value on mount. -->
|
|
<script>
|
|
(function () {
|
|
try {
|
|
var t = localStorage.getItem('opensquilla-theme')
|
|
// Renamed ids persisted before the rename resolve to their current id
|
|
// (kept in sync with LEGACY_THEME_IDS in src/themes/registry.ts) so a
|
|
// legacy choice paints correctly on the very first frame.
|
|
var legacy = { nord: 'arctic', phosphor: 'crt-green' }
|
|
if (t && legacy[t]) t = legacy[t]
|
|
if (!t || t === 'system') {
|
|
t = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
|
}
|
|
document.documentElement.setAttribute('data-theme', t)
|
|
} catch (e) {
|
|
/* private-mode / disabled storage: fall through to the :root default */
|
|
}
|
|
})()
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
<script type="module" src="/src/main.ts"></script>
|
|
</body>
|
|
</html>
|