feat(frontend): add root layout with auth guard and bottom navbar

Adds +layout.ts auth guard (redirects to /login when no token).
Adds bottom navbar with inline SVGs for Categories/Tags/Files/Pools/
Settings, active-route highlight (#343249), muted-to-bright color
transition. Adds theme store (dark/light, persisted to localStorage,
applies data-theme attribute). Hides navbar on /login route.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 03:21:00 +03:00
parent e21d0ef67b
commit 7770960cbf
9 changed files with 190 additions and 5 deletions
+16
View File
@@ -0,0 +1,16 @@
import { get } from 'svelte/store';
import { redirect } from '@sveltejs/kit';
import { browser } from '$app/environment';
import { authStore } from '$lib/stores/auth';
export const ssr = false;
export const load = ({ url }: { url: URL }) => {
if (!browser) return;
if (url.pathname === '/login') return;
const { accessToken } = get(authStore);
if (!accessToken) {
redirect(307, '/login');
}
};