feat(shell): add route groups, layout server load, redirect, and placeholder pages

- (app) group with AppShell layout, loads user/household from locals
- (public) group with full-viewport split layout, /login placeholder
- Root / redirects to /planner for authenticated users
- Placeholder stubs for planner, recipes, shopping, settings, members

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-02 13:22:34 +02:00
parent 7a17873046
commit 9626bde694
12 changed files with 44 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
import TabletNavBar from './TabletNavBar.svelte';
import DesktopSidebar from './DesktopSidebar.svelte';
let { appName, householdName, children }: { appName: string; householdName: string; children: Snippet } = $props();
let { appName, householdName, children }: { appName: string; householdName: string; children?: Snippet } = $props();
</script>
<div class="flex min-h-screen bg-[var(--color-page)]">

View File

@@ -0,0 +1,8 @@
import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = async ({ locals }) => {
return {
benutzer: locals.benutzer!,
haushalt: locals.haushalt!
};
};

View File

@@ -0,0 +1,9 @@
<script lang="ts">
import AppShell from '$lib/nav/AppShell.svelte';
let { data, children } = $props();
</script>
<AppShell appName="Mealprep" householdName={data.haushalt.name}>
{@render children()}
</AppShell>

View File

@@ -0,0 +1 @@
<h1 class="text-2xl font-medium p-6">Mitglieder</h1>

View File

@@ -0,0 +1 @@
<h1 class="text-2xl font-medium p-6">Planer</h1>

View File

@@ -0,0 +1 @@
<h1 class="text-2xl font-medium p-6">Rezepte</h1>

View File

@@ -0,0 +1 @@
<h1 class="text-2xl font-medium p-6">Einstellungen</h1>

View File

@@ -0,0 +1 @@
<h1 class="text-2xl font-medium p-6">Einkaufsliste</h1>

View File

@@ -0,0 +1,12 @@
<script>
let { children } = $props();
</script>
<div class="flex min-h-screen">
<div class="hidden md:flex md:w-1/2 bg-[var(--green)] items-center justify-center">
<span class="font-[var(--font-display)] text-4xl text-white font-medium">Mealprep</span>
</div>
<div class="flex-1 flex items-center justify-center p-6">
{@render children()}
</div>
</div>

View File

@@ -0,0 +1,2 @@
<h1 class="text-2xl font-medium">Anmelden</h1>
<p class="text-[var(--color-text-muted)] mt-2">Login-Formular folgt.</p>

View File

@@ -0,0 +1,6 @@
import { redirect } from '@sveltejs/kit';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async () => {
redirect(302, '/planner');
};

View File

@@ -0,0 +1 @@
<p>Weiterleitung...</p>