Files
familienarchiv/frontend/src/routes/admin/groups/+layout.svelte
Marcel 3c54401bb2 feat(admin): responsive entity nav and collapsible list panels (Phase 9)
EntityNav: hidden on mobile, 48px icon strip at tablet (md), full labels+counts at desktop (lg).
Each list panel collapses to a 32px handle via localStorage-persisted state; auto-collapses when
navigating to the "+New" route. Mobile routing hides the list panel when a detail route is active.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 07:19:41 +02:00

18 lines
577 B
Svelte

<script lang="ts">
import { page } from '$app/state';
import GroupsListPanel from './GroupsListPanel.svelte';
let { data, children } = $props();
const autoCollapse = $derived(page.url.pathname === '/admin/groups/new');
const isAtListRoot = $derived(page.url.pathname === '/admin/groups');
</script>
<div class="{isAtListRoot ? 'flex' : 'hidden'} flex-shrink-0 md:flex">
<GroupsListPanel groups={data.groups} autocollapse={autoCollapse} />
</div>
<div class="{isAtListRoot ? 'hidden' : 'flex'} min-w-0 flex-1 flex-col overflow-hidden md:flex">
{@render children()}
</div>