Zeige den Abschnittshintergrund im Seitenaufbau des Editors
Farbfeld im Abschnittskopf und die eingestellte Fläche (Markenfläche, Palettenfarbe, Hintergrundbild) als Rahmen hinter den Plätzen. Reine Anzeige im Editor; Speicherformat und Ausgabe bleiben unverändert. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
63ad125859
commit
aca713c6ba
8 files changed
+233
-4
No files matched your search
@@ -172,10 +172,16 @@ private static function sectionSchema(): array
|
||||
->reorderAction(fn (Action $action): Action => $action->label('Baustein auf einen anderen Platz ziehen')->tooltip('Baustein auf einen anderen Platz ziehen'))
|
||||
->itemLabel(fn (array $state, ?int $index, Get $get): HtmlString => self::slotLabel($state, $index, $get('layout')))
|
||||
->default(fn (): array => self::arrangeSlots([], SectionLayouts::DEFAULT))
|
||||
->extraAttributes(fn (Get $get): array => [
|
||||
'class' => 'luf-slots',
|
||||
'style' => '--luf-slot-cols: '.self::editorColumns($get('layout')),
|
||||
]),
|
||||
->extraAttributes(function (Get $get): array {
|
||||
// Die eingestellte Hintergrundfarbe steht schon im Seitenaufbau hinter den Plätzen (nur bei eigener Fläche).
|
||||
$style = $get('style');
|
||||
$surface = SectionSurface::css(is_array($style) ? $style : []);
|
||||
|
||||
return [
|
||||
'class' => 'luf-slots'.($surface !== '' ? ' luf-flaeche' : ''),
|
||||
'style' => '--luf-slot-cols: '.self::editorColumns($get('layout')).($surface !== '' ? '; '.$surface : ''),
|
||||
];
|
||||
}),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -807,6 +813,7 @@ private static function sectionLabel(array $state, ?int $index): HtmlString
|
||||
return new HtmlString('<span class="luf-abschnitt'.($hidden ? ' is-ausgeblendet' : '').'" title="'.e(($given !== null ? $number.' · ' : '').$full).'"><span class="luf-abschnitt-nr">'.e($text).'</span>'
|
||||
.($given !== null ? '<span class="luf-abschnitt-nummer" aria-hidden="true">'.e($number).'</span>' : '')
|
||||
.$badges
|
||||
.SectionSurface::swatch(is_array($state['style'] ?? null) ? $state['style'] : [])
|
||||
.'<span class="luf-abschnitt-meta" aria-hidden="true">'.e(implode(' · ', $meta)).'</span>'
|
||||
.'<span class="vw-sr">: '.e($spoken).'</span></span>');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user