Files
laraundfelix/resources/views/widgets/hero.blade.php
T
LarsandClaude Opus 5.5 053a8d4648
CI Feature / test (push) Successful in 48s
Deploy Test / test (push) Successful in 44s
Deploy Test / deploy (push) Successful in 37s
Stelle alle CMS-Bilder auf die zentrale Medienverwaltung um.
- Einstieg, Bild und Text, redaktionelle Karten, Premium-Karten und Abschnittshintergrund speichern die
  Kennung des Mediums (Bildschlüssel image) und lesen über WebsiteMedia; öffentlich nur mit Website-Freigabe,
  in der Redaktionsvorschau sonst das Vorschaubild mit Hinweis.
- Gemeinsame Felder: Medienpicker mit Vorschaubild und Status, Upload direkt über WebsiteIntake, Anzeige des
  gewählten Mediums mit Verweis auf den Medienmanager. Die CMS-eigene Bildauswahl entfällt.
- Frühere CMS-Bilder übernimmt ein Warteschlangen-Job (dedupliziert, nichts gelöscht); website_media_aliases
  ordnet frühere Pfade zu, wirksam erst nach der ersten Website-Freigabe; /medien/cms/ folgt danach der Freigabe.
- Medienansicht nennt die Website-Seiten, die ein Bild verwenden.
- Bewusst geändert: Der Alternativtext gehört zum Medium und ist im Widget nur noch eine optionale Abweichung;
  die Tests zur Alt-Text-Pflicht prüfen jetzt Übernahme und andere Registry-Fehler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 22:32:29 +01:00

47 lines
2.5 KiB
PHP

{{--
Premium-Einstieg (Brand-UI-Kit v1.6, Komponente lf-hero), angepasst an die Widget-Hülle der Registry.
Varianten: photo_split (Foto mit heller Textfläche), editorial_solid (Navy-Markenfläche ohne Foto).
Höhen compact/normal/large sind Mindesthöhen ab 860 px Containerbreite; darunter Sicherheitsumbruch.
Das Bild des ersten Widgets der Seite wird sofort geladen, alle anderen verzögert.
--}}
@php
$layout = $variant === 'editorial_solid' ? 'editorial-solid' : 'photo-split';
$heightClass = in_array($height, ['compact', 'normal', 'large'], true) ? $height : 'normal';
$tag = \App\Domain\Cms\Widgets\Support\PremiumFields::headingTag($settings, ! empty($first));
$loading = ! empty($first) ? 'loading="eager" fetchpriority="high"' : 'loading="lazy"';
@endphp
<div class="lf-hero-host">
<div class="lf-hero lf-hero--{{ $layout }} lf-hero--height-{{ $heightClass }} lf-hero--accent-{{ $accent }}"
style="--lf-hero-focus-x: {{ $focus['x'] }}%; --lf-hero-focus-y: {{ $focus['y'] }}%">
@if ($layout === 'photo-split' && $imageUrl)
<img class="lf-hero__photo" src="{{ $imageUrl }}" alt="{{ $imageAlt ?? '' }}" {!! $loading !!} decoding="async">
@endif
<div class="lf-hero__inner">
<div class="lf-hero__copy">
@if ($accent === 'rays')
<x-brand.rays class="lf-hero__rays" />
@endif
@if (filled($data['eyebrow'] ?? null))
<p class="lf-hero__eyebrow">{{ $data['eyebrow'] }}</p>
@endif
<{{ $tag }} class="lf-hero__title">{{ $data['heading'] ?? '' }}</{{ $tag }}>
@if ($accent !== 'none')
<span class="lf-hero__title-accent" aria-hidden="true"></span>
@endif
@if (filled($data['text'] ?? null))
<p class="lf-hero__description">{{ $data['text'] }}</p>
@endif
@if ($actions !== [])
<div class="lf-hero__actions">
@foreach ($actions as $index => $item)
<a @class(['lf-hero__button', 'lf-hero__button--primary' => $index === 0, 'lf-hero__button--secondary' => $index > 0]) href="{{ $item['url'] }}">{{ $item['label'] }}</a>
@endforeach
</div>
@endif
</div>
</div>
<span class="lf-hero__bottom" aria-hidden="true"></span>
</div>
</div>
@include('widgets.partials.image-notice')