- Reworked the tenant admin login page
- Updated the User model to implement Filament’s tenancy contracts - Seeded a ready-to-use demo tenant (user, tenant, active package, purchase) - Introduced a branded, translated 403 error page to replace the generic forbidden message for unauthorised admin hits - Removed the public “Register” links from the marketing header - hardened join event logic and improved error handling in the guest pwa.
This commit is contained in:
206
resources/views/layouts/join-token/pdf.blade.php
Normal file
206
resources/views/layouts/join-token/pdf.blade.php
Normal file
@@ -0,0 +1,206 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ $eventName }} – Einladungs-QR</title>
|
||||
<style>
|
||||
:root {
|
||||
--accent: {{ $layout['accent'] }};
|
||||
--secondary: {{ $layout['secondary'] }};
|
||||
--text: {{ $layout['text'] }};
|
||||
--badge: {{ $layout['badge'] }};
|
||||
--container-padding: 48px;
|
||||
--qr-size: 340px;
|
||||
--background: {{ $backgroundStyle }};
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.layout-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: var(--container-padding);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
background: var(--background);
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
background: var(--badge);
|
||||
color: #fff;
|
||||
padding: 10px 18px;
|
||||
border-radius: 999px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.event-title {
|
||||
font-size: 72px;
|
||||
font-weight: 700;
|
||||
line-height: 1.05;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
color: rgba(17, 24, 39, 0.7);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
||||
gap: 40px;
|
||||
margin-top: 48px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.info-card {
|
||||
background: rgba(255, 255, 255, 0.65);
|
||||
border-radius: 32px;
|
||||
padding: 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
|
||||
.info-card h2 {
|
||||
margin: 0;
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.info-card p {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.instructions {
|
||||
margin: 0;
|
||||
padding-left: 22px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.instructions li {
|
||||
font-size: 18px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.link-box {
|
||||
background: var(--secondary);
|
||||
color: var(--text);
|
||||
font-family: "Courier New", Courier, monospace;
|
||||
border-radius: 16px;
|
||||
padding: 18px 20px;
|
||||
font-size: 18px;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.qr-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.qr-wrapper img {
|
||||
width: var(--qr-size);
|
||||
height: var(--qr-size);
|
||||
}
|
||||
|
||||
.cta {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 48px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
font-size: 16px;
|
||||
color: rgba(17, 24, 39, 0.6);
|
||||
}
|
||||
|
||||
.footer strong {
|
||||
color: var(--accent);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layout-wrapper">
|
||||
<div class="header">
|
||||
<span class="badge">Digitale Gästebox</span>
|
||||
<h1 class="event-title">{{ $eventName }}</h1>
|
||||
@if(!empty($layout['subtitle']))
|
||||
<p class="subtitle">{{ $layout['subtitle'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="info-card">
|
||||
<h2>So funktioniert’s</h2>
|
||||
<p>{{ $layout['description'] }}</p>
|
||||
@if(!empty($layout['instructions']))
|
||||
<ul class="instructions">
|
||||
@foreach($layout['instructions'] as $step)
|
||||
<li>{{ $step }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
<div>
|
||||
<div class="cta">Alternative zum Einscannen</div>
|
||||
<div class="link-box">{{ $tokenUrl }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="qr-wrapper">
|
||||
<img src="{{ $qrPngDataUri }}" alt="QR-Code zum Event {{ $eventName }}">
|
||||
<div class="cta">Scan mich & starte direkt</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<div>
|
||||
<strong>{{ config('app.name', 'Fotospiel') }}</strong> – Gästebox & Fotochallenges
|
||||
</div>
|
||||
<div>Einladungsgültigkeit: {{ $joinToken->expires_at ? $joinToken->expires_at->isoFormat('LLL') : 'bis Widerruf' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
159
resources/views/layouts/join-token/svg.blade.php
Normal file
159
resources/views/layouts/join-token/svg.blade.php
Normal file
@@ -0,0 +1,159 @@
|
||||
@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
|
||||
<svg width="{{ $width }}" height="{{ $height }}" viewBox="0 0 {{ $width }} {{ $height }}" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
@if($gradientId)
|
||||
<linearGradient id="{{ $gradientId }}" x1="{{ $x1Attr }}" y1="{{ $y1Attr }}" x2="{{ $x2Attr }}" y2="{{ $y2Attr }}">
|
||||
@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
|
||||
<stop offset="{{ number_format($offset, 2, '.', '') }}%" stop-color="{{ $stopColor }}"/>
|
||||
@endforeach
|
||||
</linearGradient>
|
||||
@endif
|
||||
</defs>
|
||||
|
||||
<style>
|
||||
.title-line {
|
||||
font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
|
||||
font-size: 82px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
.subtitle-line {
|
||||
font-family: 'Lora', 'Georgia', serif;
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.description-line {
|
||||
font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.badge-text {
|
||||
font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 4px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.instruction-bullet {
|
||||
font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
|
||||
font-size: 30px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.instruction-text {
|
||||
font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.small-label {
|
||||
font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 3px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.link-text {
|
||||
font-family: 'Courier New', monospace;
|
||||
font-size: 30px;
|
||||
}
|
||||
.footer-text {
|
||||
font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.footer-strong {
|
||||
font-weight: 700;
|
||||
}
|
||||
</style>
|
||||
|
||||
<rect x="0" y="0" width="{{ $width }}" height="{{ $height }}" fill="{{ $gradientId ? 'url(#'.$gradientId.')' : $background }}" />
|
||||
|
||||
<rect x="70" y="380" width="500" height="600" rx="46" fill="rgba(255,255,255,0.78)" />
|
||||
|
||||
<rect x="600" y="420" width="380" height="380" rx="36" fill="rgba(255,255,255,0.88)" />
|
||||
<rect x="640" y="780" width="300" height="6" rx="3" fill="{{ $accent }}" opacity="0.6" />
|
||||
|
||||
<rect x="80" y="120" width="250" height="70" rx="35" fill="{{ $badgeColor }}" />
|
||||
<text x="205" y="165" text-anchor="middle" fill="#FFFFFF" class="badge-text">Digitale Gästebox</text>
|
||||
|
||||
@foreach($titleLines as $index => $line)
|
||||
<text x="80" y="{{ 260 + $index * 88 }}" fill="{{ $textColor }}" class="title-line">{{ e($line) }}</text>
|
||||
@endforeach
|
||||
|
||||
@php
|
||||
$subtitleOffset = 260 + count($titleLines) * 88 + 40;
|
||||
@endphp
|
||||
@foreach($subtitleLines as $index => $line)
|
||||
<text x="80" y="{{ $subtitleOffset + $index * 44 }}" fill="{{ $secondary }}" class="subtitle-line">{{ e($line) }}</text>
|
||||
@endforeach
|
||||
|
||||
@php
|
||||
$descriptionOffset = $subtitleOffset + (count($subtitleLines) ? count($subtitleLines) * 44 + 60 : 40);
|
||||
@endphp
|
||||
@foreach($descriptionLines as $index => $line)
|
||||
<text x="110" y="{{ $descriptionOffset + $index * 48 }}" fill="{{ $textColor }}" class="description-line">{{ e($line) }}</text>
|
||||
@endforeach
|
||||
|
||||
<text x="120" y="760" fill="{{ $accent }}" class="small-label">SO FUNKTIONIERT'S</text>
|
||||
|
||||
@foreach($instructions as $index => $step)
|
||||
@php
|
||||
$lineY = $instructionStartY + $index * $instructionSpacing;
|
||||
@endphp
|
||||
<circle cx="120" cy="{{ $lineY - 18 }}" r="10" fill="{{ $accent }}" />
|
||||
<text x="150" y="{{ $lineY }}" fill="{{ $textColor }}" class="instruction-text">{{ e($step) }}</text>
|
||||
@endforeach
|
||||
|
||||
<text x="640" y="760" fill="{{ $accent }}" class="small-label">ALTERNATIVER LINK</text>
|
||||
<rect x="630" y="790" width="320" height="120" rx="22" fill="rgba(0,0,0,0.08)" />
|
||||
<text x="650" y="850" fill="{{ $textColor }}" class="link-text">{{ e($tokenUrl) }}</text>
|
||||
|
||||
<image href="{{ $qrPngDataUri }}" x="620" y="440" width="{{ $layout['qr']['size_px'] ?? 340 }}" height="{{ $layout['qr']['size_px'] ?? 340 }}" />
|
||||
|
||||
<text x="820" y="820" text-anchor="middle" fill="{{ $accent }}" class="small-label">JETZT SCANNEN</text>
|
||||
|
||||
<text x="120" y="{{ $height - 160 }}" fill="rgba(17,24,39,0.6)" class="footer-text">
|
||||
<tspan class="footer-strong" fill="{{ $accent }}">{{ e(config('app.name', 'Fotospiel')) }}</tspan>
|
||||
– Gästebox & Fotochallenges
|
||||
</text>
|
||||
<text x="{{ $width - 120 }}" y="{{ $height - 160 }}" text-anchor="end" fill="rgba(17,24,39,0.6)" class="footer-text">
|
||||
Einladung gültig: {{ $joinToken->expires_at ? $joinToken->expires_at->isoFormat('LLL') : 'bis Widerruf' }}
|
||||
</text>
|
||||
</svg>
|
||||
Reference in New Issue
Block a user