Einheitlicher Rahmen für alle Seiten (0.49.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 8m15s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 8m16s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 8m10s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 8m15s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 10m23s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m41s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 8m59s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 9m1s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 49s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m11s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 8m15s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 8m16s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 8m10s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 8m15s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 10m23s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m41s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 8m59s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 9m1s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 49s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m11s
Das Portal legt den Rahmen selbst um jede Plugin-Seite; AppLayout aus @inhaus/ui setzt dort nur noch den Titel. Detailseiten nutzen PageHeader. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ee6a5e02a0
commit
179471cb53
149 changed files with 508 additions and 484 deletions
|
|
@ -2,9 +2,10 @@
|
|||
import { computed, ref, watch } from 'vue';
|
||||
import { Link, router } from '@inertiajs/vue3';
|
||||
import { useWindowScroll } from '@vueuse/core';
|
||||
import { ArrowLeft, CalendarDays, ChartNoAxesColumn, Check, Clock, Heart, Link2, Mail, MessageCircle, PenLine } from '@lucide/vue';
|
||||
import { CalendarDays, ChartNoAxesColumn, Check, Clock, Heart, Link2, Mail, MessageCircle, PenLine } from '@lucide/vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import EasyLanguageBar from '@/components/EasyLanguageBar.vue';
|
||||
import PageHeader from '@/components/PageHeader.vue';
|
||||
import PersonAvatar from '@/components/PersonAvatar.vue';
|
||||
import NewsComments from '../components/NewsComments.vue';
|
||||
import NewsStats from '../components/NewsStats.vue';
|
||||
|
|
@ -85,40 +86,31 @@ const mailLink = () => `mailto:?subject=${encodeURIComponent(props.post.title)}&
|
|||
|
||||
<template>
|
||||
<AppLayout :title="post.title">
|
||||
<PageHeader :title="post.title" :breadcrumbs="[{ label: 'Neuigkeiten', href: '/neuigkeiten' }]">
|
||||
<template #description>
|
||||
<span v-if="post.teaser" class="block text-[15px] leading-relaxed">{{ post.teaser }}</span>
|
||||
<span class="mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-[13px]">
|
||||
<span v-if="post.category" class="rounded-pill bg-brand-soft px-2.5 py-0.5 text-[11px] font-semibold tracking-wider text-brand-text uppercase">{{ post.category.name }}</span>
|
||||
<span class="inline-flex items-center gap-1.5"><CalendarDays class="size-4" /> {{ formatDate(post.published_at) }}</span>
|
||||
<span class="inline-flex items-center gap-1.5"><Clock class="size-4" /> {{ post.reading_minutes }} Min. Lesezeit</span>
|
||||
<span v-if="likes" class="inline-flex items-center gap-1.5"><Heart class="size-4" /> {{ likes }}</span>
|
||||
<a v-if="comments?.count" href="#kommentare" class="inline-flex items-center gap-1.5 hover:text-foreground"><MessageCircle class="size-4" /> {{ comments.count }} {{ comments.count === 1 ? 'Kommentar' : 'Kommentare' }}</a>
|
||||
</span>
|
||||
</template>
|
||||
<template v-if="editUrl" #actions>
|
||||
<Button variant="outline" size="sm" as-child><Link :href="editUrl"><PenLine /> Bearbeiten</Link></Button>
|
||||
</template>
|
||||
</PageHeader>
|
||||
|
||||
<!-- Lesefortschritt -->
|
||||
<div class="fixed inset-x-0 top-0 z-50 h-1 bg-transparent" aria-hidden="true">
|
||||
<div class="h-full bg-brand transition-[width] duration-150" :style="{ width: `${progress}%` }" />
|
||||
</div>
|
||||
|
||||
<div class="mb-4 flex items-center justify-between gap-4">
|
||||
<Link href="/neuigkeiten" class="inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground">
|
||||
<ArrowLeft class="size-4" /> Alle Neuigkeiten
|
||||
</Link>
|
||||
<Button v-if="editUrl" variant="outline" size="sm" as-child><Link :href="editUrl"><PenLine /> Bearbeiten</Link></Button>
|
||||
</div>
|
||||
<!-- Titelbild unter dem Seitenkopf -->
|
||||
<img v-if="post.cover_url" :src="post.cover_url" :alt="post.title" class="mb-6 aspect-[2/1] max-h-[460px] w-full rounded-xl object-cover shadow-xs" />
|
||||
|
||||
<!-- Kopf: großes Titelbild mit Titel darüber, ohne Bild eine Fläche in der Markenfarbe -->
|
||||
<header class="relative isolate overflow-hidden rounded-xl bg-brand text-white shadow-sm">
|
||||
<img v-if="post.cover_url" :src="post.cover_url" :alt="post.title" class="absolute inset-0 -z-10 size-full object-cover" />
|
||||
<div v-if="post.cover_url" class="absolute inset-0 -z-10 bg-gradient-to-t from-black/85 via-black/45 to-black/5" />
|
||||
<div v-else class="absolute inset-0 -z-10 opacity-20 [background-image:radial-gradient(circle_at_85%_15%,white_0,transparent_45%),radial-gradient(circle_at_10%_110%,white_0,transparent_40%)]" />
|
||||
|
||||
<div class="flex min-h-[260px] flex-col justify-end gap-3 p-6 sm:min-h-[360px] sm:p-10 lg:min-h-[420px]">
|
||||
<span v-if="post.category" class="w-fit rounded-pill bg-white/15 px-3 py-1 text-[11px] font-semibold tracking-wider uppercase ring-1 ring-white/30 backdrop-blur">
|
||||
{{ post.category.name }}
|
||||
</span>
|
||||
<h1 class="max-w-4xl text-3xl leading-tight font-semibold tracking-tight text-balance sm:text-4xl lg:text-[44px]">{{ post.title }}</h1>
|
||||
<p v-if="post.teaser" class="max-w-3xl text-base leading-relaxed text-white/85 sm:text-lg">{{ post.teaser }}</p>
|
||||
<div class="mt-2 flex flex-wrap items-center gap-x-5 gap-y-2 text-sm text-white/80">
|
||||
<span class="inline-flex items-center gap-1.5"><CalendarDays class="size-4" /> {{ formatDate(post.published_at) }}</span>
|
||||
<span class="inline-flex items-center gap-1.5"><Clock class="size-4" /> {{ post.reading_minutes }} Min. Lesezeit</span>
|
||||
<span v-if="likes" class="inline-flex items-center gap-1.5"><Heart class="size-4" /> {{ likes }}</span>
|
||||
<a v-if="comments?.count" href="#kommentare" class="inline-flex items-center gap-1.5 hover:text-white"><MessageCircle class="size-4" /> {{ comments.count }} {{ comments.count === 1 ? 'Kommentar' : 'Kommentare' }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="mt-6 grid gap-6 lg:grid-cols-12">
|
||||
<div class="grid gap-6 lg:grid-cols-12">
|
||||
<!-- Inhalt in einer weißen Karte -->
|
||||
<div class="grid min-w-0 grid-cols-1 content-start gap-6 lg:col-span-8">
|
||||
<article ref="article" class="min-w-0 rounded-xl border bg-card p-6 shadow-xs sm:p-10">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue