Mandantenabschluss: Marken, Vertragsdateien und Archive trennen
Deploy FeWo mit PipelineManager / deploy (push) Successful in 2m23s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 2m23s
This commit is contained in:
1 parent
86374b1659
commit
06df80e4db
45 files changed
+592
-99
No files matched your search
@@ -1,16 +1,8 @@
|
||||
{{--
|
||||
Inline brand graphic from public/brand/<name>.svg (mark, logo, wave-divider, icon-apartment, icon-sea,
|
||||
icon-terrace, icon-location). Inline, so the colours follow the CSS variables --brand-navy/-teal/-wave/-sun
|
||||
(theme-base.css maps navy to the text colour, so it stays visible in dark appearances).
|
||||
Variables: $name, $class (optional), $label (optional; without it the graphic is decorative).
|
||||
--}}
|
||||
@php
|
||||
static $brandSvgs = [];
|
||||
$brandSvgs[$name] ??= is_file(public_path("brand/{$name}.svg")) ? file_get_contents(public_path("brand/{$name}.svg")) : '';
|
||||
$brandUid = 'b'.\Illuminate\Support\Str::lower(\Illuminate\Support\Str::random(6));
|
||||
$brandSvg = preg_replace(['/\s(role|aria-label)="[^"]*"/', '/<title>.*?<\/title>/s'], '', $brandSvgs[$name]);
|
||||
$brandSvg = preg_replace(['/id="([^"]+)"/', '/url\(#([^)]+)\)/'], ['id="$1-'.$brandUid.'"', 'url(#$1-'.$brandUid.')'], $brandSvg);
|
||||
$brandAttributes = 'class="'.e($class ?? '').'" '.(isset($label) ? 'role="img" aria-label="'.e($label).'"' : 'aria-hidden="true" focusable="false"');
|
||||
$brandSvg = preg_replace('/<svg\s/', '<svg '.$brandAttributes.' ', $brandSvg, 1);
|
||||
@endphp
|
||||
{!! $brandSvg !!}
|
||||
{{-- Identity comes from the website, decoration from picture-world slots. --}}
|
||||
@if (in_array($name, ['mark', 'logo'], true))
|
||||
@if ($logo = $theme->brand('logo'))
|
||||
<img src="{{ $logo }}" alt="{{ $label ?? '' }}" class="{{ $class ?? '' }}" decoding="async">
|
||||
@endif
|
||||
@else
|
||||
{!! $theme->motif($name === 'wave-divider' ? 'divider' : $name, $class ?? null, $label ?? null) !!}
|
||||
@endif
|
||||
Reference in new issue
Block a user