Files
laraundfelix/resources/views/widgets/hero.blade.php
T
LarsandClaude Opus 5.5 33aaf64024
CI Feature / test (push) Successful in 36s
Deploy Test / test (push) Successful in 32s
Deploy Test / deploy (push) Successful in 32s
Stabilisiere den Website-Rahmen und veredele die zentralen Widgets.
Designiteration 1 auf Grundlage des Brand-UI-Kits (vorläufige Werte):
- Kopfzeile mit konstanter Box und zwei Zuständen (großzügig, kompakt
  beim Scrollen) ohne Layoutsprung; Navigation bricht nie um, sondern
  verkürzt erst den Kontozugang und schaltet dann in den Menümodus.
  Scrollbalken-Reserve, gemeinsames Breitenmodell (Lesebereich,
  Standard, Breit, Vollbreite), Wortmarke und Inhalt fluchten.
- Fokusfalle im Mobilmenü schließt auch den Weg von der
  Menü-Schaltfläche in den Inhalt.
- Fußbereich mit Grundzeile für rechtliche Links und grünem Bogen.
- Markenakzente (Unterstreichung, Strahlen, Bogen) als Komponenten.
- Hero: Varianten Markenbühne (randlos) und Editorial, zweite
  Schaltfläche, Bildausschnitt. Bild und Text: Bildformat und
  Ausschnitt. Karten: hervorgehobene erste Karte, ganze Karte klickbar.
  Programmkarten mit Markentafel. Alles additiv, ohne neue Version.

Testanpassungen: Die Website-Wortmarke trägt jetzt brand-lockup, die
erste Hero-Schaltfläche button-brand (beabsichtigte Gestaltung).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 06:43:13 +01:00

53 lines
2.3 KiB
PHP

{{--
Einstieg (Hero). Varianten:
- standard: Text neben dem Bild (ältere Instanzen unverändert gültig)
- highlight: dunkle Markenfläche
- stage: Markenbühne, Bild über die volle Breite, Text auf heller Tafel (randlos, wenn allein im Abschnitt)
- editorial: textbetonter Einstieg, Bild optional als breites Band darunter
Das Bild des ersten Widgets wird sofort geladen (größtes Element), alle anderen verzögert.
--}}
@php
$variant = in_array($variant, ['standard', 'highlight', 'stage', 'editorial'], true) ? $variant : 'standard';
$headingTag = ! empty($first) ? 'h1' : 'h2';
$loading = ! empty($first) ? 'loading="eager" fetchpriority="high"' : 'loading="lazy"';
@endphp
<div @class([
'hero',
'hero-'.$variant,
'hero-with-image' => $imageUrl,
'hero-text-left' => $variant === 'stage' && $textSide === 'left',
]) style="--hero-focus: {{ $focus }}">
@if ($imageUrl && $variant === 'stage')
<div class="hero-media">
<img class="hero-image" src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" {!! $loading !!} decoding="async">
</div>
@endif
<div class="hero-frame">
<div class="hero-copy">
@if ($variant === 'stage' || $variant === 'highlight')
<x-brand.rays class="hero-rays" />
@endif
<{{ $headingTag }}>{{ $data['heading'] ?? '' }}</{{ $headingTag }}>
<x-brand.underline class="hero-mark" />
@if (filled($data['text'] ?? null))
<p class="lede">{{ $data['text'] }}</p>
@endif
@if ($actions !== [])
<div class="hero-actions">
@foreach ($actions as $index => $item)
<a @class(['button', 'button-brand' => $index === 0, 'button-secondary' => $index > 0]) href="{{ $item['url'] }}">{{ $item['label'] }}</a>
@endforeach
</div>
@endif
</div>
</div>
@if ($imageUrl && $variant !== 'stage')
<figure class="hero-figure">
<img class="hero-image" src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" {!! $loading !!} decoding="async">
@if ($variant === 'standard')
<x-brand.rays class="hero-rays" />
@endif
</figure>
@endif
</div>