Files
fusion/packages/dashboard/app/index.html
gsxdsm fe73a23731 feat(FN-839): add nord, dracula, gruvbox, and tokyo-night color themes
- Add new theme IDs (nord, dracula, gruvbox, tokyo-night) to core types and ThemeSelector component
- Add CSS custom properties for all four themes covering background, text, accent, border, and surface colors
- Add theme validation sync, bootstrap logic, and unit tests for ThemeSelector and useTheme hook
- Update GitManagerModal to support new theme-aware styling
- Update README theme system documentation with expanded theme list
- Add changeset for published package
2026-04-04 02:44:58 -07:00

34 lines
1.5 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Fusion</title>
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<script>
// Theme initialization - runs before React to prevent flash
(function() {
try {
var mode = localStorage.getItem('kb-dashboard-theme-mode') || 'dark';
var colorTheme = localStorage.getItem('kb-dashboard-color-theme') || 'default';
var validThemes = ['default', 'ocean', 'forest', 'sunset', 'zen', 'berry', 'high-contrast', 'industrial', 'monochrome', 'solarized', 'factory', 'ayu', 'one-dark', 'nord', 'dracula', 'gruvbox', 'tokyo-night'];
if (!validThemes.includes(colorTheme)) {
colorTheme = 'default';
}
var systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
var effectiveMode = mode === 'system' ? (systemDark ? 'dark' : 'light') : mode;
document.documentElement.setAttribute('data-theme', effectiveMode);
document.documentElement.setAttribute('data-color-theme', colorTheme);
} catch (e) {
document.documentElement.setAttribute('data-theme', 'dark');
document.documentElement.setAttribute('data-color-theme', 'default');
}
})();
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
</body>
</html>