feat(theme): add theme toggle functionality and initialize theme state

This commit is contained in:
2025-11-04 22:27:31 -06:00
parent dd566f408b
commit d2ae76ef81
2 changed files with 62 additions and 1 deletions

View File

@@ -1,10 +1,19 @@
<!doctype html>
<html lang="%paraglide.lang%" class="dark">
<html lang="%paraglide.lang%">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Anexo76 - Gestión de Comercio Exterior</title>
<meta name="description" content="Plataforma SaaS para gestión de comercio exterior conforme a Anexos 24, 31 y 22 del SAT" />
<script>
// Cargar el tema antes de renderizar para evitar flash
(function() {
const theme = localStorage.getItem('theme') || 'dark';
if (theme === 'dark') {
document.documentElement.classList.add('dark');
}
})();
</script>
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">