Files
frontend-svelte/src/app/ui/Layout.svelte

53 lines
1.7 KiB
Svelte
Raw Normal View History

<script lang="ts">
/**
* Layout Component
*
* Root layout wrapper that provides the application shell structure. Handles favicon,
* sidebar provider initialization, and renders child routes with consistent structure.
*
* Layout structure:
* - Header area (currently empty, reserved for future use)
* - Collapsible sidebar with main content area
* - Footer area (currently empty, reserved for future use)
*
* Uses Sidebar.Provider to enable mobile-responsive collapsible sidebar behavior
* throughout the application.
*/
import favicon from '$shared/assets/favicon.svg';
2026-01-24 15:32:01 +03:00
import { Provider as TooltipProvider } from '$shared/shadcn/ui/tooltip';
import { TypographyMenu } from '$widgets/TypographySettings';
import type { Snippet } from 'svelte';
interface Props {
children: Snippet;
}
/** Slot content for route pages to render */
2026-01-24 15:32:01 +03:00
let { children }: Props = $props();
</script>
<svelte:head>
<link rel="icon" href={favicon} />
<link rel="preconnect" href="https://api.fontshare.com" />
<link rel="preconnect" href="https://cdn.fontshare.com" crossorigin="anonymous" />
2026-01-22 15:31:59 +03:00
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous">
<link
href="https://fonts.googleapis.com/css2?family=Karla:ital,wght@0,200..800;1,200..800&display=swap"
rel="stylesheet"
>
</svelte:head>
2026-01-24 15:32:01 +03:00
<div id="app-root" class="min-h-screen flex flex-col bg-background">
<header></header>
2026-01-24 15:32:01 +03:00
<main class="flex-1 w-full max-w-5xl mx-auto px-4 py-6 md:px-8 lg:py-10">
<TooltipProvider>
<TypographyMenu />
{@render children?.()}
2026-01-24 15:32:01 +03:00
</TooltipProvider>
</main>
<footer></footer>
</div>