mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-18 14:44:21 +01:00
33 lines
1.0 KiB
HTML
33 lines
1.0 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>Goose</title>
|
|
<script>
|
|
// Initialize theme before any content loads
|
|
(function() {
|
|
function initializeTheme() {
|
|
const useSystemTheme = localStorage.getItem('use_system_theme') === 'true';
|
|
const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
const savedTheme = localStorage.getItem('theme');
|
|
const isDark = useSystemTheme ? systemPrefersDark : (savedTheme ? savedTheme === 'dark' : systemPrefersDark);
|
|
|
|
if (isDark) {
|
|
document.documentElement.classList.add('dark');
|
|
} else {
|
|
document.documentElement.classList.remove('dark');
|
|
}
|
|
}
|
|
|
|
// Run immediately
|
|
initializeTheme();
|
|
})();
|
|
</script>
|
|
<link href="./src/styles/main.css" rel="stylesheet" />
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="./src/renderer.tsx"></script>
|
|
</body>
|
|
</html>
|