Files
fewo-stommer/resources/themes/seebad/views/partials/motif.blade.php
T
LarsandClaude Opus 5.5 a9ad4dbf0b Theme Seebad: first version of design direction A
- New child theme "seebad": Newsreader + Atkinson Hyperlegible Next (self-hosted), larger base size,
  tokens chalk white / ink blue / brick / evening blue
- Picture world "Ostsee" as inline SVG slots (partials/motif): villa mark, wave bands, shell, gulls, vignettes
- Own layout, header (mobile menu as dark panel with call button), footer, banner, mobile booking bar
- Sections: hero with arch photo and search box, facts, text_image, location, host, cta in cartouche
- Wishes to the application recorded in ZUSAMMENARBEIT.md §5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 08:22:23 +02:00

31 lines
1.7 KiB
PHP

{{--
Inline graphic of the theme's picture world ("Bildwelt", docs/DESIGN-KONZEPT.md §7, MANDANTEN-ANFORDERUNGEN A18/A19).
Templates ask for a slot, never for a file, so a later picture-world system can replace the mapping below.
Variables: $slot (mark, divider, closing, crest, gulls, vignette.beach|pier|train|bike|forest), $class (optional),
$label (optional; without it the graphic is decorative).
--}}
@php
$motifFiles = [
'mark' => 'villa',
'divider' => 'band-sonne',
'closing' => 'band-seebruecke',
'crest' => 'muschel',
'gulls' => 'moewen',
'vignette.beach' => 'vignette-strand',
'vignette.pier' => 'vignette-seebruecke',
'vignette.train' => 'vignette-molli',
'vignette.bike' => 'vignette-rad',
'vignette.forest' => 'vignette-wald',
];
static $motifSvgs = [];
$motifFile = $motifFiles[$slot] ?? null;
$motifPath = $motifFile ? resource_path("themes/seebad/motifs/{$motifFile}.svg") : null;
$motifSvgs[$slot] ??= $motifPath && is_file($motifPath) ? file_get_contents($motifPath) : '';
$motifUid = 'm'.\Illuminate\Support\Str::lower(\Illuminate\Support\Str::random(6));
$motifSvg = preg_replace(['/\s(role|aria-label|aria-hidden)="[^"]*"/', '/<title>.*?<\/title>/s'], '', $motifSvgs[$slot]);
$motifSvg = preg_replace(['/id="([^"]+)"/', '/url\(#([^)]+)\)/'], ['id="$1-'.$motifUid.'"', 'url(#$1-'.$motifUid.')'], $motifSvg);
$motifAttributes = 'class="'.e($class ?? '').'" '.(isset($label) ? 'role="img" aria-label="'.e($label).'"' : 'aria-hidden="true" focusable="false"');
$motifSvg = preg_replace('/<svg\s/', '<svg '.$motifAttributes.' ', $motifSvg, 1);
@endphp
{!! $motifSvg !!}