Compare commits

..
Author SHA1 Message Date
Lars 189da7b967 Merge pull request 'Farbpallette' (#24) from develop into main
Deploy Production / test (push) Successful in 7m51s
Deploy Production / deploy (push) Successful in 47s
Reviewed-on: #24
2026-11-30 06:39:26 +01:00
Lars 3ff8605953 Merge pull request 'Verschieben und kopieren von Abschnitten im CMS' (#23) from develop into main
Deploy Production / test (push) Successful in 6m57s
Deploy Production / deploy (push) Successful in 45s
Reviewed-on: #23
2026-11-28 18:36:59 +01:00
Lars 558e78bc09 Merge pull request 'Bildfassungen und Aufräumen des CMS' (#22) from develop into main
Deploy Production / test (push) Successful in 6m21s
Deploy Production / deploy (push) Successful in 40s
Reviewed-on: #22
2026-11-28 10:38:55 +01:00
Lars 340c5f6b8d Merge pull request 'Kommunikation und Formulareditor, sowie Formular Widget' (#21) from develop into main
Deploy Production / test (push) Successful in 6m2s
Deploy Production / deploy (push) Successful in 44s
Reviewed-on: #21
2026-11-28 08:49:55 +01:00
Lars 2ffabc2128 Merge pull request 'Ergänze das CMS-Widget Hinweiszeile mit optional aufklappbarer Kurzdarstellung' (#20) from develop into main
Deploy Production / test (push) Successful in 4m14s
Deploy Production / deploy (push) Successful in 28s
Reviewed-on: #20
2026-11-27 13:45:36 +01:00
Lars ae2e222077 Merge pull request 'Redaktionskarten Widget' (#19) from develop into main
Deploy Production / test (push) Successful in 4m17s
Deploy Production / deploy (push) Successful in 25s
Reviewed-on: #19
2026-11-27 11:20:26 +01:00
Lars f1e1f355b5 Merge pull request 'cms und widget + neue symbole' (#18) from develop into main
Deploy Production / test (push) Successful in 4m37s
Deploy Production / deploy (push) Successful in 29s
Reviewed-on: #18
2026-11-27 08:38:56 +01:00
Lars c6148589ff Merge pull request 'widget erweiterungen' (#17) from develop into main
Deploy Production / test (push) Successful in 6m14s
Deploy Production / deploy (push) Successful in 41s
Reviewed-on: #17
2026-11-26 17:10:29 +01:00
Lars 2eab8355f1 Merge pull request 'Widges' (#16) from develop into main
Deploy Production / test (push) Successful in 5m45s
Deploy Production / deploy (push) Successful in 42s
Reviewed-on: #16
2026-11-26 12:09:23 +01:00
Lars bf6eac2de9 Merge pull request 'Shopsystem + Widges' (#15) from develop into main
Deploy Production / test (push) Successful in 6m18s
Deploy Production / deploy (push) Successful in 42s
Reviewed-on: #15
2026-11-26 11:16:51 +01:00
Lars 8991efd19a Merge pull request 'Shop Fixes' (#14) from develop into main
Deploy Production / test (push) Successful in 3m26s
Deploy Production / deploy (push) Successful in 33s
Reviewed-on: #14
2026-11-26 05:50:58 +01:00
Lars 46878552db Merge pull request 'Symbol Picker und erweiterte Symbolauswahl' (#13) from develop into main
Deploy Production / test (push) Successful in 5m56s
Deploy Production / deploy (push) Successful in 1m1s
Reviewed-on: #13
2026-11-24 22:16:26 +01:00
Lars 903e8093a2 Merge pull request 'Link Problem im PDF behoben' (#12) from develop into main
Deploy Production / test (push) Successful in 4m49s
Deploy Production / deploy (push) Successful in 39s
Reviewed-on: #12
2026-11-24 21:36:07 +01:00
Lars c442ff7bc9 Merge pull request 'Pdf Vorlagen Manager' (#11) from develop into main
Deploy Production / test (push) Successful in 3m12s
Deploy Production / deploy (push) Successful in 40s
Reviewed-on: #11
2026-11-24 17:04:12 +01:00
Lars c14cdfd0ec Merge pull request 'Dokumente' (#10) from develop into main
Deploy Production / test (push) Successful in 3m10s
Deploy Production / deploy (push) Successful in 32s
Reviewed-on: #10
2026-11-24 13:50:28 +01:00
Lars 7145cf7b8d Merge pull request 'Symbole, neue Widgets, neue Medienfilter' (#9) from develop into main
Deploy Production / test (push) Successful in 2m50s
Deploy Production / deploy (push) Successful in 26s
Reviewed-on: #9
2026-11-24 10:09:22 +01:00
Lars 0e45dae0af Merge pull request 'Minigrafiken im CMS' (#8) from develop into main
Deploy Production / test (push) Successful in 4m27s
Deploy Production / deploy (push) Successful in 41s
Reviewed-on: #8
2026-11-23 21:53:14 +01:00
Lars f782c7d1a1 Merge pull request 'Anbindung Shinkan, Übungsverwaltung' (#7) from develop into main
Deploy Production / test (push) Canceled after 1m34s
Deploy Production / deploy (push) Canceled after 0s
Reviewed-on: #7
2026-11-23 19:10:34 +01:00
Lars e9cb922d04 Merge pull request 'Mitgleiderbereich' (#6) from develop into main
Deploy Production / test (push) Successful in 2m48s
Deploy Production / deploy (push) Successful in 33s
Reviewed-on: #6
2026-11-22 19:16:52 +01:00
Lars 43a7778a33 Merge pull request 'Pixel-System' (#5) from develop into main
Deploy Production / test (push) Successful in 1m59s
Deploy Production / deploy (push) Successful in 28s
Reviewed-on: #5
2026-11-22 16:05:59 +01:00
Lars f8a87827e9 Merge pull request 'http Umleitung auf https in der nginx Konfiguration' (#4) from develop into main
Deploy Production / test (push) Successful in 2m34s
Deploy Production / deploy (push) Successful in 26s
Reviewed-on: #4
2026-11-22 15:20:33 +01:00
Lars 4248ecffb8 Merge pull request 'MVP 1.2 (inkl. Shop)' (#3) from develop into main
Deploy Production / test (push) Successful in 3m1s
Deploy Production / deploy (push) Successful in 50s
Reviewed-on: #3
2026-11-22 11:43:00 +01:00
Lars 759b3e1c02 Merge pull request 'Lasse nginx den App-Container zur Laufzeit auflösen' (#2) from develop into main
Deploy Production / test (push) Successful in 1m8s
Deploy Production / deploy (push) Successful in 24s
Reviewed-on: #2
2026-11-21 07:14:12 +01:00
Lars 57b2131632 Merge pull request 'MVP 1.0 (ohne Shop)' (#1) from develop into main
Deploy Production / test (push) Successful in 1m18s
Deploy Production / deploy (push) Failing after 3m7s
Reviewed-on: #1
2026-11-20 21:58:41 +01:00
8 changed files with 4 additions and 233 deletions

No files matched your search

+4 -11
View File
@@ -172,16 +172,10 @@ 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(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 : ''),
];
}),
->extraAttributes(fn (Get $get): array => [
'class' => 'luf-slots',
'style' => '--luf-slot-cols: '.self::editorColumns($get('layout')),
]),
];
}
@@ -813,7 +807,6 @@ 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>');
}
-98
View File
@@ -1,98 +0,0 @@
<?php
namespace App\Filament\Support;
use App\Domain\Cms\Sections\SectionStyle;
use App\Domain\Cms\Widgets\Support\WebsiteImage;
use App\Domain\Design\ColorContrast;
use App\Domain\Design\DesignPalette;
/**
* Fläche eines Abschnitts für den Seitenaufbau im Editor: die eingestellte Hintergrundfarbe (feste Markenfläche, Farbe
* aus der Palette oder Hintergrundbild), damit sie schon in der Seitenübersicht sichtbar ist und nicht erst in der
* Vorschau. Reine Anzeige; die Ausgabe auf der Website steht im SectionRenderer.
*/
final class SectionSurface
{
/**
* @param array<string, mixed> $style Gestaltung des Abschnitts (roh oder gespeichert)
* @return array{kind: string, label: string, bg: ?string, fg: ?string, image: ?string, dark: bool}
*/
public static function of(array $style): array
{
$style = SectionStyle::fromStored($style);
$background = $style['background'];
if ($background === 'palette') {
$slot = DesignPalette::find($style['palette_slot']);
if ($slot !== null) {
return ['kind' => 'palette', 'label' => $slot['name'], 'bg' => $slot['bg'], 'fg' => $slot['fg'], 'image' => null, 'dark' => ColorContrast::isDarkSurface($slot['fg'], $slot['bg'])];
}
}
if ($background === 'image') {
// Vorschaubreite aus dem Medienmanager (auch ohne Website-Freigabe, wie die Seitenvorschau).
$url = $style['image'] === null ? null : app(WebsiteImage::class)->url($style['image'], true, 640);
return ['kind' => 'image', 'label' => SectionStyle::BACKGROUNDS['image'], 'bg' => null, 'fg' => null, 'image' => $url, 'dark' => $style['overlay'] === 'dark'];
}
foreach (DesignPalette::builtIns() as $built) {
if ($built['key'] === $background) {
return ['kind' => $background === 'default' ? 'default' : 'brand', 'label' => $built['label'], 'bg' => $built['bg'], 'fg' => $built['fg'], 'image' => null, 'dark' => ColorContrast::isDarkSurface($built['fg'], $built['bg'])];
}
}
return ['kind' => 'default', 'label' => SectionStyle::BACKGROUNDS['default'], 'bg' => '#ffffff', 'fg' => '#15243a', 'image' => null, 'dark' => false];
}
/**
* Eigenschaften für den Platzbereich des Abschnitts. Leer bei „Standard“, damit sich dort nichts ändert.
*
* @param array<string, mixed> $style
*/
public static function css(array $style): string
{
$surface = self::of($style);
if ($surface['kind'] === 'default') {
return '';
}
if ($surface['kind'] === 'image') {
return $surface['image'] === null
? '--luf-fl-bg: #d9dee5'
: "--luf-fl-bg: #d9dee5; --luf-fl-img: url('".self::plain($surface['image'])."')";
}
return '--luf-fl-bg: '.$surface['bg'];
}
/**
* Farbfeld im Abschnittskopf. Nur bei eigener Fläche; der Name der Fläche steht in der Kurzangabe daneben, das Feld
* ist daher nur Schmuck für Screenreader (aria-hidden) und im Titel benannt.
*
* @param array<string, mixed> $style
*/
public static function swatch(array $style): string
{
$surface = self::of($style);
if ($surface['kind'] === 'default') {
return '';
}
$css = $surface['kind'] === 'image'
? 'background: #d9dee5'.($surface['image'] === null ? '' : " url('".self::plain($surface['image'])."') center / cover")
: 'background: '.$surface['bg'].'; color: '.$surface['fg'];
return '<span class="luf-abschnitt-flaeche" aria-hidden="true" title="Hintergrund: '.e($surface['label']).'" style="'.e($css).'">Aa</span>';
}
/** Adresse ohne Zeichen, die einen CSS-Wert verlassen könnten. */
private static function plain(string $url): string
{
return preg_replace('/[\s"\'()\\\\]/', '', $url) ?? '';
}
}
@@ -1,21 +0,0 @@
# Abnahme: Hintergrund des Abschnitts im Seitenaufbau
Stand: 30.11.2026. Screenshots: `abnahme/cms-seitenuebersicht-flaechen/`. Prüfung durch Claude lokal im Browser (Playwright, Chromium); die praktische Abnahme durch den Betreiber auf `luf-test` steht aus.
## Was geändert ist
Der Seitenaufbau (Seiteninhalt im Seiteneditor) zeigt die eingestellte Hintergrundfläche jedes Abschnitts:
- **Farbfeld im Abschnittskopf** („Aa“ in Flächen- und Schriftfarbe) neben dem Namen, mit dem Titel „Hintergrund: …“. Die Kurzangabe nennt die Fläche weiterhin als Text (Helle/Dunkle Markenfläche, Markenakzent, Name der Palettenfarbe, Hintergrundbild).
- **Fläche hinter den Plätzen:** Die Plätze des Abschnitts stehen auf einem Rahmen in der Hintergrundfarbe. Die Plätze selbst bleiben helle Karten, damit Texte und Bedienelemente des Editors lesbar bleiben. Bei einem Hintergrundbild steht das Bild (Vorschaubreite) als Rahmen.
- **Abschnitte ohne eigene Fläche** (Standard) bleiben unverändert. Eine Palettenfarbe, die es nicht mehr gibt, erscheint wie auf der Website als Abschnitt ohne Fläche.
- Eine Änderung im Kontext „Abschnitt gestalten“ (Kachel wählen) wirkt nach „Zum Seitenaufbau“ sofort (`nach-farbwahl`).
Reine Anzeige im Editor: Speicherformat, Ausgabe auf der Website und Vorschau ändern sich nicht. Umsetzung: `App\Filament\Support\SectionSurface`, Regeln `.luf-flaeche` und `.luf-abschnitt-flaeche` in `resources/views/filament/cms/styles.blade.php`.
## Geprüft (lokal, Testseite mit sechs Abschnitten: Standard, hell, dunkel, Akzent, zwei Palettenfarben)
- Berechnete Hintergrundfarben des Rahmens stimmen mit den Flächenfarben überein (dunkel rgb(3, 37, 81), Akzent rgb(59, 123, 9), Sand rgb(243, 233, 210), Waldgrün rgb(31, 77, 43)); der Abschnitt ohne Fläche bleibt transparent (`seitenaufbau-breit`).
- Fünf Farbfelder im Kopf, eines je Abschnitt mit Fläche.
- 390 px: kein waagerechtes Scrollen, Rahmen und Farbfeld bleiben sichtbar (`seitenaufbau-schmal`).
- Keine Skriptfehler.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

@@ -94,11 +94,6 @@
/* Ein Platz ist eine leise Fläche statt eines gestrichelten Rahmens; nur ein leerer Platz bleibt gestrichelt. */
.luf-slots .fi-fo-repeater-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; background: var(--vw-paper); border: 0; border-radius: var(--vw-radius-small); box-shadow: none; }
.luf-slots .fi-fo-repeater-item:not(:has(.fi-fo-builder-item)) { background: transparent; box-shadow: inset 0 0 0 1px var(--vw-line-strong); }
/* Hintergrund des Abschnitts (Seitenübersicht): die eingestellte Fläche steht als Rahmen hinter den Plätzen, die Plätze
bleiben helle Karten, damit Bedienelemente und Texte des Editors lesbar bleiben. Ohne eigene Fläche entfällt der Rahmen. */
.luf-slots.luf-flaeche { padding: .5rem; border-radius: var(--vw-radius-small); background-color: var(--luf-fl-bg); background-image: var(--luf-fl-img, none); background-position: center; background-size: cover; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 14%); }
.luf-slots.luf-flaeche .fi-fo-repeater-item:not(:has(.fi-fo-builder-item)) { background: rgb(255 255 255 / 60%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 25%); }
.luf-abschnitt-flaeche { display: inline-flex; align-items: center; justify-content: center; min-width: 1.7rem; height: 1.3rem; padding: 0 .3rem; border-radius: .3rem; font-size: .7rem; font-weight: 700; line-height: 1; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 25%); }
.luf-slots .fi-fo-repeater-item-header { padding: .2rem 0 .2rem .1rem; border: 0; background: transparent; min-height: 0; }
.luf-slots .fi-fo-repeater-item:has(.luf-platz-warnung) { grid-template-columns: minmax(0, 1fr); }
.luf-platz-warnung { display: block; padding: .25rem .5rem; border-radius: .35rem; background: #fff6dc; color: #9a5b00; font-size: .8rem; font-weight: 600; }
-98
View File
@@ -1,98 +0,0 @@
<?php
namespace Tests\Feature;
use App\Domain\Cms\Page;
use App\Domain\Cms\PageService;
use App\Domain\Design\DesignPalette;
use App\Filament\Resources\Pages\Pages\EditPage;
use App\Filament\Support\SectionSurface;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Livewire\Features\SupportTesting\Testable;
use Livewire\Livewire;
use Tests\TestCase;
/**
* Hintergrund des Abschnitts in der Seitenübersicht (Seitenaufbau im Editor): Die eingestellte Fläche steht hinter den
* Plätzen und als Farbfeld im Abschnittskopf. Abschnitte ohne eigene Fläche bleiben unverändert.
*/
class CmsSectionSurfaceTest extends TestCase
{
use RefreshDatabase;
protected function tearDown(): void
{
DesignPalette::flush();
parent::tearDown();
}
/**
* @param list<array<string, mixed>> $styles
*/
private function editor(array $styles): Testable
{
$user = User::factory()->redakteur()->create();
$user->saveAppAuthenticationSecret('JBSWY3DPEHPK3PXP');
$page = Page::query()->create(['path' => '/flaechen']);
$sections = array_map(fn (array $style): array => [
'layout' => 'u4',
'style' => $style,
'slots' => [['type' => 'cards', 'v' => 2, 'variant' => 'standard', 'settings' => ['link_style' => 'text'], 'data' => ['items' => [['title' => 'Eins', 'url' => '/a']]]]],
], $styles);
app(PageService::class)->saveRevision($page, $sections, null, null, null);
return Livewire::actingAs($user, 'staff')->test(EditPage::class, ['record' => $page->id]);
}
public function test_the_brand_surfaces_are_described_with_their_colours(): void
{
$dark = SectionSurface::of(['background' => 'dark']);
$this->assertSame(['brand', '#032551', true], [$dark['kind'], $dark['bg'], $dark['dark']]);
$light = SectionSurface::of(['background' => 'light']);
$this->assertSame(['brand', '#f7f6f2', false], [$light['kind'], $light['bg'], $light['dark']]);
$this->assertSame('', SectionSurface::css([]), 'Ohne eigene Fläche gibt es keine Eigenschaften.');
$this->assertSame('', SectionSurface::swatch(['background' => 'default']));
$this->assertSame('--luf-fl-bg: #3b7b09', SectionSurface::css(['background' => 'accent']));
}
public function test_a_palette_colour_and_a_missing_palette_colour(): void
{
$this->assertSame([], DesignPalette::save(null, 'Sand', '#f3e9d2', '#15243a'));
$id = DesignPalette::slots()[0]['id'];
$surface = SectionSurface::of(['background' => 'palette', 'palette_slot' => $id]);
$this->assertSame(['palette', 'Sand', '#f3e9d2'], [$surface['kind'], $surface['label'], $surface['bg']]);
$this->assertStringContainsString('--luf-fl-bg: #f3e9d2', SectionSurface::css(['background' => 'palette', 'palette_slot' => $id]));
// Wie auf der Website: eine Farbe, die es nicht mehr gibt, erscheint als Abschnitt ohne eigene Fläche.
$this->assertSame('', SectionSurface::css(['background' => 'palette', 'palette_slot' => 'c99']));
}
public function test_an_image_without_a_usable_address_gets_a_neutral_surface_and_never_leaks_markup(): void
{
$this->assertSame('--luf-fl-bg: #d9dee5', SectionSurface::css(['background' => 'image']));
$this->assertStringContainsString('Hintergrundbild', SectionSurface::swatch(['background' => 'image']));
}
public function test_the_editor_shows_the_surface_behind_the_slots_and_in_the_header(): void
{
$this->assertSame([], DesignPalette::save(null, 'Sand', '#f3e9d2', '#15243a'));
$component = $this->editor([
[],
['background' => 'dark'],
['background' => 'palette', 'palette_slot' => DesignPalette::slots()[0]['id']],
]);
$html = $component->html();
$this->assertSame(2, substr_count($html, 'luf-slots luf-flaeche'), 'Nur die beiden Abschnitte mit eigener Fläche erhalten den Rahmen.');
$this->assertStringContainsString('--luf-fl-bg: #032551', $html);
$this->assertStringContainsString('--luf-fl-bg: #f3e9d2', $html);
$this->assertSame(2, substr_count($html, 'luf-abschnitt-flaeche" aria-hidden'), 'Je Abschnitt mit Fläche ein Farbfeld im Kopf.');
$this->assertStringContainsString('Hintergrund: Dunkle Markenfläche', $html);
$this->assertStringContainsString('Hintergrund: Sand', $html);
}
}