@php use Illuminate\Support\Facades\Storage; /** @var \Illuminate\Support\Collection $blocksToRender */ $bgPath = $page->background_image; $bgUrl = is_string($bgPath) && $bgPath !== '' ? Storage::disk('public')->url($bgPath) : null; $overlayColor = (string) ($page->background_overlay_color ?: '#000000'); $overlayOpacity = max(0, min(100, (int) ($page->background_overlay_opacity ?? 50))) / 100; $hasExpiredCtaBlock = $blocksToRender->contains(fn (\App\Models\PageBlock $b): bool => $b->type === 'cta_banner'); $redirectAfterSubmit = $page->post_submit_redirect_url; $alpinePhase = match ($pageState) { 'countdown' => 'before', 'expired' => 'expired', default => 'active', }; $formBlock = $page->getFormBlock(); $formContent = $formBlock?->content ?? []; $formButtonLabel = (string) (data_get($formContent, 'button_label') ?: __('public.register_button')); $formButtonColor = (string) data_get($formContent, 'button_color', '#F47B20'); $formButtonTextColor = (string) data_get($formContent, 'button_text_color', '#FFFFFF'); @endphp @extends('layouts.public') @section('content')
@if ($bgUrl !== null) @else @endif
@foreach ($blocksToRender as $block) @endforeach @if ($pageState === 'expired')
@if (filled($page->expired_message)) {{-- Same as text/hero blocks: no line breaks inside whitespace-pre-line wrapper. --}}
{{ trim((string) $page->expired_message) }}
@else

{{ __('This pre-registration period has ended.') }}

@endif @if (filled($page->ticketshop_url) && ! $hasExpiredCtaBlock) @endif
@endif
@endsection