38 lines
1.6 KiB
HTML
38 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" class="dark">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="icon" type="image/png" href="/img/logo.png">
|
|
<link rel="apple-touch-icon" href="/img/apple-touch-icon.png">
|
|
<meta name="theme-color" content="#18181b">
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
<meta name="apple-mobile-web-app-title" content="BillTracker">
|
|
<title>Bill Tracker</title>
|
|
<script>
|
|
// Pre-bundle theme apply — avoids a light/dark flash. Mirrors applyTheme in
|
|
// client/contexts/ThemeContext.tsx (theme 'system' follows the OS).
|
|
(function () {
|
|
try {
|
|
var s = localStorage.getItem('bt-theme');
|
|
if (s === 'dark-purple') s = 'dark';
|
|
var theme = (s === 'light' || s === 'dark' || s === 'system') ? s : 'dark';
|
|
var resolved = theme === 'system'
|
|
? ((window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light')
|
|
: theme;
|
|
var root = document.documentElement;
|
|
if (resolved === 'dark') root.classList.add('dark'); else root.classList.remove('dark');
|
|
var m = document.querySelector('meta[name="theme-color"]');
|
|
if (m) m.setAttribute('content', resolved === 'dark' ? '#18181b' : '#ffffff');
|
|
} catch (e) { /* localStorage/matchMedia unavailable — keep default */ }
|
|
})();
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="/client/main.tsx"></script>
|
|
</body>
|
|
</html>
|