MyKindlebox/mykindlebox/client/index.html

45 lines
1.9 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#faf8ff" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<!-- Apply the cached theme before first paint to avoid a flash of the
default palette. The backend `settings.theme` is the source of truth
(synced across devices) and reconciles this once it loads; this just
restores the last-known choice instantly. Mirrors parseTheme() in
src/lib/theme.js — keep the palette/mode ids in sync. -->
<script>
(function () {
var palette = 'confetti', mode = 'system'
try {
var t = localStorage.getItem('mykindlebox-theme')
if (t === 'midnight') t = 'confetti-dark'
var parts = (t || '').split('-')
if (['confetti', 'meadow'].indexOf(parts[0]) !== -1 && ['system', 'light', 'dark'].indexOf(parts[1]) !== -1) {
palette = parts[0]
mode = parts[1]
}
} catch (e) {}
if (mode === 'system') {
mode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
}
document.documentElement.dataset.theme = palette + '-' + mode
})()
</script>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500..800&family=Figtree:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap"
rel="stylesheet"
/>
<title>MyKindlebox</title>
</head>
<body class="font-body">
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>