app structure
This commit is contained in:
29
src/routes/(app)/+layout.svelte
Normal file
29
src/routes/(app)/+layout.svelte
Normal file
@@ -0,0 +1,29 @@
|
||||
<script lang="ts">
|
||||
import favicon from '#lib/assets/favicon.svg';
|
||||
import type { LayoutProps } from './$types';
|
||||
import AppSidebar from '#lib/components/app-sidebar.svelte';
|
||||
import SiteHeader from '#lib/components/site-header.svelte';
|
||||
import * as Sidebar from '#lib/components/ui/sidebar/index.ts';
|
||||
|
||||
let { children }: LayoutProps = $props();
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<link rel="icon" href={favicon} />
|
||||
</svelte:head>
|
||||
|
||||
<Sidebar.Provider
|
||||
style="--sidebar-width: calc(var(--spacing) * 72); --header-height: calc(var(--spacing) * 12);"
|
||||
>
|
||||
<AppSidebar variant="inset" />
|
||||
<Sidebar.Inset>
|
||||
<SiteHeader />
|
||||
<div class="flex flex-1 flex-col">
|
||||
<div class="@container/main flex flex-1 flex-col gap-2">
|
||||
<div class="flex flex-col gap-4 py-4 md:gap-6 md:py-6">
|
||||
{@render children()}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Sidebar.Inset>
|
||||
</Sidebar.Provider>
|
||||
12
src/routes/(app)/dashboard/+page.svelte
Normal file
12
src/routes/(app)/dashboard/+page.svelte
Normal file
@@ -0,0 +1,12 @@
|
||||
<script>
|
||||
import ChartAreaInteractive from "#lib/components/chart-area-interactive.svelte";
|
||||
import DataTable from "#lib/components/data-table.svelte";
|
||||
import SectionCards from "#lib/components/section-cards.svelte";
|
||||
import data from "./data";
|
||||
|
||||
</script>
|
||||
<SectionCards />
|
||||
<div class="px-4 lg:px-6">
|
||||
<ChartAreaInteractive />
|
||||
</div>
|
||||
<DataTable {data} />
|
||||
15
src/routes/(public)/+layout.svelte
Normal file
15
src/routes/(public)/+layout.svelte
Normal file
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import '../layout.css';
|
||||
import favicon from '#lib/assets/favicon.svg';
|
||||
import type { LayoutProps } from './$types';
|
||||
|
||||
let { children }: LayoutProps = $props();
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<link rel="icon" href={favicon} />
|
||||
</svelte:head>
|
||||
|
||||
<div class="p-4">
|
||||
{@render children()}
|
||||
</div>
|
||||
1
src/routes/(public)/login/+page.svelte
Normal file
1
src/routes/(public)/login/+page.svelte
Normal file
@@ -0,0 +1 @@
|
||||
<h1>Login Page</h1>
|
||||
1
src/routes/(public)/rsvp/[token]/+page.svelte
Normal file
1
src/routes/(public)/rsvp/[token]/+page.svelte
Normal file
@@ -0,0 +1 @@
|
||||
<h1>RSVP with Unique Token</h1>
|
||||
@@ -4,4 +4,4 @@
|
||||
import { Button } from "#lib/components/ui/button/index.js";
|
||||
</script>
|
||||
|
||||
<Button href="/dashboard-01">Click me</Button>
|
||||
<Button href="/dashboard">Click me</Button>
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
<script lang="ts">
|
||||
import * as Sidebar from "#lib/components/ui/sidebar/index.js";
|
||||
import AppSidebar from "#lib/components/app-sidebar.svelte";
|
||||
import ChartAreaInteractive from "#lib/components/chart-area-interactive.svelte";
|
||||
import DataTable from "#lib/components/data-table.svelte";
|
||||
import SectionCards from "#lib/components/section-cards.svelte";
|
||||
import SiteHeader from "#lib/components/site-header.svelte";
|
||||
import data from "./data.js";
|
||||
</script>
|
||||
|
||||
<Sidebar.Provider
|
||||
style="--sidebar-width: calc(var(--spacing) * 72); --header-height: calc(var(--spacing) * 12);"
|
||||
>
|
||||
<AppSidebar variant="inset" />
|
||||
<Sidebar.Inset>
|
||||
<SiteHeader />
|
||||
<div class="flex flex-1 flex-col">
|
||||
<div class="@container/main flex flex-1 flex-col gap-2">
|
||||
<div class="flex flex-col gap-4 py-4 md:gap-6 md:py-6">
|
||||
<SectionCards />
|
||||
<div class="px-4 lg:px-6">
|
||||
<ChartAreaInteractive />
|
||||
</div>
|
||||
<DataTable {data} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Sidebar.Inset>
|
||||
</Sidebar.Provider>
|
||||
Reference in New Issue
Block a user