feat(theme): add theme toggle functionality and initialize theme state
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user