Private
Public Access
primer draft de la pagina
This commit is contained in:
1 parent
02a6c846dc
commit
fcc3952841
42 files changed
+1248
No files matched your search
@@ -0,0 +1,25 @@
|
||||
<script lang="ts">
|
||||
import './layout.css';
|
||||
import 'carbon-components-svelte/css/all.css';
|
||||
import favicon from '$lib/assets/favicon.svg';
|
||||
import { getToken } from '$lib/api';
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
let { children } = $props();
|
||||
let theme = 'g100'; // "white" | "g10" | "g80" | "g90" | "g100"
|
||||
let token = $state(getToken());
|
||||
|
||||
$effect(() => {
|
||||
if (!token) {
|
||||
goto('/login');
|
||||
}
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
document.documentElement.setAttribute('theme', theme);
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head><link rel="icon" href={favicon} /></svelte:head>
|
||||
|
||||
{@render children()}
|
||||
Reference in new issue
Block a user