@extends('web.layouts.web-master') @php use Illuminate\Support\Str; // Private Vorschau über Magic-Link (/pm-vorschau/{token}): identisches // Layout wie die spätere öffentliche Seite, plus Hinweis-Banner und noindex. $isPreview = ($isPreview ?? false) === true; $previewExpiresAt = $previewExpiresAt ?? null; $previewPortalOptions = $previewPortalOptions ?? null; $company = $release->company; $categoryTranslation = $release->category?->translations?->firstWhere('locale', app()->getLocale()) ?? $release->category?->translations?->first(); $categoryName = $categoryTranslation?->name; $categorySlug = $categoryTranslation?->slug; $categoryHref = $categorySlug ? route('kategorie', ['slug' => $categorySlug]) : route('web.home'); $parentTranslation = $release->category?->parent?->translations?->firstWhere('locale', app()->getLocale()) ?? $release->category?->parent?->translations?->first(); $parentName = $parentTranslation?->name; $parentSlug = $parentTranslation?->slug; $parentHref = $parentSlug ? route('kategorie', ['slug' => $parentSlug]) : route('web.home'); // In der Vorschau ersatzweise der geplante Termin, damit die Meta-Zeile // der späteren Veröffentlichung entspricht. $publishedAt = $release->published_at ?? ($isPreview ? $release->scheduledAtLocal() : null); $embargoAt = $release->embargoAtLocal(); $bodyHtml = $release->renderedText(); $wordCount = str_word_count(strip_tags((string) $release->text)); $readTime = max(1, (int) round($wordCount / 200)); $teaser = (string) Str::of(strip_tags((string) $release->text))->squish()->limit(180); $lead = filled($release->subtitle) ? $release->subtitle : $teaser; $image = $release->images->first(); $imageUrl = $image?->variantUrl('detail') ?? $image?->variantUrl('card') ?? $image?->url(); $imageCaption = $image?->description ?: $image?->title; $imageCredit = $image?->copyright ?: $image?->author; $companyName = $company?->name; $companyInitial = $companyName ? mb_strtoupper(mb_substr($companyName, 0, 1)) : '·'; $companyHref = $company?->slug ? route('newsroom', ['slug' => $company->slug]) : route('newsrooms'); $countryNames = ['DE' => __('web.countries.de'), 'AT' => __('web.countries.at'), 'CH' => __('web.countries.ch')]; $companyCountry = $company?->country_code ? ($countryNames[strtoupper($company->country_code)] ?? null) : null; $boilerplate = filled($release->boilerplate_override) ? $release->boilerplate_override : $company?->boilerplate; $keywords = collect(preg_split('/[,;\n]+/', (string) $release->keywords)) ->map(fn ($keyword) => trim($keyword)) ->filter() ->unique() ->take(8); $contact = $release->contacts->first(); $contactName = $contact ? trim(implode(' ', array_filter([$contact->title, $contact->first_name, $contact->last_name]))) : null; // Attributions-Zeile wie im Legacy-System: Urheber (Firma der PM) und // Übermittler (Profilfeld agency_name des einliefernden Accounts, z. B. // "connektar.de Presseverteiler" bei API-Einlieferungen). $agencyName = $release->user?->agency_name; $publisherVerified = (bool) ($company?->is_active && filled($company?->website)); $isRecommended = $release->content_score !== null && $release->content_score >= 80; // In der Vorschau wird der Vorschau-Link selbst geteilt — die öffentliche // URL existiert vor der Veröffentlichung noch nicht. $shareUrl = $isPreview ? request()->fullUrl() : route('release.detail', ['slug' => $release->slug]); $brandLabel = config('app.theme') === 'presseecho' ? 'presseecho' : 'businessportal24'; @endphp @section('title', $release->title.' – '.$brandLabel) @section('meta_description', $lead) @section('og_type', 'article') @if ($imageUrl) @section('og_image', $imageUrl) @endif @if ($isPreview) @section('robots', 'noindex,nofollow') @else @section('canonical', $shareUrl) @endif @section('content') {{-- Lese-Fortschrittsbalken --}} @if ($isPreview) {{-- Hinweis-Banner: private Vorschau, nicht öffentlich erreichbar --}}
● {{ __('web.detail.preview_label') }} {{ __('web.detail.preview_text') }} {{ __('web.detail.preview_status', ['status' => $release->status->label()]) }} @if ($previewExpiresAt) · {{ __('web.detail.preview_valid_until', ['date' => $previewExpiresAt->translatedFormat('j. F Y, H:i')]) }} @endif @if (! empty($previewPortalOptions)) {{-- PM erscheint auf beiden Portalen: Ansicht umschalten --}} {{ __('web.detail.preview_portal_switch') }} @foreach ($previewPortalOptions as $option) $option['active'], 'hover:bg-amber-100 text-amber-900' => ! $option['active'], ]) @if ($option['active']) aria-current="true" @endif> {{ $option['label'] }} @endforeach @endif
@endif
{{-- Breadcrumbs --}}
{{-- Hero Meta Block --}}
@if ($embargoAt)
● {{ __('web.detail.embargo_lifted') }} {{ $embargoAt->translatedFormat('j. F Y, H:i') }}
@endif
@if ($categoryName) {{ $categoryName }} @endif {{ __('web.detail.audience') }}

{{ $release->title }}

@if (filled($lead))

{{ $lead }}

@endif
@if ($companyName) {{ $companyInitial }} {{ $companyName }} @endif @if ($publishedAt) @endif {{ __('web.shared.read_time', ['minutes' => $readTime]) }} · {{ __('web.detail.words', ['count' => number_format($wordCount, 0, ',', '.')]) }} @if ($companyCountry) {{ $companyCountry }} @endif @if ($isRecommended) {{ __('web.detail.recommended') }} @endif
{{-- Hero Image --}}
@if ($imageUrl) {{ $imageCaption ?: $release->title }} @else {{ $companyName ? __('web.detail.image_placeholder_company', ['company' => $companyName]) : __('web.detail.image_placeholder') }} (16:9) @endif
@if ($imageCaption || $imageCredit)
{{ $imageCaption }}@if ($imageCaption && $imageCredit) · @endif@if ($imageCredit){{ __('web.detail.photo') }}: {{ $imageCredit }}@endif
@endif
{{-- Body + Sidebar --}}
{{-- Body --}}
{!! $bodyHtml !!}
@if (filled($boilerplate))
{{ __('web.detail.about_company') }}

{{ $boilerplate }}

@endif {{-- Pressekontakt --}} @if ($contact)
{{ __('web.detail.press_contact') }}
{{ $contactName ?: $companyName }} @if ($publisherVerified) @endif
@if ($contact->responsibility || $companyName)
@if ($contact->responsibility){{ $contact->responsibility }}
@endif {{ $companyName }}
@endif
@if ($company?->address) {{ $company->address }} @endif @if ($contact->phone) {{ $contact->phone }} @endif @if ($contact->email) {{ $contact->email }} @endif @if ($company?->website) {{ Str::of($company->website)->after('//')->rtrim('/') }} @endif
@endif {{-- Attribution: Urheber & übermittelnder Verteiler (Legacy-Konvention) --}} @if ($companyName)

@if ($agencyName && $agencyName !== $companyName) {{ __('web.detail.attribution_via', ['company' => $companyName, 'agency' => $agencyName]) }} @elseif ($agencyName) {{ __('web.detail.attribution_agency_only', ['agency' => $agencyName]) }} @else {{ __('web.detail.attribution', ['company' => $companyName]) }} @endif

@endif {{-- Inhalt melden (T13): sichtbar an jeder Mitteilung, nicht nur in der Sidebar --}}
{{ __('web.detail.legal_question') }} {{ __('web.detail.report_content') }} {{ __('web.detail.remove_data') }} {{ __('web.detail.reports_free') }}
{{-- Sidebar --}}
{{-- Empfehlungen --}} @if ($companyReleases->isNotEmpty() || $relatedReleases->isNotEmpty())
@if ($companyReleases->isNotEmpty())

{{ __('web.detail.more_from', ['company' => $companyName]) }}

{{ __('web.detail.more_from_sub') }}

@foreach ($companyReleases as $companyRelease) @endforeach {{ __('web.detail.all_from', ['company' => $companyName]) }} →
@endif @if ($relatedReleases->isNotEmpty())

{{ __('web.detail.related') }}

{{ __('web.detail.related_sub') }}

@foreach ($relatedReleases as $relatedRelease) @endforeach @if ($categoryName) {{ __('web.detail.all_from_category', ['category' => $categoryName]) }} → @endif
@endif
@endif
@endsection