@php $width = $layout['svg']['width'] ?? 1080; $height = $layout['svg']['height'] ?? 1520; $background = $layout['background'] ?? '#FFFFFF'; $gradient = $layout['background_gradient'] ?? null; $gradientId = $gradient ? 'bg-gradient-'.uniqid() : null; $accent = $layout['accent'] ?? '#000000'; $secondary = $layout['secondary'] ?? '#E5E7EB'; $textColor = $layout['text'] ?? '#111827'; $badgeColor = $layout['badge'] ?? $accent; $instructions = $layout['instructions'] ?? []; $description = $layout['description'] ?? ''; $subtitle = $layout['subtitle'] ?? ''; $headline = $layout['headline'] ?? $eventName; $badgeLabel = $layout['badge_label'] ?? 'Digitale Gästebox'; $instructionsHeading = $layout['instructions_heading'] ?? "So funktioniert's"; $linkHeading = $layout['link_heading'] ?? 'Alternative zum Einscannen'; $ctaLabel = $layout['cta_label'] ?? 'Scan mich & starte direkt'; $linkLabel = $layout['link_label'] ?? $tokenUrl; $logoUrl = $layout['logo_url'] ?? null; $qrSize = $layout['qr']['size_px'] ?? 500; $qrX = max($width - $qrSize - 120, 520); $qrY = 420; $qrPanelX = $qrX - 40; $qrPanelY = $qrY - 40; $qrPanelWidth = $qrSize + 80; $qrPanelHeight = $qrSize + 200; $linkBoxY = $qrY + $qrSize + 30; $ctaTextY = $qrPanelY + $qrPanelHeight - 50; $titleLines = explode("\n", wordwrap($headline, 18, "\n", true)); $subtitleLines = $subtitle !== '' ? explode("\n", wordwrap($subtitle, 36, "\n", true)) : []; $descriptionLines = $description !== '' ? explode("\n", wordwrap($description, 40, "\n", true)) : []; $instructionStartY = 870; $instructionSpacing = 56; if ($gradient) { $angle = (float) ($gradient['angle'] ?? 180); $angleRad = deg2rad($angle); $x1 = 0.5 - cos($angleRad) / 2; $y1 = 0.5 - sin($angleRad) / 2; $x2 = 0.5 + cos($angleRad) / 2; $y2 = 0.5 + sin($angleRad) / 2; $x1Attr = number_format($x1, 4, '.', ''); $y1Attr = number_format($y1, 4, '.', ''); $x2Attr = number_format($x2, 4, '.', ''); $y2Attr = number_format($y2, 4, '.', ''); } @endphp @if($gradientId) @php $stops = $gradient['stops'] ?? []; $stopCount = max(count($stops) - 1, 1); @endphp @foreach($stops as $index => $stopColor) @php $offset = $stopCount > 0 ? ($index / $stopCount) * 100 : 0; @endphp @endforeach @endif {{ e($badgeLabel) }} @if($logoUrl) @endif @foreach($titleLines as $index => $line) {{ e($line) }} @endforeach @php $subtitleOffset = 260 + count($titleLines) * 88 + 40; @endphp @foreach($subtitleLines as $index => $line) {{ e($line) }} @endforeach @php $descriptionOffset = $subtitleOffset + (count($subtitleLines) ? count($subtitleLines) * 44 + 60 : 40); @endphp @foreach($descriptionLines as $index => $line) {{ e($line) }} @endforeach {{ e(mb_strtoupper($instructionsHeading)) }} @foreach($instructions as $index => $step) @php $lineY = $instructionStartY + $index * $instructionSpacing; @endphp {{ e($step) }} @endforeach {{ e(mb_strtoupper($linkHeading)) }} {{ e($linkLabel) }} {{ e(mb_strtoupper($ctaLabel)) }} {{ e(config('app.name', 'Fotospiel')) }}  – Gästebox & Fotochallenges Einladung gültig: {{ $token->expires_at ? $token->expires_at->locale(app()->getLocale())->isoFormat('LLL') : 'bis Widerruf' }}