Neues Design: Tailwind + shadcn-vue statt Vuetify/Material 3
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 1m3s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m7s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 1m16s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 1m20s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m29s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m33s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 1m28s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m33s
CI / Build-Artefakte aktuell (pull_request) Failing after 52s
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 1m3s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m7s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 1m16s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 1m20s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m29s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m33s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 1m28s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m33s
CI / Build-Artefakte aktuell (pull_request) Failing after 52s
- Nüchterne, professionelle Optik: neutrale Flächen, Markenfarbe nur als Akzent, Inter-Schrift (lokal) - Zweizeiliger Header mit Suche, Hauptnavigation und Avatar-Menü - Startseite mit Begrüßungskarte, Schnellzugriffen und „Neu im Team“ - Personenverzeichnis mit Suche, Abteilungsfilter und Seitenaufteilung - Markenfarbe exakt übernommen, Abstufungen serverseitig in OKLCH (ColorPalette) – gemeinsam für Portal und Admin, keine Farbberechnung im Browser - Schnellzugriffe im Admin pflegbar - Filament-Avatare lokal statt über ui-avatars.com (DSGVO) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9c0f8de791
commit
5a3f1f34c7
141 changed files with 3873 additions and 974 deletions
|
|
@ -1,21 +1,21 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { Link, router, usePage } from '@inertiajs/vue3';
|
||||
import { useDisplay } from 'vuetify';
|
||||
import { Head, Link, router, usePage } from '@inertiajs/vue3';
|
||||
import { ChevronDown, LogOut, Monitor, Moon, Search, Settings, Sun, UserRound, UserRoundPen } from '@lucide/vue';
|
||||
import {
|
||||
mdiAccountCircleOutline,
|
||||
mdiAccountEditOutline,
|
||||
mdiCogOutline,
|
||||
mdiHomeOutline,
|
||||
mdiLogout,
|
||||
mdiMenu,
|
||||
mdiMonitor,
|
||||
mdiWeatherNight,
|
||||
mdiWhiteBalanceSunny,
|
||||
} from '@mdi/js';
|
||||
import BrandMark from '../components/BrandMark.vue';
|
||||
import UserAvatar from '../components/UserAvatar.vue';
|
||||
import { useThemePreference } from '../composables/useThemePreference';
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuRadioGroup,
|
||||
DropdownMenuRadioItem,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from '@/components/ui/dropdown-menu';
|
||||
import { Toaster } from '@/components/ui/sonner';
|
||||
import BrandLogo from '@/components/BrandLogo.vue';
|
||||
import PersonAvatar from '@/components/PersonAvatar.vue';
|
||||
import { useThemePreference } from '@/composables/useThemePreference';
|
||||
|
||||
defineProps({
|
||||
title: { type: String, default: '' },
|
||||
|
|
@ -23,131 +23,123 @@ defineProps({
|
|||
|
||||
const page = usePage();
|
||||
const user = computed(() => page.props.auth.user);
|
||||
const { mdAndUp } = useDisplay();
|
||||
const drawer = ref(null);
|
||||
const navigation = computed(() => page.props.navigation);
|
||||
const { preference, setPreference } = useThemePreference();
|
||||
|
||||
const navigation = [
|
||||
{ title: 'Start', icon: mdiHomeOutline, href: '/', match: (url) => url === '/' },
|
||||
{ title: 'Mein Profil', icon: mdiAccountCircleOutline, href: '/profil', match: (url) => url.startsWith(`/personen/${user.value.id}`) },
|
||||
];
|
||||
const search = ref(new URLSearchParams(page.url.split('?')[1] ?? '').get('q') ?? '');
|
||||
|
||||
function submitSearch() {
|
||||
router.get('/personen', search.value ? { q: search.value } : {});
|
||||
}
|
||||
|
||||
const themeOptions = [
|
||||
{ value: 'system', title: 'System', icon: mdiMonitor },
|
||||
{ value: 'light', title: 'Hell', icon: mdiWhiteBalanceSunny },
|
||||
{ value: 'dark', title: 'Dunkel', icon: mdiWeatherNight },
|
||||
{ value: 'system', label: 'Wie im System', icon: Monitor },
|
||||
{ value: 'light', label: 'Hell', icon: Sun },
|
||||
{ value: 'dark', label: 'Dunkel', icon: Moon },
|
||||
];
|
||||
|
||||
function isActive(item) {
|
||||
return item.match(page.url.split('?')[0]);
|
||||
}
|
||||
|
||||
// Echte Links (Mittelklick, neuer Tab) – ein normaler Klick navigiert per Inertia.
|
||||
function visit(event, href) {
|
||||
if (event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
router.visit(href);
|
||||
}
|
||||
|
||||
function logout() {
|
||||
router.post('/logout');
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-app>
|
||||
<v-app-bar>
|
||||
<v-app-bar-nav-icon v-if="!mdAndUp" :icon="mdiMenu" aria-label="Menü" @click="drawer = !drawer" />
|
||||
<v-app-bar-title>
|
||||
<Link href="/" class="brand-link">
|
||||
<BrandMark />
|
||||
<Head v-if="title" :title="title" />
|
||||
|
||||
<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">
|
||||
<Link href="/" class="shrink-0 text-foreground" aria-label="Startseite">
|
||||
<BrandLogo />
|
||||
</Link>
|
||||
</v-app-bar-title>
|
||||
|
||||
<template #append>
|
||||
<v-menu location="bottom end" :close-on-content-click="false" min-width="280">
|
||||
<template #activator="{ props: menuProps }">
|
||||
<v-btn v-bind="menuProps" icon variant="text" class="mr-2" :aria-label="`Menü für ${user.name}`">
|
||||
<UserAvatar :user="user" :size="40" />
|
||||
</v-btn>
|
||||
</template>
|
||||
<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>
|
||||
|
||||
<v-card rounded="xl" color="surface-container-high" elevation="3">
|
||||
<div class="d-flex align-center ga-4 pa-4">
|
||||
<UserAvatar :user="user" :size="56" />
|
||||
<div class="overflow-hidden">
|
||||
<div class="text-title-medium text-truncate">{{ user.name }}</div>
|
||||
<div v-if="user.job_title" class="text-body-medium text-medium-emphasis text-truncate">{{ user.job_title }}</div>
|
||||
<div class="text-body-small text-medium-emphasis text-truncate">{{ user.email }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<Search class="size-5" />
|
||||
</Link>
|
||||
|
||||
<v-divider />
|
||||
<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"
|
||||
>
|
||||
<Settings class="size-[18px]" />
|
||||
Administration
|
||||
</a>
|
||||
|
||||
<v-list bg-color="transparent" density="comfortable">
|
||||
<v-list-item :prepend-icon="mdiAccountCircleOutline" title="Mein Profil" href="/profil" @click="visit($event, '/profil')" />
|
||||
<v-list-item :prepend-icon="mdiAccountEditOutline" title="Profil bearbeiten" href="/profil/bearbeiten" @click="visit($event, '/profil/bearbeiten')" />
|
||||
<v-list-item v-if="user.is_admin" :prepend-icon="mdiCogOutline" title="Administration" href="/admin" />
|
||||
</v-list>
|
||||
|
||||
<div class="px-4 pb-2">
|
||||
<div class="text-label-large text-medium-emphasis mb-2">Darstellung</div>
|
||||
<v-btn-toggle
|
||||
:model-value="preference"
|
||||
mandatory
|
||||
divided
|
||||
variant="outlined"
|
||||
density="comfortable"
|
||||
class="w-100"
|
||||
@update:model-value="setPreference"
|
||||
>
|
||||
<v-btn v-for="option in themeOptions" :key="option.value" :value="option.value" class="flex-grow-1" :prepend-icon="option.icon">
|
||||
{{ option.title }}
|
||||
</v-btn>
|
||||
</v-btn-toggle>
|
||||
</div>
|
||||
|
||||
<v-divider class="mt-2" />
|
||||
|
||||
<v-list bg-color="transparent" density="comfortable">
|
||||
<v-list-item :prepend-icon="mdiLogout" title="Abmelden" @click="logout" />
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-menu>
|
||||
</template>
|
||||
</v-app-bar>
|
||||
|
||||
<v-navigation-drawer v-model="drawer" :permanent="mdAndUp" width="280">
|
||||
<v-list nav class="pa-3">
|
||||
<v-list-item
|
||||
v-for="item in navigation"
|
||||
:key="item.href"
|
||||
:href="item.href"
|
||||
:prepend-icon="item.icon"
|
||||
:title="item.title"
|
||||
:class="{ 'bg-secondary-container': isActive(item) }"
|
||||
:aria-current="isActive(item) ? 'page' : undefined"
|
||||
rounded="xl"
|
||||
@click="visit($event, item.href)"
|
||||
/>
|
||||
</v-list>
|
||||
</v-navigation-drawer>
|
||||
|
||||
<v-main>
|
||||
<div class="page-container pa-4 pa-md-8">
|
||||
<h1 v-if="title" class="text-headline-medium mb-6">{{ title }}</h1>
|
||||
<slot />
|
||||
<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"
|
||||
:aria-label="`Menü für ${user.name}`"
|
||||
>
|
||||
<PersonAvatar :person="user" class="size-9" />
|
||||
<ChevronDown class="size-4 text-muted-foreground" />
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end" class="w-72">
|
||||
<DropdownMenuLabel class="flex items-center gap-3 py-2 font-normal">
|
||||
<PersonAvatar :person="user" class="size-10" />
|
||||
<div class="min-w-0">
|
||||
<div class="truncate text-sm font-semibold">{{ user.name }}</div>
|
||||
<div class="truncate text-xs text-muted-foreground">{{ user.email }}</div>
|
||||
</div>
|
||||
</DropdownMenuLabel>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem as-child>
|
||||
<Link :href="`/personen/${user.id}`"><UserRound /> Mein Profil</Link>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem as-child>
|
||||
<Link href="/profil/bearbeiten"><UserRoundPen /> Profil bearbeiten</Link>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem v-if="user.is_admin" as-child>
|
||||
<a href="/admin"><Settings /> Administration</a>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuLabel class="text-xs font-medium text-muted-foreground">Darstellung</DropdownMenuLabel>
|
||||
<DropdownMenuRadioGroup :model-value="preference" @update:model-value="setPreference">
|
||||
<DropdownMenuRadioItem v-for="option in themeOptions" :key="option.value" :value="option.value">
|
||||
<component :is="option.icon" class="size-4 text-muted-foreground" />
|
||||
{{ option.label }}
|
||||
</DropdownMenuRadioItem>
|
||||
</DropdownMenuRadioGroup>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem as-child>
|
||||
<Link href="/logout" method="post" as="button" class="w-full"><LogOut /> Abmelden</Link>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</div>
|
||||
</div>
|
||||
</v-main>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.brand-link {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
<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">
|
||||
<slot />
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<Toaster position="bottom-right" />
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,25 +1,44 @@
|
|||
<script setup>
|
||||
import BrandMark from '../components/BrandMark.vue';
|
||||
import { computed } from 'vue';
|
||||
import { Head, usePage } from '@inertiajs/vue3';
|
||||
import BrandLogo from '@/components/BrandLogo.vue';
|
||||
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
title: { type: String, default: '' },
|
||||
description: { type: String, default: '' },
|
||||
});
|
||||
|
||||
const branding = computed(() => usePage().props.branding);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-app>
|
||||
<v-main class="bg-surface-container">
|
||||
<v-container class="fill-height d-flex align-center justify-center">
|
||||
<div class="w-100 mx-auto" style="max-width: 440px">
|
||||
<div class="d-flex justify-center mb-8">
|
||||
<BrandMark :height="48" />
|
||||
</div>
|
||||
<v-card rounded="xl" color="surface" class="pa-4 pa-sm-8">
|
||||
<h1 v-if="title" class="text-headline-small mb-6">{{ title }}</h1>
|
||||
<slot />
|
||||
</v-card>
|
||||
<Head :title="props.title" />
|
||||
|
||||
<div class="grid min-h-screen lg:grid-cols-[minmax(0,5fr)_minmax(0,6fr)]">
|
||||
<aside class="relative hidden overflow-hidden bg-brand text-brand-foreground lg:flex lg:flex-col lg:justify-between lg:p-12">
|
||||
<div
|
||||
class="pointer-events-none absolute inset-0 opacity-[0.12]"
|
||||
style="background-image: radial-gradient(circle at 20% 20%, white 0, transparent 45%), radial-gradient(circle at 90% 80%, white 0, transparent 40%)"
|
||||
/>
|
||||
<BrandLogo inverted class="relative" />
|
||||
<div class="relative max-w-md">
|
||||
<p class="text-3xl leading-tight font-semibold tracking-tight">Alles Wichtige für Ihren Arbeitsalltag – an einem Ort.</p>
|
||||
<p class="mt-4 text-[15px] opacity-80">Neuigkeiten, Ansprechpartner und Anwendungen von {{ branding.portal_name }}.</p>
|
||||
</div>
|
||||
<p class="relative text-xs opacity-60">© {{ new Date().getFullYear() }} {{ branding.portal_name }}</p>
|
||||
</aside>
|
||||
|
||||
<main class="flex items-center justify-center bg-background px-4 py-12 sm:px-8">
|
||||
<div class="w-full max-w-[400px]">
|
||||
<div class="mb-10 lg:hidden">
|
||||
<BrandLogo />
|
||||
</div>
|
||||
</v-container>
|
||||
</v-main>
|
||||
</v-app>
|
||||
<h1 class="text-2xl font-semibold tracking-tight">{{ props.title }}</h1>
|
||||
<p v-if="props.description" class="mt-2 text-sm text-muted-foreground">{{ props.description }}</p>
|
||||
<div class="mt-8">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue