Füge die zentrale Farbpalette und die Hintergrundbreite für Abschnitte hinzu (ADR-67)
- DesignPalette: bis zu zehn benannte Farben (Hintergrund und Schrift) in site_settings, stabile Kennungen, Kontrastprüfung 4,5:1 auf dem Server, Verwendungssuche - Seite Website → Design → Farben (Systemverwalter): Kacheln, Dialog mit Live-Vorschau, Kontrastwarnung mit Empfehlung, Bestätigung mit betroffenen Seiten, Entfernen gesperrt bei Verwendung - Hintergrund „Farbe aus der Palette“ als Verweis im bestehenden Feld background; farbige Kacheln im Editor - Renderer leitet Bedeutungswerte aus Hintergrund und Schrift ab; scope-dark bei heller Schrift - Hintergrundbreite: volle Browserbreite (Vorgabe) oder auf Abschnittsbreite begrenzt - Test sichert die Ausgabe aller bisherigen Varianten byte-gleich; Abnahme mit Screenshots Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
62f3a33541
commit
87de5a62d4
41 files changed
+2372
-14
No files matched your search
@@ -0,0 +1,55 @@
|
||||
{{--
|
||||
Hintergrund des Abschnitts als farbige Kacheln (ADR-67). Eine Kachel zeigt Fläche, Schriftfarbe und Namen; die gewählte
|
||||
ist durch Rahmen und Haken markiert (nicht nur durch Farbe). Native Optionsfelder: Pfeiltasten wechseln die Auswahl,
|
||||
Tab verlässt die Gruppe. Palettenfarben schreiben „background = palette“ und „palette_slot“ gemeinsam in einer Anfrage.
|
||||
--}}
|
||||
@php
|
||||
$statePath = $getStatePath();
|
||||
$slotPath = \Illuminate\Support\Str::beforeLast($statePath, '.background').'.palette_slot';
|
||||
$wert = $getState();
|
||||
$aktuellerSlot = data_get($this, $slotPath);
|
||||
$aktuell = $wert === 'palette' && is_string($aktuellerSlot) ? 'palette:'.$aktuellerSlot : (string) $wert;
|
||||
$kacheln = \App\Filament\Support\BackgroundField::tiles();
|
||||
$gruppe = 'flaeche-'.md5($statePath);
|
||||
$darfPflegen = \App\Filament\Pages\DesignFarben::canAccess();
|
||||
@endphp
|
||||
<x-dynamic-component :component="$getFieldWrapperView()" :field="$field">
|
||||
<fieldset class="luf-flaechen" x-data="{ gewaehlt: @js($aktuell) }">
|
||||
<legend class="luf-flaechen-legende">Fläche des Abschnitts wählen</legend>
|
||||
<div class="luf-flaechen-raster">
|
||||
@foreach ($kacheln as $kachel)
|
||||
<label @class(['luf-flaeche', 'is-bild' => $kachel['kind'] === 'image', 'is-hell' => $kachel['kind'] === 'default']) wire:key="{{ $gruppe }}-{{ $kachel['id'] }}"
|
||||
x-bind:class="{ 'is-gewaehlt': gewaehlt === @js($kachel['id']) }">
|
||||
<input type="radio" name="{{ $gruppe }}" value="{{ $kachel['id'] }}" class="luf-flaeche-eingabe"
|
||||
@checked($aktuell === $kachel['id'])
|
||||
x-on:change="gewaehlt = @js($kachel['id']); $wire.$set(@js($slotPath), @js($kachel['slot']), false); $wire.$set(@js($statePath), @js($kachel['value']), true)">
|
||||
<span class="luf-flaeche-probe"
|
||||
@if ($kachel['bg'] !== null) style="background: {{ $kachel['bg'] }}; color: {{ $kachel['fg'] }};" @endif>
|
||||
@if ($kachel['kind'] === 'image')
|
||||
<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="9" cy="10" r="1.6"/><path d="m4 18 5.5-5.5 4 4 2.5-2.5L20 18"/></svg>
|
||||
@else
|
||||
<span class="luf-flaeche-aa" aria-hidden="true">Aa</span>
|
||||
@endif
|
||||
<svg class="luf-flaeche-haken" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12.5 4.5 4.5L19 7.5"/></svg>
|
||||
</span>
|
||||
<span class="luf-flaeche-name">{{ $kachel['label'] }}</span>
|
||||
@if ($kachel['kind'] === 'palette')
|
||||
<span class="luf-flaeche-art">Palette</span>
|
||||
@elseif ($kachel['kind'] === 'brand')
|
||||
<span class="luf-flaeche-art">Marke, fest</span>
|
||||
@endif
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
<p class="luf-flaechen-hilfe">
|
||||
@if (\App\Domain\Design\DesignPalette::slots() === [])
|
||||
Noch keine eigenen Farben angelegt.
|
||||
@endif
|
||||
@if ($darfPflegen)
|
||||
<a href="{{ \App\Filament\Pages\DesignFarben::getUrl() }}" target="_blank" rel="noopener">Farbpalette verwalten</a>
|
||||
@else
|
||||
Die Farbpalette pflegt die Systemverwaltung (Website → Design → Farben).
|
||||
@endif
|
||||
</p>
|
||||
</fieldset>
|
||||
</x-dynamic-component>
|
||||
@@ -56,6 +56,26 @@
|
||||
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-content > .fi-sc > .fi-sc-component:not(:has(*)) { display: none; }
|
||||
.luf-link-pfad { font-family: ui-monospace, monospace; font-size: .85em; overflow-wrap: anywhere; }
|
||||
|
||||
/* Hintergrund des Abschnitts als farbige Kacheln (ADR-67). Die Fläche selbst zeigt Farbe und Schriftfarbe; die Auswahl
|
||||
erkennt man am Rahmen und am Haken, nicht nur an der Farbe. */
|
||||
.luf-flaechen { min-width: 0; margin: 0; padding: 0; border: 0; }
|
||||
.luf-flaechen-legende { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
||||
.luf-flaechen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr)); gap: .5rem; }
|
||||
.luf-flaeche { position: relative; display: grid; grid-template-rows: auto auto auto; align-content: start; gap: .2rem; padding: .3rem; border: 2px solid transparent; border-radius: .6rem; cursor: pointer; background: transparent; }
|
||||
.luf-flaeche:hover { background: rgb(0 0 0 / 4%); }
|
||||
.luf-flaeche-eingabe { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
|
||||
.luf-flaeche:has(.luf-flaeche-eingabe:focus-visible) { outline: 3px solid #1769aa; outline-offset: 2px; }
|
||||
.luf-flaeche.is-gewaehlt { border-color: #1769aa; background: #eef5fb; }
|
||||
.luf-flaeche-probe { position: relative; display: grid; place-items: center; height: 3.4rem; border-radius: .4rem; border: 1px solid rgb(3 37 81 / 28%); overflow: hidden; }
|
||||
.luf-flaeche.is-bild .luf-flaeche-probe { background: repeating-linear-gradient(135deg, #e8eef5 0 .5rem, #f5f8fb .5rem 1rem); color: #3e4c5c; }
|
||||
.luf-flaeche-aa { font-size: 1.35rem; font-weight: 750; line-height: 1; }
|
||||
.luf-flaeche-haken { position: absolute; top: .25rem; right: .25rem; display: none; padding: .15rem; width: 1.3rem; height: 1.3rem; border-radius: 999px; background: #1769aa; color: #fff; }
|
||||
.luf-flaeche.is-gewaehlt .luf-flaeche-haken { display: block; }
|
||||
.luf-flaeche-name { font-size: .8rem; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }
|
||||
.luf-flaeche-art { font-size: .7rem; line-height: 1.2; color: #3e4c5c; }
|
||||
.luf-flaechen-hilfe { margin: .5rem 0 0; font-size: .8rem; color: #3e4c5c; }
|
||||
.luf-flaechen-hilfe a { text-decoration: underline; }
|
||||
|
||||
/* Rasterauswahl als grafische Kacheln */
|
||||
.luf-layout-picker .fi-btn-group { flex-wrap: wrap; gap: .5rem; }
|
||||
.luf-layout-picker .fi-btn { min-height: 3.25rem; padding: .35rem .6rem; border-radius: .5rem !important; }
|
||||
|
||||
Reference in new issue
Block a user