Mache jede Seite in der Liste auffindbar, binde die freigegebene Wortmarke ein und erlaube Abstand oben.
- Seitenliste: zuletzt bearbeitete Seiten zuerst, „Zuletzt bearbeitet“ in deutscher Zeit (jede Revision und Veröffentlichung aktualisiert die Seite), Pfad und Datum sortierbar, 25/50/100 je Seite. Bisher stand eine neue Seite ohne Suche auf einer späteren Listenseite. - Kopfzeile und Fußbereich zeigen die freigegebene Lara-&-Felix- Wortmarke (Kompaktfassung aus Brand-UI-Kit 08) als zugeschnittene WebP-Ableitung mit festen Maßen; Ausgangszustand ≈ 80 px, kompakt 60 px, Smartphone 48 px. Mitgliederbereich unverändert. - Abschnittsgestaltung „Abstand oben“ (wie Abstand / gering / kein): Der erste Abschnitt kann direkt unter der Kopfzeile beginnen; der Abstand unten und alle anderen Abschnitte bleiben unverändert. Tests: Erwartung an die Wortmarke bewusst angepasst (brand-logo statt brand-lockup); neue Tests für Liste, Bearbeitungsdatum und Abstand oben. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
87a7ffc45f
commit
89fd95b243
18 files changed
+196
-41
No files matched your search
@@ -148,6 +148,9 @@ private function storeRevision(Page $page, array $blocks, ?array $sections, ?str
|
||||
|
||||
$revision = $page->revisions()->create($attributes);
|
||||
|
||||
// „Geändert“ in der Seitenliste zeigt die letzte Bearbeitung, nicht das Anlagedatum.
|
||||
$page->touch();
|
||||
|
||||
foreach ($this->sections->mediaPaths($revision->sections()) as $path) {
|
||||
PublishPublicMedia::dispatch($path);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* Abschnitts- und Slotmodell einer Seite: Seite → Abschnitte → Slots → Widget-Instanzen.
|
||||
*
|
||||
* Gespeicherte Hülle eines Abschnitts (Version 1):
|
||||
* {id, v, layout, style: {background, image, focus, overlay, width, spacing, divider}, slots: [Widget-Hülle|null, …]}
|
||||
* {id, v, layout, style: {background, image, focus, overlay, width, spacing, spacing_top, divider}, slots: [Widget-Hülle|null, …]}
|
||||
*
|
||||
* Jeder Slot enthält höchstens ein Widget aus dem zentralen Widget-Register. Abschnitte sind nicht verschachtelbar.
|
||||
* Revisionen ohne Abschnitte (Bestand vor dieser Fassung) werden beim Lesen als einspaltige Abschnitte gelesen.
|
||||
|
||||
@@ -82,6 +82,7 @@ private function renderSection(array $section, array $cells, int $index): string
|
||||
'section-bg-'.($hasImage ? 'image' : ($style['background'] === 'image' ? 'default' : $style['background'])),
|
||||
'section-width-'.$style['width'],
|
||||
'section-space-'.$style['spacing'],
|
||||
...($style['spacing_top'] !== 'same' ? ['section-space-top-'.$style['spacing_top']] : []),
|
||||
'section-layout-'.str_replace('_', '-', $section['layout']),
|
||||
];
|
||||
|
||||
|
||||
@@ -32,6 +32,18 @@ final class SectionStyle
|
||||
'large' => 'Großzügig',
|
||||
];
|
||||
|
||||
/**
|
||||
* Abweichender Abstand oben, zum Beispiel damit ein Einstieg direkt unter der Kopfzeile beginnt.
|
||||
* Ergänzt „Abstand oben und unten“, ersetzt ihn nicht; der Abstand unten bleibt unverändert.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
public const SPACINGS_TOP = [
|
||||
'same' => 'Wie „Abstand oben und unten“',
|
||||
'small' => 'Gering',
|
||||
'none' => 'Kein Abstand',
|
||||
];
|
||||
|
||||
/** @var array<string, string> */
|
||||
public const DIVIDERS = [
|
||||
'none' => 'Kein Trenner',
|
||||
@@ -80,6 +92,7 @@ final class SectionStyle
|
||||
'overlay' => 'light',
|
||||
'width' => 'standard',
|
||||
'spacing' => 'normal',
|
||||
'spacing_top' => 'same',
|
||||
'divider' => 'none',
|
||||
];
|
||||
|
||||
@@ -96,6 +109,7 @@ public static function enums(): array
|
||||
'overlay' => self::OVERLAYS,
|
||||
'width' => self::WIDTHS,
|
||||
'spacing' => self::SPACINGS,
|
||||
'spacing_top' => self::SPACINGS_TOP,
|
||||
'divider' => self::DIVIDERS,
|
||||
];
|
||||
}
|
||||
@@ -104,7 +118,7 @@ public static function enums(): array
|
||||
* Lesepfad: gespeicherte Werte; Unbekanntes fällt auf die Vorgabe zurück, damit alte oder fremde Daten
|
||||
* nie eine Seite brechen.
|
||||
*
|
||||
* @return array{background: string, image: ?string, focus: string, overlay: string, width: string, spacing: string, divider: string}
|
||||
* @return array{background: string, image: ?string, focus: string, overlay: string, width: string, spacing: string, spacing_top: string, divider: string}
|
||||
*/
|
||||
public static function fromStored(mixed $style): array
|
||||
{
|
||||
@@ -141,6 +155,10 @@ public static function summary(array $style): string
|
||||
$parts[] = 'Abstand '.mb_strtolower(self::SPACINGS[$style['spacing']]);
|
||||
}
|
||||
|
||||
if ($style['spacing_top'] !== 'same') {
|
||||
$parts[] = 'oben '.mb_strtolower(self::SPACINGS_TOP[$style['spacing_top']]);
|
||||
}
|
||||
|
||||
if ($style['divider'] !== 'none') {
|
||||
$parts[] = 'Trenner: '.self::DIVIDERS[$style['divider']];
|
||||
}
|
||||
|
||||
@@ -75,13 +75,20 @@ public static function form(Schema $schema): Schema
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
// Zuletzt bearbeitete Seiten zuerst; jede Seite ist ohne Suche auffindbar (Spalten sortierbar, bis 100 je Seite).
|
||||
->columns([
|
||||
TextColumn::make('path')->label('Pfad')->searchable(),
|
||||
TextColumn::make('path')->label('Pfad')->searchable()->sortable(),
|
||||
TextColumn::make('published_revision_id')
|
||||
->label('Veröffentlicht')
|
||||
->formatStateUsing(fn ($state): string => $state ? 'Ja' : 'Entwurf'),
|
||||
TextColumn::make('updated_at')->label('Geändert')->dateTime('d.m.Y H:i'),
|
||||
TextColumn::make('updated_at')
|
||||
->label('Zuletzt bearbeitet')
|
||||
->dateTime('d.m.Y H:i', timezone: 'Europe/Berlin')
|
||||
->sortable(),
|
||||
])
|
||||
->defaultSort('updated_at', 'desc')
|
||||
->paginated([25, 50, 100])
|
||||
->defaultPaginationPageOption(25)
|
||||
->recordUrl(fn (Page $record): string => static::getUrl('edit', ['record' => $record]))
|
||||
->recordActions([
|
||||
Action::make('duplicate')
|
||||
|
||||
@@ -148,6 +148,12 @@ private static function styleFields(): array
|
||||
->options(SectionStyle::SPACINGS)
|
||||
->default('normal')
|
||||
->selectablePlaceholder(false),
|
||||
Select::make('spacing_top')
|
||||
->label('Abstand oben')
|
||||
->options(SectionStyle::SPACINGS_TOP)
|
||||
->default('same')
|
||||
->selectablePlaceholder(false)
|
||||
->helperText('Zum Beispiel „Kein Abstand“, damit ein Einstieg direkt unter der Kopfzeile beginnt. Der Abstand unten bleibt.'),
|
||||
Select::make('divider')
|
||||
->label('Trenner zum nächsten Abschnitt')
|
||||
->options(SectionStyle::DIVIDERS)
|
||||
|
||||
Reference in new issue
Block a user