Layout nach Intranet-Vorbild: einzeiliger Header, Begrüßungskarte, Schnellzugriff-Leiste
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 58s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m4s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m3s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m10s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m8s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m5s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m4s
CI / Build-Artefakte aktuell (pull_request) Failing after 41s
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 58s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m4s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m3s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m10s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m8s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m5s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m4s
CI / Build-Artefakte aktuell (pull_request) Failing after 41s
- Header einzeilig mit Navigation neben dem Logo, Suche rechts, mobil als Menü (Sheet) - Begrüßungskarte mit Foto rechts und Aktionsleiste darunter - Schnellzugriffe als blätterbare Kachelreihe - Raster auf Mobilgeräten repariert (Spalten wuchsen mit breitem Inhalt mit) - Telefonnummern im Admin: übliche deutsche Schreibweisen wie „+49 (0) 30 …“ werden akzeptiert Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5a3f1f34c7
commit
f813a0fff3
48 changed files with 518 additions and 165 deletions
|
|
@ -1,7 +1,8 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { Head, Link, router, usePage } from '@inertiajs/vue3';
|
||||
import { ChevronDown, LogOut, Monitor, Moon, Search, Settings, Sun, UserRound, UserRoundPen } from '@lucide/vue';
|
||||
import { ChevronDown, LogOut, Menu, Monitor, Moon, Search, Settings, Sun, UserRound, UserRoundPen } from '@lucide/vue';
|
||||
import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from '@/components/ui/sheet';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
|
|
@ -26,6 +27,7 @@ const user = computed(() => page.props.auth.user);
|
|||
const navigation = computed(() => page.props.navigation);
|
||||
const { preference, setPreference } = useThemePreference();
|
||||
|
||||
const mobileNavOpen = ref(false);
|
||||
const search = ref(new URLSearchParams(page.url.split('?')[1] ?? '').get('q') ?? '');
|
||||
|
||||
function submitSearch() {
|
||||
|
|
@ -44,41 +46,81 @@ const themeOptions = [
|
|||
|
||||
<div class="min-h-screen">
|
||||
<header class="sticky top-0 z-40 border-b bg-card/95 backdrop-blur supports-[backdrop-filter]:bg-card/85">
|
||||
<div class="mx-auto flex h-16 max-w-[1440px] items-center gap-4 px-4 lg:px-6">
|
||||
<div class="mx-auto flex h-16 max-w-[1440px] items-center gap-2 px-4 lg:gap-6 lg:px-6">
|
||||
<Sheet v-model:open="mobileNavOpen">
|
||||
<SheetTrigger class="-ml-2 grid size-10 place-items-center rounded-md text-foreground/80 hover:bg-accent lg:hidden" aria-label="Menü öffnen">
|
||||
<Menu class="size-5" />
|
||||
</SheetTrigger>
|
||||
<SheetContent side="left" class="w-72 p-0">
|
||||
<SheetHeader class="border-b px-5 py-4">
|
||||
<SheetTitle class="text-left"><BrandLogo /></SheetTitle>
|
||||
</SheetHeader>
|
||||
<nav class="grid gap-1 p-3" aria-label="Hauptnavigation">
|
||||
<Link
|
||||
v-for="item in navigation"
|
||||
:key="item.href"
|
||||
:href="item.href"
|
||||
class="rounded-md px-3 py-2.5 text-[15px] font-medium"
|
||||
:class="item.active ? 'bg-brand-soft text-brand-soft-foreground' : 'text-foreground/80 hover:bg-accent'"
|
||||
@click="mobileNavOpen = false"
|
||||
>
|
||||
{{ item.label }}
|
||||
</Link>
|
||||
</nav>
|
||||
</SheetContent>
|
||||
</Sheet>
|
||||
|
||||
<Link href="/" class="shrink-0 text-foreground" aria-label="Startseite">
|
||||
<BrandLogo />
|
||||
</Link>
|
||||
|
||||
<form class="mx-auto hidden w-full max-w-lg md:block" role="search" @submit.prevent="submitSearch">
|
||||
<label class="relative block">
|
||||
<span class="sr-only">Personen suchen</span>
|
||||
<Search class="pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" />
|
||||
<input
|
||||
v-model="search"
|
||||
type="search"
|
||||
placeholder="Personen suchen …"
|
||||
class="h-10 w-full rounded-md border border-input bg-background pr-3 pl-9 text-sm placeholder:text-muted-foreground focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none"
|
||||
/>
|
||||
</label>
|
||||
</form>
|
||||
<nav class="hidden h-full lg:block" aria-label="Hauptnavigation">
|
||||
<ul class="flex h-full items-stretch gap-1">
|
||||
<li v-for="item in navigation" :key="item.href" class="flex">
|
||||
<Link
|
||||
:href="item.href"
|
||||
class="relative flex items-center px-3 text-sm font-medium whitespace-nowrap transition-colors"
|
||||
:class="item.active ? 'text-foreground' : 'text-foreground/70 hover:text-foreground'"
|
||||
:aria-current="item.active ? 'page' : undefined"
|
||||
>
|
||||
{{ item.label }}
|
||||
<span v-if="item.active" class="absolute inset-x-3 bottom-0 h-[3px] rounded-t-full bg-brand" />
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="ml-auto flex items-center gap-1 md:ml-0">
|
||||
<Link href="/personen" class="grid size-10 place-items-center rounded-md text-muted-foreground hover:bg-accent md:hidden" aria-label="Personen suchen">
|
||||
<div class="ml-auto flex items-center gap-1">
|
||||
<form class="mr-2 hidden w-64 md:block xl:w-80" role="search" @submit.prevent="submitSearch">
|
||||
<label class="relative block">
|
||||
<span class="sr-only">Personen suchen</span>
|
||||
<Search class="pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" />
|
||||
<input
|
||||
v-model="search"
|
||||
type="search"
|
||||
placeholder="Personen suchen …"
|
||||
class="h-10 w-full rounded-md border border-input bg-card pr-3 pl-9 text-sm shadow-xs placeholder:text-muted-foreground focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none"
|
||||
/>
|
||||
</label>
|
||||
</form>
|
||||
|
||||
<Link href="/personen" class="grid size-10 place-items-center rounded-md text-foreground/70 hover:bg-accent hover:text-foreground md:hidden" aria-label="Personen suchen">
|
||||
<Search class="size-5" />
|
||||
</Link>
|
||||
|
||||
<a
|
||||
v-if="user.is_admin"
|
||||
href="/admin"
|
||||
class="hidden h-10 items-center gap-2 rounded-md px-3 text-sm font-medium text-foreground/80 hover:bg-accent hover:text-foreground lg:inline-flex"
|
||||
class="grid size-10 place-items-center rounded-md text-foreground/70 hover:bg-accent hover:text-foreground"
|
||||
aria-label="Administration"
|
||||
title="Administration"
|
||||
>
|
||||
<Settings class="size-[18px]" />
|
||||
Administration
|
||||
<Settings class="size-5" />
|
||||
</a>
|
||||
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger
|
||||
class="flex items-center gap-2 rounded-full py-1 pr-2 pl-1 hover:bg-accent focus-visible:ring-3 focus-visible:ring-ring/40 focus-visible:outline-none"
|
||||
class="ml-1 flex items-center gap-1.5 rounded-full py-1 pr-1.5 pl-1 hover:bg-accent focus-visible:ring-3 focus-visible:ring-ring/40 focus-visible:outline-none"
|
||||
:aria-label="`Menü für ${user.name}`"
|
||||
>
|
||||
<PersonAvatar :person="user" class="size-9" />
|
||||
|
|
@ -118,22 +160,6 @@ const themeOptions = [
|
|||
</DropdownMenu>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="mx-auto max-w-[1440px] overflow-x-auto px-4 lg:px-6" aria-label="Hauptnavigation">
|
||||
<ul class="flex h-12 items-stretch gap-6">
|
||||
<li v-for="item in navigation" :key="item.href" class="flex">
|
||||
<Link
|
||||
:href="item.href"
|
||||
class="relative flex items-center text-sm font-medium whitespace-nowrap transition-colors"
|
||||
:class="item.active ? 'text-brand-text' : 'text-foreground/70 hover:text-foreground'"
|
||||
:aria-current="item.active ? 'page' : undefined"
|
||||
>
|
||||
{{ item.label }}
|
||||
<span v-if="item.active" class="absolute inset-x-0 bottom-0 h-0.5 rounded-full bg-brand" />
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="mx-auto max-w-[1440px] px-4 py-6 lg:px-6 lg:py-8">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue