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:
8
frontend/src/routes/(app)/+layout.server.ts
Normal file
8
frontend/src/routes/(app)/+layout.server.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { LayoutServerLoad } from './$types';
|
||||
|
||||
export const load: LayoutServerLoad = async ({ locals }) => {
|
||||
return {
|
||||
benutzer: locals.benutzer!,
|
||||
haushalt: locals.haushalt!
|
||||
};
|
||||
};
|
||||
9
frontend/src/routes/(app)/+layout.svelte
Normal file
9
frontend/src/routes/(app)/+layout.svelte
Normal 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>
|
||||
1
frontend/src/routes/(app)/members/+page.svelte
Normal file
1
frontend/src/routes/(app)/members/+page.svelte
Normal file
@@ -0,0 +1 @@
|
||||
<h1 class="text-2xl font-medium p-6">Mitglieder</h1>
|
||||
1
frontend/src/routes/(app)/planner/+page.svelte
Normal file
1
frontend/src/routes/(app)/planner/+page.svelte
Normal file
@@ -0,0 +1 @@
|
||||
<h1 class="text-2xl font-medium p-6">Planer</h1>
|
||||
1
frontend/src/routes/(app)/recipes/+page.svelte
Normal file
1
frontend/src/routes/(app)/recipes/+page.svelte
Normal file
@@ -0,0 +1 @@
|
||||
<h1 class="text-2xl font-medium p-6">Rezepte</h1>
|
||||
1
frontend/src/routes/(app)/settings/+page.svelte
Normal file
1
frontend/src/routes/(app)/settings/+page.svelte
Normal file
@@ -0,0 +1 @@
|
||||
<h1 class="text-2xl font-medium p-6">Einstellungen</h1>
|
||||
1
frontend/src/routes/(app)/shopping/+page.svelte
Normal file
1
frontend/src/routes/(app)/shopping/+page.svelte
Normal file
@@ -0,0 +1 @@
|
||||
<h1 class="text-2xl font-medium p-6">Einkaufsliste</h1>
|
||||
Reference in New Issue
Block a user