@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'] ?? ''; $titleLines = explode("\n", wordwrap($eventName, 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 Digitale Gästebox @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 SO FUNKTIONIERT'S @foreach($instructions as $index => $step) @php $lineY = $instructionStartY + $index * $instructionSpacing; @endphp {{ e($step) }} @endforeach ALTERNATIVER LINK {{ e($tokenUrl) }} JETZT SCANNEN {{ e(config('app.name', 'Fotospiel')) }}  – Gästebox & Fotochallenges Einladung gültig: {{ $joinToken->expires_at ? $joinToken->expires_at->isoFormat('LLL') : 'bis Widerruf' }}