PM-Vorschau: Workflow oben + farbig, Metadaten, saubere Inhalts-Typografie

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-06-12 15:16:52 +00:00
parent b7145512a7
commit 5a8da0c1f4
6 changed files with 318 additions and 44 deletions

View file

@ -81,6 +81,87 @@
flex-wrap: wrap;
}
/* ============================================================
* PM-Inhalt (gerenderter Editor-HTML in Vorschau/Detail)
*
* Die Detailseiten nutzten `prose`-Klassen, aber das
* Tailwind-Typography-Plugin ist nicht installiert der Text
* erschien deshalb unformatiert. Diese Klasse bildet die
* Editor-Typografie nach (Absätze, Listen, Zwischenüberschriften,
* Links), ohne eine neue Abhängigkeit einzuführen.
* ============================================================ */
.pr-content {
font-size: 14.5px;
line-height: 1.7;
color: var(--color-ink);
}
.pr-content p {
margin: 0 0 1em;
}
.pr-content p:last-child {
margin-bottom: 0;
}
.pr-content h2,
.pr-content h3,
.pr-content h4 {
color: var(--color-ink);
font-weight: 700;
letter-spacing: -0.2px;
line-height: 1.3;
margin: 1.6em 0 0.6em;
}
.pr-content h2 {
font-size: 19px;
}
.pr-content h3 {
font-size: 16.5px;
}
.pr-content h4 {
font-size: 15px;
}
.pr-content h2:first-child,
.pr-content h3:first-child,
.pr-content h4:first-child {
margin-top: 0;
}
.pr-content ul,
.pr-content ol {
margin: 0 0 1em;
padding-inline-start: 1.4em;
}
.pr-content ul {
list-style: disc;
}
.pr-content ol {
list-style: decimal;
}
.pr-content li {
margin: 0.3em 0;
}
.pr-content a {
color: var(--color-hub);
text-decoration: underline;
text-underline-offset: 2px;
}
.pr-content strong,
.pr-content b {
font-weight: 700;
color: var(--color-ink);
}
.pr-content blockquote {
margin: 1em 0;
padding: 0.2em 0 0.2em 1em;
border-left: 3px solid var(--color-hub-soft-2);
color: var(--color-ink-2);
font-style: italic;
}
.pr-content hr {
margin: 1.5em 0;
border: 0;
border-top: 1px solid var(--color-bg-rule);
}
/* ============================================================
* Stat-Cards (KPI-Karten mit farbigem Strip links)
* ============================================================ */

View file

@ -467,7 +467,7 @@ new #[Layout('components.layouts.app'), Title('Pressemitteilung')] class extends
<span class="section-eyebrow">{{ __('Inhalt') }}</span>
</div>
<div class="p-5">
<div class="prose prose-zinc dark:prose-invert max-w-none text-[color:var(--color-ink)]">
<div class="pr-content max-w-[760px]">
{!! $pr->renderedText() !!}
</div>

View file

@ -197,22 +197,6 @@ new #[Layout('components.layouts.app'), Title('Pressemitteilung')] class extends
</div>
</header>
{{-- ============== TITELBILD (Hero) ============== --}}
{{-- Harte Obergrenze 1280x580 px: Container deckelt Breite und Seitenverhältnis,
damit das Bild auf großen Screens nicht über die Detailgröße hinauswächst. --}}
<article class="panel overflow-hidden mx-auto w-full max-w-[1280px]">
<div class="relative aspect-[1280/580] w-full">
<img src="{{ $coverUrl }}" alt="{{ $pr->title }}"
class="absolute inset-0 h-full w-full object-cover" loading="lazy" />
</div>
@if ($coverIsPlaceholder)
<div class="flex items-center gap-2 border-t border-[color:var(--color-bg-rule)] px-5 py-2.5 text-[12px] text-[color:var(--color-ink-3)]">
<flux:icon.photo variant="micro" class="size-3.5" />
<span>{{ __('Platzhalter-Titelbild — laden Sie im Editor ein eigenes Bild hoch.') }}</span>
</div>
@endif
</article>
{{-- ============== SHARE-LINK ERFOLG ============== --}}
@if ($shareUrl)
<article class="panel" style="border-color:var(--color-ok);">
@ -253,9 +237,11 @@ new #[Layout('components.layouts.app'), Title('Pressemitteilung')] class extends
</article>
@endif
{{-- ============== STATUS-WORKFLOW ============== --}}
{{-- ============== STATUS-WORKFLOW (oben, farblich abgehoben) ============== --}}
@if ($pr->status === PressReleaseStatus::Draft || $pr->status === PressReleaseStatus::Rejected)
<article class="panel">
<article class="panel"
style="border-color:var(--color-{{ $pr->status === PressReleaseStatus::Rejected ? 'err' : 'hub' }}); border-left-width:3px;
background:var(--color-{{ $pr->status === PressReleaseStatus::Rejected ? 'err' : 'hub' }}-soft);">
<div class="panel-head">
<span class="section-eyebrow">{{ __('Status-Workflow') }}</span>
<span @class(['badge', 'dot', $pr->status === PressReleaseStatus::Rejected ? 'err' : 'hub'])>
@ -268,7 +254,7 @@ new #[Layout('components.layouts.app'), Title('Pressemitteilung')] class extends
? __('Sie können den Text bearbeiten und erneut zur Prüfung einreichen.')
: __('Reichen Sie den Entwurf ein, sobald er vollständig ist.') }}
</p>
<div class="flex items-center gap-2 flex-shrink-0">
<div class="flex items-center gap-2 flex-shrink-0 flex-wrap">
@if ($canEdit)
<flux:button variant="filled" icon="pencil" href="{{ route('me.press-releases.edit', $pr->id) }}" wire:navigate>
{{ __('Bearbeiten') }}
@ -284,10 +270,28 @@ new #[Layout('components.layouts.app'), Title('Pressemitteilung')] class extends
</article>
@endif
@if ($pr->status === PressReleaseStatus::Review)
<article class="panel" style="border-color:var(--color-warn); border-left-width:3px;">
@if ($pr->status === PressReleaseStatus::Published)
<article class="panel" style="border-color:var(--color-ok); border-left-width:3px; background:var(--color-ok-soft);">
<div class="panel-head">
<span class="section-eyebrow">{{ __('In Prüfung') }}</span>
<span class="section-eyebrow">{{ __('Status-Workflow') }}</span>
<span class="badge ok dot">{{ __('Live') }}</span>
</div>
<div class="p-5 flex items-start gap-3">
<div class="w-9 h-9 rounded-[5px] flex items-center justify-center flex-shrink-0
bg-[color:var(--color-ok-soft)] border border-[color:var(--color-ok)]/30 text-[color:var(--color-gain-deep)]">
<flux:icon.check-circle class="size-[18px]" />
</div>
<p class="flex-1 text-[13px] text-[color:var(--color-ink-2)] m-0">
{{ __('Diese Pressemitteilung ist veröffentlicht (seit :date).', ['date' => $pr->published_at?->format('d.m.Y H:i') ?? '']) }}
</p>
</div>
</article>
@endif
@if ($pr->status === PressReleaseStatus::Review)
<article class="panel" style="border-color:var(--color-warn); border-left-width:3px; background:var(--color-warn-soft);">
<div class="panel-head">
<span class="section-eyebrow">{{ __('Status-Workflow') }}</span>
<span class="badge warn dot">{{ __('Geduld bitte') }}</span>
</div>
<div class="p-5 flex items-start gap-3">
@ -400,8 +404,47 @@ new #[Layout('components.layouts.app'), Title('Pressemitteilung')] class extends
</div>
</div>
@endif
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
<div class="text-[11px] uppercase tracking-[0.6px] text-[color:var(--color-ink-3)] font-semibold">{{ __('Portal') }}</div>
<div class="text-[13px] font-semibold text-[color:var(--color-ink)] mt-1">
{{ $pr->portal?->label() ?? '' }}
</div>
</div>
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
<div class="text-[11px] uppercase tracking-[0.6px] text-[color:var(--color-ink-3)] font-semibold">{{ __('Kategorie') }}</div>
<div class="text-[13px] font-semibold text-[color:var(--color-ink)] mt-1">
{{ $categoryName }}
</div>
</div>
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
<div class="text-[11px] uppercase tracking-[0.6px] text-[color:var(--color-ink-3)] font-semibold">{{ __('Sprache') }}</div>
<div class="text-[13px] font-semibold text-[color:var(--color-ink)] mt-1">
{{ strtoupper($pr->language) }}
</div>
</div>
</div>
@if (filled($pr->keywords))
<div class="mt-3 rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
<div class="text-[11px] uppercase tracking-[0.6px] text-[color:var(--color-ink-3)] font-semibold mb-2">{{ __('Themen') }}</div>
<div class="flex flex-wrap gap-1.5">
@foreach (array_filter(array_map('trim', explode(',', $pr->keywords))) as $keyword)
<span class="badge hub">{{ $keyword }}</span>
@endforeach
</div>
</div>
@endif
@if ($pr->backlink_url)
<div class="mt-3 rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
<div class="text-[11px] uppercase tracking-[0.6px] text-[color:var(--color-ink-3)] font-semibold mb-1">{{ __('Backlink') }}</div>
<a href="{{ $pr->backlink_url }}" target="_blank"
class="text-[12.5px] break-all text-[color:var(--color-hub)] underline underline-offset-2 decoration-[color:var(--color-hub)]/40 hover:decoration-[color:var(--color-hub)]">
{{ $pr->backlink_url }}
</a>
</div>
@endif
@if ($pr->no_export)
<div class="mt-3 flex items-center gap-2 text-[12px] text-[color:var(--color-ink-3)]">
<flux:icon.no-symbol variant="micro" class="size-3.5" />
@ -449,35 +492,31 @@ new #[Layout('components.layouts.app'), Title('Pressemitteilung')] class extends
</article>
</div>
{{-- ============== TITELBILD (Hero) ============== --}}
{{-- Harte Obergrenze 1280x580 px: Container deckelt Breite und Seitenverhältnis,
damit das Bild auf großen Screens nicht über die Detailgröße hinauswächst. --}}
<article class="panel overflow-hidden mx-auto w-full max-w-[1280px]">
<div class="relative aspect-[1280/580] w-full">
<img src="{{ $coverUrl }}" alt="{{ $pr->title }}"
class="absolute inset-0 h-full w-full object-cover" loading="lazy" />
</div>
@if ($coverIsPlaceholder)
<div class="flex items-center gap-2 border-t border-[color:var(--color-bg-rule)] px-5 py-2.5 text-[12px] text-[color:var(--color-ink-3)]">
<flux:icon.photo variant="micro" class="size-3.5" />
<span>{{ __('Platzhalter-Titelbild — laden Sie im Editor ein eigenes Bild hoch.') }}</span>
</div>
@endif
</article>
{{-- ============== INHALT ============== --}}
<article class="panel">
<div class="panel-head">
<span class="section-eyebrow">{{ __('Inhalt') }}</span>
</div>
<div class="p-5">
<div class="prose prose-zinc dark:prose-invert max-w-none text-[color:var(--color-ink)]">
<div class="pr-content max-w-[760px]">
{!! $pr->renderedText() !!}
</div>
@if ($pr->keywords || $pr->backlink_url)
<div class="mt-6 space-y-2 border-t border-[color:var(--color-bg-rule)] pt-4 text-[12.5px] text-[color:var(--color-ink-2)]">
@if ($pr->keywords)
<p class="m-0">
<strong class="text-[color:var(--color-ink)] font-semibold">{{ __('Stichwörter') }}:</strong>
{{ $pr->keywords }}
</p>
@endif
@if ($pr->backlink_url)
<p class="m-0">
<strong class="text-[color:var(--color-ink)] font-semibold">{{ __('Backlink') }}:</strong>
<a href="{{ $pr->backlink_url }}" target="_blank"
class="text-[color:var(--color-hub)] underline underline-offset-2 decoration-[color:var(--color-hub)]/40 hover:decoration-[color:var(--color-hub)]">
{{ $pr->backlink_url }}
</a>
</p>
@endif
</div>
@endif
</div>
</article>