presseportale/resources/views/components/web/focus-hero.blade.php
Kevin Adametz d1939f6f2a Web-Frontend: Umbau Spokes/Hub, Kontakt-Widget (contact-launcher)
Startseiten/Feeds/Kategorie/Rechtsseiten ueberarbeitet, Kontakt-Modal durch
schwebendes contact-launcher-Widget ersetzt, legal-language-notice ergaenzt;
Platzhalter-SVGs + Theme-CSS angepasst.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 15:45:58 +00:00

97 lines
4.8 KiB
PHP

@props([
'leadRelease' => null,
'sideReleases' => [],
])
@php
$sideReleases = collect($sideReleases)->take(4)->values();
if ($leadRelease) {
$leadCategory = $leadRelease->category?->translations?->firstWhere('locale', app()->getLocale())
?? $leadRelease->category?->translations?->first();
$leadCategoryName = $leadCategory?->name;
$leadImage = $leadRelease->images?->first();
$leadImageUrl = $leadImage?->variantUrl('card') ?? $leadImage?->url();
$leadPlaceholderUrl = $leadImageUrl ? null : $leadRelease->chosenPlaceholderUrl();
$leadTitle = $leadRelease->title;
$leadTeaser = (string) \Illuminate\Support\Str::of(strip_tags((string) $leadRelease->text))->squish()->limit(200);
$leadCompany = $leadRelease->company?->name;
$leadHref = route('release.detail', ['slug' => $leadRelease->slug]);
$leadReadTime = max(1, (int) round(str_word_count(strip_tags((string) $leadRelease->text)) / 200));
$leadPublishedAt = $leadRelease->published_at;
}
@endphp
@if ($leadRelease)
<section class="max-w-layout mx-auto px-8 pt-8">
<header class="flex items-baseline justify-between mb-4 flex-wrap gap-2">
<h2 class="font-serif text-[28px] font-semibold m-0 tracking-[-0.3px] text-ink">
{{ __('web.hero.title') }}
</h2>
<div class="eyebrow muted">{{ ucfirst(now()->isoFormat(__('web.hero.clock_format'))) }} · {{ __('web.hero.editorial_pick') }}</div>
</header>
<hr class="rule-strong mb-6">
<div class="grid gap-9 lg:grid-cols-[1.7fr_1fr] grid-cols-1">
{{-- HERO --}}
<article>
<div class="relative">
<a href="{{ $leadHref }}" class="block group cursor-pointer">
<div class="relative overflow-hidden bg-hero-grad h-[500px]">
@if ($leadImageUrl)
<img src="{{ $leadImageUrl }}" alt="{{ $leadTitle }}"
class="absolute inset-0 h-full w-full object-cover opacity-90 transition-opacity group-hover:opacity-100"
loading="eager">
<div class="absolute inset-0 bg-black/10"></div>
@elseif ($leadPlaceholderUrl)
<img src="{{ $leadPlaceholderUrl }}" alt="" aria-hidden="true"
class="absolute inset-0 h-full w-full object-cover" loading="eager">
@else
<x-web.hero-fallback />
@endif
</div>
<div class="absolute top-6 left-6 flex gap-2">
<span class="bp-tag">{{ __('web.hero.top_story') }}</span>
</div>
<div class="absolute left-0 right-0 bottom-0 px-9 pb-8 pt-[60px] text-white"
style="background:linear-gradient(180deg,transparent,rgba(0,0,0,0.92));">
@if ($leadCategoryName)
<div class="eyebrow on-dark mb-3">{{ $leadCategoryName }}</div>
@endif
<h1 class="font-serif text-[38px] font-semibold m-0 leading-[1.1] tracking-[-0.7px] max-w-[680px]">
{{ $leadTitle }}
</h1>
<p class="font-serif text-[15px] leading-[1.5] mt-3.5 max-w-[580px] text-white/85">
{{ $leadTeaser }}
</p>
<div class="mt-4 flex items-center gap-3.5 text-[12px] text-white/65 flex-wrap">
@if ($leadCompany)
<span>{{ $leadCompany }}</span>
<span aria-hidden="true">·</span>
@endif
@if ($leadPublishedAt)
<time datetime="{{ $leadPublishedAt->toIso8601String() }}" class="font-mono">
{{ $leadPublishedAt->format('d.m.Y · H:i') }}
</time>
<span aria-hidden="true">·</span>
@endif
<span>{{ __('web.shared.read_time', ['minutes' => $leadReadTime]) }}</span>
</div>
</div>
</a>
</div>
</article>
{{-- SIDEBAR: Was sonst zählt --}}
<aside>
<div class="eyebrow muted mb-3.5">{{ __('web.hero.sidebar_title') }}</div>
@foreach ($sideReleases as $index => $release)
<x-web.focus-side-item :release="$release" :index="$index + 1" :first="$loop->first" />
@endforeach
</aside>
</div>
</section>
@endif