get('icons') ?? []) ->reject(fn ($path, $size) => (int) $size < 192) ->map(fn ($path, $size) => ['src' => $branding->url($path), 'sizes' => "{$size}x{$size}", 'type' => 'image/png', 'purpose' => 'any']) ->values(); if ($icons->isEmpty()) { $icons = collect([['src' => $branding->faviconUrl(), 'sizes' => 'any', 'type' => 'image/svg+xml']]); } return response()->json([ 'name' => $branding->portalName(), 'short_name' => mb_substr($branding->portalName(), 0, 12), 'start_url' => '/', 'scope' => '/', 'display' => 'standalone', 'lang' => 'de', 'theme_color' => $branding->primaryColor(), 'background_color' => '#F4F5F7', 'icons' => $icons->all(), ], 200, ['Content-Type' => 'application/manifest+json', 'Cache-Control' => 'public, max-age=3600']); } /** * Anmeldeseite im aktuellen Entwurf – für die Vorschau (Formular ohne Funktion). */ public function loginPreview(Request $request): Response { return Inertia::render('Auth/Login', [ 'canResetPassword' => true, 'providers' => IdentityProvider::forLogin()->map->toLoginButton()->values(), 'preview' => true, ]); } /** * Beispielseite mit Boxen, Tabs, Akkordeon, Tabelle und Schaltflächen. */ public function sample(Request $request, Content $content): Response { $text = fn (string $html) => ['type' => 'text', 'data' => ['html' => $html]]; $box = fn (string $variant, string $title, string $html) => ['type' => 'box', 'data' => ['variant' => $variant, 'title' => $title, 'show_icon' => true], 'items' => [['blocks' => [$text($html)]]]]; $blocks = [ ['type' => 'heading', 'data' => ['text' => 'Überschrift der Seite', 'level' => '2']], $text('
Fließtext mit einem Link in der Akzentfarbe, Hervorhebungen und einer Liste:
Sprechstunde dienstags 14–16 Uhr.
'), $box('warning', 'Warnung', 'Bitte bis Freitag einreichen.
')]], ['blocks' => [$box('success', 'Erfolg', 'Das neue Verfahren gilt ab sofort.
'), $box('highlight', 'Hervorgehoben', 'In der Markenfarbe.
')]], ]], ['type' => 'tabs', 'items' => [ ['title' => 'Erster Tab', 'blocks' => [$text('Inhalt des ersten Tabs.
')]], ['title' => 'Zweiter Tab', 'blocks' => [$text('Inhalt des zweiten Tabs.
')]], ]], ['type' => 'accordion', 'data' => ['first_open' => true], 'items' => [ ['title' => 'Häufige Frage', 'blocks' => [$text('Die Antwort steht hier.
')]], ['title' => 'Noch eine Frage', 'blocks' => [$text('Noch eine Antwort.
')]], ]], ['type' => 'table', 'data' => ['header' => true, 'rows' => [['Bereich', 'Ansprechpartner', 'Durchwahl'], ['Personal', 'A. Beispiel', '123'], ['IT', 'B. Muster', '456']]]], ['type' => 'buttons', 'data' => ['buttons' => [['label' => 'Primäre Schaltfläche', 'url' => '#', 'variant' => 'primary'], ['label' => 'Umrandet', 'url' => '#', 'variant' => 'outline']]]], ]; return Inertia::render('Appearance/Sample', [ 'content' => $content->render($content->sanitize(['blocks' => $blocks]), $request->user()), ]); } }