Werkstatt-App: öffentliche PWA und Redaktions-Backend
Werbefreie, barrierearme Info-App für Werkstätten (WfbM) auf Basis von SvelteKit, Tailwind, SQLite/Drizzle: - App: Startseite mit Kacheln, Meldungen, Seitenbaum, Termine inkl. Schließzeiten und iCal-Abo, Ansprechpartner, Suche, Kontaktformular, Merkliste, Vorlesen, Leichte Sprache, Schriftgrößen, Hell/Dunkel, PWA - Redaktion: Dashboard, Meldungen, Seiten, Termine, Kacheln, Ansprechpartner, Mediathek mit Bildoptimierung, Postfach, Benutzer mit Rollen, Einstellungen (Name, Logo, Farbe, Rechtstexte) - Demo-Seed, CLI zum Anlegen von Benutzern, Dockerfile und Compose Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4f145116d8
commit
bef8574e07
143 changed files with 13518 additions and 1 deletions
111
src/lib/components/MenuSheet.svelte
Normal file
111
src/lib/components/MenuSheet.svelte
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
<script lang="ts">
|
||||
import X from '@lucide/svelte/icons/x';
|
||||
import Users from '@lucide/svelte/icons/users';
|
||||
import Mail from '@lucide/svelte/icons/mail';
|
||||
import SlidersHorizontal from '@lucide/svelte/icons/sliders-horizontal';
|
||||
import ExternalLink from '@lucide/svelte/icons/external-link';
|
||||
import Scale from '@lucide/svelte/icons/scale';
|
||||
import ShieldCheck from '@lucide/svelte/icons/shield-check';
|
||||
import ChevronRight from '@lucide/svelte/icons/chevron-right';
|
||||
import Icon from './Icon.svelte';
|
||||
import PrefsControls from './PrefsControls.svelte';
|
||||
import type { PageCard } from '$lib/types';
|
||||
|
||||
let { open = $bindable(false), pages, website }: { open: boolean; pages: PageCard[]; website: string } = $props();
|
||||
|
||||
let dialog: HTMLDialogElement;
|
||||
|
||||
$effect(() => {
|
||||
if (open && !dialog.open) dialog.showModal();
|
||||
if (!open && dialog.open) dialog.close();
|
||||
});
|
||||
</script>
|
||||
|
||||
<dialog
|
||||
bind:this={dialog}
|
||||
onclose={() => (open = false)}
|
||||
onclick={(e) => e.target === dialog && (open = false)}
|
||||
class="sheet m-0 ml-auto h-dvh max-h-dvh w-full max-w-md bg-bg text-ink p-0 backdrop:bg-black/40 backdrop:backdrop-blur-sm"
|
||||
aria-label="Menü"
|
||||
>
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex items-center justify-between px-5 h-16 safe-top border-b border-line/60">
|
||||
<h2 class="font-display text-xl font-bold">Menü</h2>
|
||||
<button class="btn btn-ghost btn-icon" aria-label="Menü schließen" onclick={() => (open = false)}>
|
||||
<X class="size-6" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 overflow-y-auto px-5 py-5 space-y-7 safe-bottom">
|
||||
{#if pages.length}
|
||||
<section>
|
||||
<h3 class="eyebrow mb-3">Bereiche</h3>
|
||||
<ul class="card divide-y divide-line/70 overflow-hidden">
|
||||
{#each pages as p (p.id)}
|
||||
<li>
|
||||
<a href="/s/{p.slug}" class="tone-{p.color} flex items-center gap-3 px-4 py-3 hover:bg-surface-2">
|
||||
<span class="grid place-items-center size-9 rounded-xl bg-tone-soft text-tone-ink">
|
||||
<Icon name={p.icon} class="size-5" />
|
||||
</span>
|
||||
<span class="flex-1 font-semibold">{p.title}</span>
|
||||
<ChevronRight class="size-5 text-ink-3" />
|
||||
</a>
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
<section>
|
||||
<h3 class="eyebrow mb-3">Anzeige</h3>
|
||||
<div class="card p-4">
|
||||
<PrefsControls compact />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3 class="eyebrow mb-3">Service</h3>
|
||||
<ul class="card divide-y divide-line/70 overflow-hidden">
|
||||
{#each [
|
||||
{ href: '/kontakte', label: 'Ansprechpartner', icon: Users },
|
||||
{ href: '/kontakt', label: 'Nachricht schreiben', icon: Mail },
|
||||
{ href: '/einstellungen', label: 'Einstellungen', icon: SlidersHorizontal },
|
||||
{ href: '/impressum', label: 'Impressum', icon: Scale },
|
||||
{ href: '/datenschutz', label: 'Datenschutz', icon: ShieldCheck }
|
||||
] as l (l.href)}
|
||||
<li>
|
||||
<a href={l.href} class="flex items-center gap-3 px-4 py-3 hover:bg-surface-2">
|
||||
<l.icon class="size-5 text-ink-2" />
|
||||
<span class="flex-1 font-medium">{l.label}</span>
|
||||
<ChevronRight class="size-5 text-ink-3" />
|
||||
</a>
|
||||
</li>
|
||||
{/each}
|
||||
{#if website}
|
||||
<li>
|
||||
<a href={website} target="_blank" rel="noopener" class="flex items-center gap-3 px-4 py-3 hover:bg-surface-2">
|
||||
<ExternalLink class="size-5 text-ink-2" />
|
||||
<span class="flex-1 font-medium">Unsere Website</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<style>
|
||||
.sheet[open] {
|
||||
animation: slide-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
}
|
||||
.sheet[open]::backdrop {
|
||||
animation: fade-in 0.28s ease;
|
||||
}
|
||||
@keyframes slide-in {
|
||||
from { transform: translateX(100%); }
|
||||
}
|
||||
@keyframes fade-in {
|
||||
from { opacity: 0; }
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue