Stabilisiere den Website-Rahmen und veredele die zentralen Widgets.
Designiteration 1 auf Grundlage des Brand-UI-Kits (vorläufige Werte): - Kopfzeile mit konstanter Box und zwei Zuständen (großzügig, kompakt beim Scrollen) ohne Layoutsprung; Navigation bricht nie um, sondern verkürzt erst den Kontozugang und schaltet dann in den Menümodus. Scrollbalken-Reserve, gemeinsames Breitenmodell (Lesebereich, Standard, Breit, Vollbreite), Wortmarke und Inhalt fluchten. - Fokusfalle im Mobilmenü schließt auch den Weg von der Menü-Schaltfläche in den Inhalt. - Fußbereich mit Grundzeile für rechtliche Links und grünem Bogen. - Markenakzente (Unterstreichung, Strahlen, Bogen) als Komponenten. - Hero: Varianten Markenbühne (randlos) und Editorial, zweite Schaltfläche, Bildausschnitt. Bild und Text: Bildformat und Ausschnitt. Karten: hervorgehobene erste Karte, ganze Karte klickbar. Programmkarten mit Markentafel. Alles additiv, ohne neue Version. Testanpassungen: Die Website-Wortmarke trägt jetzt brand-lockup, die erste Hero-Schaltfläche button-brand (beabsichtigte Gestaltung). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a5e5290f1
commit
33aaf64024
31 files changed
+1646
-357
No files matched your search
@@ -15,6 +15,7 @@
|
||||
* - Ein Abschnitt ohne darstellbares Widget entfällt samt Hintergrund und Trenner.
|
||||
* - Das erste dargestellte Widget der Seite ist der Seiteneinstieg (Überschrift erster Ordnung).
|
||||
* - Trenner stehen zwischen Abschnitten, nie nach dem letzten.
|
||||
* - Steht ein randloses Widget (WidgetType::bleeds) allein im Abschnitt, entfallen Innenabstand und Breitenbegrenzung.
|
||||
*/
|
||||
class SectionRenderer
|
||||
{
|
||||
@@ -43,7 +44,7 @@ public function renderAll(array $sections, RenderContext $context): HtmlString
|
||||
|
||||
if ($html !== '') {
|
||||
$first = false;
|
||||
$cells[] = ['units' => $slotUnits, 'html' => $html];
|
||||
$cells[] = ['units' => $slotUnits, 'html' => $html, 'bleeds' => $this->widgets->bleeds($widget)];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +70,7 @@ public function renderAll(array $sections, RenderContext $context): HtmlString
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $section
|
||||
* @param list<array{units: int, html: string}> $cells
|
||||
* @param list<array{units: int, html: string, bleeds: bool}> $cells
|
||||
*/
|
||||
private function renderSection(array $section, array $cells, int $index): string
|
||||
{
|
||||
@@ -105,6 +106,10 @@ private function renderSection(array $section, array $cells, int $index): string
|
||||
$classes[] = 'section-divider-space';
|
||||
}
|
||||
|
||||
if (count($cells) === 1 && $cells[0]['bleeds']) {
|
||||
$classes[] = 'section-bleed';
|
||||
}
|
||||
|
||||
$id = is_string($section['id'] ?? null) ? ' id="bereich-'.e($section['id']).'"' : '';
|
||||
$html = '<div class="'.e(implode(' ', $classes)).'"'.$id.'>';
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ final class SectionStyle
|
||||
|
||||
/** @var array<string, string> */
|
||||
public const WIDTHS = [
|
||||
'narrow' => 'Schmal (Lesebreite)',
|
||||
'narrow' => 'Lesebereich',
|
||||
'standard' => 'Standard',
|
||||
'wide' => 'Breit',
|
||||
'full' => 'Volle Breite',
|
||||
'full' => 'Vollbreite',
|
||||
];
|
||||
|
||||
/** @var array<string, string> */
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\Cms\Widgets\Support;
|
||||
|
||||
use App\Domain\Cms\Sections\SectionStyle;
|
||||
|
||||
/**
|
||||
* Bildausschnitt für Widget-Bilder: dieselben Fokuspunkte wie beim Abschnittshintergrund (SectionStyle::FOCUS).
|
||||
* Der Fokus bestimmt den Zuschnitt, wenn ein Bild in ein festes Seitenverhältnis gesetzt wird.
|
||||
*/
|
||||
final class ImageFocus
|
||||
{
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function options(): array
|
||||
{
|
||||
return SectionStyle::FOCUS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $settings
|
||||
*/
|
||||
public static function position(array $settings, string $key = 'focus'): string
|
||||
{
|
||||
$focus = $settings[$key] ?? 'center';
|
||||
|
||||
return SectionStyle::FOCUS_POSITIONS[is_string($focus) && isset(SectionStyle::FOCUS_POSITIONS[$focus]) ? $focus : 'center'];
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public function label(): string
|
||||
|
||||
public function description(): string
|
||||
{
|
||||
return 'Mehrere Karten mit Titel, Text, Linkziel und optionalem Bild. Als Raster oder kompakte Liste.';
|
||||
return 'Mehrere Karten mit Titel, Text, Linkziel und optionalem Bild. Als Raster, kompakte Liste oder mit hervorgehobener erster Karte.';
|
||||
}
|
||||
|
||||
public function minUnits(): int
|
||||
@@ -49,7 +49,7 @@ public function stages(): array
|
||||
{
|
||||
return [
|
||||
'narrow' => 'eine Karte je Zeile',
|
||||
'wide' => 'so viele Karten nebeneinander, wie bei mindestens 14rem Kartenbreite passen',
|
||||
'wide' => 'so viele Karten nebeneinander, wie bei mindestens 15rem Kartenbreite passen; hervorgehobene Karte ab 44rem mit Bild neben dem Text',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ public function variants(): array
|
||||
return [
|
||||
'standard' => 'Raster',
|
||||
'compact' => 'Kompakte Liste',
|
||||
'featured' => 'Erste Karte hervorgehoben',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Domain\Cms\Widgets\Types;
|
||||
|
||||
use App\Domain\Cms\Widgets\RenderContext;
|
||||
use App\Domain\Cms\Widgets\Support\ImageFocus;
|
||||
use App\Domain\Cms\Widgets\Support\ImageRefFields;
|
||||
use App\Domain\Cms\Widgets\Support\PublicMedia;
|
||||
use App\Domain\Cms\Widgets\Support\SafeUrl;
|
||||
@@ -27,7 +28,7 @@ public function label(): string
|
||||
|
||||
public function description(): string
|
||||
{
|
||||
return 'Großer Seiteneinstieg mit Überschrift, Beschreibung, optionalem Bild und optionaler Schaltfläche.';
|
||||
return 'Großer Seiteneinstieg mit Überschrift, Beschreibung, optionalem Bild und bis zu zwei Schaltflächen. Als Markenbühne randlos über die volle Breite.';
|
||||
}
|
||||
|
||||
public function minUnits(): int
|
||||
@@ -43,8 +44,8 @@ public function preferredUnits(): int
|
||||
public function stages(): array
|
||||
{
|
||||
return [
|
||||
'narrow' => 'unter 48rem Slotbreite: Bild unter dem Text',
|
||||
'wide' => 'ab 48rem: Bild neben dem Text, größere Überschrift',
|
||||
'narrow' => 'unter 48rem Slotbreite: Bild über beziehungsweise unter dem Text',
|
||||
'wide' => 'ab 48rem: Bild neben dem Text, größere Überschrift; Markenbühne ab 56rem mit Text auf dem Bild',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -63,9 +64,32 @@ public function variants(): array
|
||||
return [
|
||||
'standard' => 'Standard (Bild neben dem Text)',
|
||||
'highlight' => 'Hervorgehoben (Markenfläche)',
|
||||
'stage' => 'Markenbühne (großes Bild, randlos)',
|
||||
'editorial' => 'Editorial (textbetont)',
|
||||
];
|
||||
}
|
||||
|
||||
public function settings(): array
|
||||
{
|
||||
return [
|
||||
'focus' => ImageFocus::options(),
|
||||
'text_side' => ['left' => 'Links', 'right' => 'Rechts'],
|
||||
];
|
||||
}
|
||||
|
||||
public function settingLabels(): array
|
||||
{
|
||||
return [
|
||||
'focus' => ['Bildausschnitt', 'Welcher Bildteil bei engen Zuschnitten sichtbar bleibt.'],
|
||||
'text_side' => ['Textseite (Markenbühne)', 'Auf welcher Seite der Text über dem Bild steht. Vorgabe: rechts.'],
|
||||
];
|
||||
}
|
||||
|
||||
public function bleeds(array $widget): bool
|
||||
{
|
||||
return ($widget['variant'] ?? null) === 'stage' && PublicMedia::isPublicPath($widget['refs']['image'] ?? null);
|
||||
}
|
||||
|
||||
public function dataRules(): array
|
||||
{
|
||||
return [
|
||||
@@ -73,6 +97,8 @@ public function dataRules(): array
|
||||
'text' => ['nullable', 'string', 'max:600'],
|
||||
'cta_label' => ['nullable', 'string', 'max:80', 'required_with:data.cta_url'],
|
||||
'cta_url' => ['nullable', 'string', 'max:500', 'required_with:data.cta_label'],
|
||||
'cta2_label' => ['nullable', 'string', 'max:80', 'required_with:data.cta2_url'],
|
||||
'cta2_url' => ['nullable', 'string', 'max:500', 'required_with:data.cta2_label'],
|
||||
'alt' => ['nullable', 'string', 'max:300'],
|
||||
];
|
||||
}
|
||||
@@ -95,6 +121,14 @@ public function dataFields(): array
|
||||
->rule(SafeUrl::rule())
|
||||
->requiredWith('cta_label'),
|
||||
]),
|
||||
Grid::make(2)->schema([
|
||||
TextInput::make('cta2_label')->label('Zweite Schaltfläche: Beschriftung (optional)')->maxLength(80),
|
||||
TextInput::make('cta2_url')
|
||||
->label('Zweite Schaltfläche: Linkziel')
|
||||
->maxLength(500)
|
||||
->rule(SafeUrl::rule())
|
||||
->requiredWith('cta2_label'),
|
||||
]),
|
||||
TextInput::make('alt')
|
||||
->label('Alternativtext des Bildes')
|
||||
->maxLength(300)
|
||||
@@ -109,10 +143,10 @@ public function refFields(): array
|
||||
|
||||
public function editorSchema(): array
|
||||
{
|
||||
[$heading, $text, $cta, $alt] = $this->dataFields();
|
||||
[$heading, $text, $cta, $cta2, $alt] = $this->dataFields();
|
||||
|
||||
return [
|
||||
Group::make([$heading, $text, $cta])->statePath('data'),
|
||||
Group::make([$heading, $text, $cta, $cta2])->statePath('data'),
|
||||
Group::make($this->refFields())->statePath('refs'),
|
||||
Group::make([$alt])->statePath('data'),
|
||||
];
|
||||
@@ -122,12 +156,14 @@ public function clean(array $data, array $refs, WidgetErrors $errors): array
|
||||
{
|
||||
$refs = ImageRefFields::clean($refs, $errors);
|
||||
|
||||
foreach (['text', 'cta_label', 'cta_url', 'alt'] as $key) {
|
||||
foreach (['text', 'cta_label', 'cta_url', 'cta2_label', 'cta2_url', 'alt'] as $key) {
|
||||
$data[$key] = filled($data[$key] ?? null) ? trim($data[$key]) : null;
|
||||
}
|
||||
|
||||
if ($data['cta_url'] !== null && ! SafeUrl::isSafe($data['cta_url'])) {
|
||||
$errors->add('data.cta_url', SafeUrl::message());
|
||||
foreach (['cta_url', 'cta2_url'] as $key) {
|
||||
if ($data[$key] !== null && ! SafeUrl::isSafe($data[$key])) {
|
||||
$errors->add("data.$key", SafeUrl::message());
|
||||
}
|
||||
}
|
||||
|
||||
if ($refs['image'] !== null && $data['alt'] === null) {
|
||||
@@ -140,11 +176,20 @@ public function clean(array $data, array $refs, WidgetErrors $errors): array
|
||||
public function resolve(array $widget, RenderContext $context): array
|
||||
{
|
||||
$data = $widget['data'];
|
||||
$hasAction = filled($data['cta_label'] ?? null) && SafeUrl::isSafe($data['cta_url'] ?? null);
|
||||
$actions = [];
|
||||
|
||||
foreach ([['cta_label', 'cta_url'], ['cta2_label', 'cta2_url']] as [$label, $url]) {
|
||||
if (filled($data[$label] ?? null) && SafeUrl::isSafe($data[$url] ?? null)) {
|
||||
$actions[] = ['label' => $data[$label], 'url' => $data[$url]];
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'imageUrl' => PublicMedia::imageUrl($widget['refs']),
|
||||
'action' => $hasAction ? ['label' => $data['cta_label'], 'url' => $data['cta_url']] : null,
|
||||
'action' => $actions[0] ?? null,
|
||||
'actions' => $actions,
|
||||
'focus' => ImageFocus::position($widget['settings'] ?? []),
|
||||
'textSide' => ($widget['settings']['text_side'] ?? null) === 'left' ? 'left' : 'right',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Domain\Cms\Widgets\Types;
|
||||
|
||||
use App\Domain\Cms\Widgets\RenderContext;
|
||||
use App\Domain\Cms\Widgets\Support\ImageFocus;
|
||||
use App\Domain\Cms\Widgets\Support\ImageRefFields;
|
||||
use App\Domain\Cms\Widgets\Support\PublicMedia;
|
||||
use App\Domain\Cms\Widgets\Support\RichText;
|
||||
@@ -49,7 +50,7 @@ public function stages(): array
|
||||
{
|
||||
return [
|
||||
'narrow' => 'unter 36rem Slotbreite: Bild über dem Text',
|
||||
'wide' => 'ab 36rem: Bild links oder rechts neben dem Text',
|
||||
'wide' => 'ab 36rem: Bild links oder rechts neben dem Text, gleich breit; ab 56rem Bild betont (7:5)',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -76,6 +77,22 @@ public function variants(): array
|
||||
];
|
||||
}
|
||||
|
||||
public function settings(): array
|
||||
{
|
||||
return [
|
||||
'format' => ['landscape' => 'Querformat (4:3)', 'portrait' => 'Hochformat (4:5)', 'square' => 'Quadrat', 'original' => 'Originalformat'],
|
||||
'focus' => ImageFocus::options(),
|
||||
];
|
||||
}
|
||||
|
||||
public function settingLabels(): array
|
||||
{
|
||||
return [
|
||||
'format' => ['Bildformat', 'Zuschnitt des Bildes. Vorgabe: Querformat.'],
|
||||
'focus' => ['Bildausschnitt', 'Welcher Bildteil beim Zuschnitt sichtbar bleibt.'],
|
||||
];
|
||||
}
|
||||
|
||||
public function upgrade(array $widget, int $from): array
|
||||
{
|
||||
if ($from !== 1) {
|
||||
@@ -161,9 +178,13 @@ public function clean(array $data, array $refs, WidgetErrors $errors): array
|
||||
|
||||
public function resolve(array $widget, RenderContext $context): array
|
||||
{
|
||||
$format = $widget['settings']['format'] ?? 'landscape';
|
||||
|
||||
return [
|
||||
'imageUrl' => PublicMedia::imageUrl($widget['refs']),
|
||||
'body' => RichText::sanitize(is_string($widget['data']['body'] ?? null) ? $widget['data']['body'] : ''),
|
||||
'format' => in_array($format, ['landscape', 'portrait', 'square', 'original'], true) ? $format : 'landscape',
|
||||
'focus' => ImageFocus::position($widget['settings'] ?? []),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,16 @@ public function renderAll(?array $blocks, RenderContext $context): HtmlString
|
||||
return new HtmlString($html);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ob die Instanz randlos dargestellt werden darf (siehe WidgetType::bleeds).
|
||||
*
|
||||
* @param array<string, mixed> $widget aktuelle Hülle
|
||||
*/
|
||||
public function bleeds(array $widget): bool
|
||||
{
|
||||
return $this->registry->has((string) ($widget['type'] ?? '')) && $this->registry->get($widget['type'])->bleeds($widget);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rendert eine Instanz samt Abschnittshülle. Liefert '' wenn das Widget nichts darzustellen hat.
|
||||
*
|
||||
|
||||
@@ -102,6 +102,28 @@ public function settings(): array
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Bezeichnungen der Einstellungen im Editor: Schlüssel => [Bezeichnung, Hilfetext].
|
||||
* Ohne leere Auswahl gilt die Vorgabe der Darstellung.
|
||||
*
|
||||
* @return array<string, array{0: string, 1?: string}>
|
||||
*/
|
||||
public function settingLabels(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Ob die Instanz randlos über die volle Fensterbreite dargestellt wird, wenn sie allein in einem Abschnitt
|
||||
* mit Raster „4“ steht (zum Beispiel die Markenbühne). Der Abschnitt verzichtet dann auf Innenabstand und Begrenzung.
|
||||
*
|
||||
* @param array<string, mixed> $widget
|
||||
*/
|
||||
public function bleeds(array $widget): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prüfregeln für data. Schlüssel relativ zu data (zum Beispiel 'heading', 'items.*.title').
|
||||
*
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\ToggleButtons;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Schemas\Components\Group;
|
||||
use Filament\Schemas\Components\Grid;
|
||||
use Illuminate\Foundation\Vite;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Illuminate\Support\Str;
|
||||
@@ -98,10 +98,15 @@ public static function block(WidgetType $type): Block
|
||||
|
||||
if ($type->settings() !== []) {
|
||||
$settings = [];
|
||||
$labels = $type->settingLabels();
|
||||
foreach ($type->settings() as $key => $options) {
|
||||
$settings[] = Select::make($key)->label(Str::headline($key))->options($options);
|
||||
$settings[] = Select::make($key)
|
||||
->label($labels[$key][0] ?? Str::headline($key))
|
||||
->helperText($labels[$key][1] ?? null)
|
||||
->placeholder('Vorgabe der Darstellung')
|
||||
->options($options);
|
||||
}
|
||||
$schema[] = Group::make($settings)->statePath('settings');
|
||||
$schema[] = Grid::make(['default' => 1, 'md' => min(3, count($settings))])->schema($settings)->statePath('settings');
|
||||
}
|
||||
|
||||
foreach ($type->editorSchema() as $component) {
|
||||
|
||||
@@ -46,7 +46,7 @@ ## 2. Widget-Vertrag
|
||||
| `type` | Typkennung aus dem Register; ändert sich nie |
|
||||
| `v` | Schemaversion der Art |
|
||||
| `variant` | eine der für die Art registrierten Varianten |
|
||||
| `settings` | nur registrierte Aufzählungswerte (derzeit nutzt keine Art Einstellungen; freie Werte werden abgewiesen) |
|
||||
| `settings` | nur registrierte Aufzählungswerte; freie Werte werden abgewiesen. Seit Designiteration 1: `hero` (`focus`, `text_side`), `image_text` (`format`, `focus`). Fehlt ein Wert, gilt die Vorgabe der Darstellung |
|
||||
| `data` | redaktionelle Inhalte |
|
||||
| `refs` | Verweise auf Fachobjekte oder Medien, nur Kennungen bzw. Pfade im öffentlichen Bereich `cms/` |
|
||||
|
||||
@@ -68,16 +68,29 @@ ## 4. Registrierte Widget-Arten
|
||||
|
||||
| Kennung | Name | Version | Varianten | Verweise | Mindestbreite |
|
||||
|---|---|---|---|---|---|
|
||||
| `hero` | Einstieg (Hero) | 1 | `standard` (Bild neben dem Text), `highlight` (Markenfläche) | `refs.image` | 2 |
|
||||
| `hero` | Einstieg (Hero) | 1 | `standard` (Bild neben dem Text), `highlight` (Markenfläche), `stage` (Markenbühne, randlos), `editorial` (textbetont) | `refs.image` | 2 |
|
||||
| `heading` | Überschrift und Einleitung | 1 | `standard` | – | 1 |
|
||||
| `prose` | Fließtext | 1 | `standard` | – | 1 |
|
||||
| `image_text` | Bild und Text | 2 | `image_left`, `image_right` | `refs.image` | 2 |
|
||||
| `cards` | Redaktionelle Karten | 1 | `standard` (Raster), `compact` (kompakte Liste) | Bild je Karte in `data.items[].image` | 1 |
|
||||
| `cards` | Redaktionelle Karten | 1 | `standard` (Raster), `compact` (kompakte Liste), `featured` (erste Karte hervorgehoben) | Bild je Karte in `data.items[].image` | 1 |
|
||||
| `catalog_cards` | Programm- und Modulkarten | 1 | `standard` (Karten mit Kurzbeschreibung), `compact` (Liste) | `refs.items[] = {type: composition, id}` | 1 |
|
||||
| `call_to_action` | Handlungsaufruf | 1 | `standard` | – | 1 |
|
||||
| `faq` | FAQ | 1 | `standard` | – | 2 |
|
||||
|
||||
Darstellungsklassen: `widget widget-<typ> widget-variant-<variante>` an der Widget-Hülle; je Ansicht eigene Klassen (`hero-highlight`, `image-text-right`, `cards-compact`, `catalog-cards-compact`). Die visuelle Veredelung verändert nur `resources/views/widgets/*` und `resources/css/widgets.css`, nicht Daten, Register oder Editor.
|
||||
Darstellungsklassen: `widget widget-<typ> widget-variant-<variante>` an der Widget-Hülle; je Ansicht eigene Klassen (`hero-highlight`, `hero-stage`, `image-text-right`, `image-format-portrait`, `cards-compact`, `cards-featured`, `catalog-cards-compact`). Die visuelle Veredelung verändert nur `resources/views/widgets/*` und `resources/css/widgets.css`, nicht Daten, Register oder Editor.
|
||||
|
||||
**Designiteration 1 (additiv, keine neue Version):**
|
||||
|
||||
| Art | Neu | Gespeichert als |
|
||||
|---|---|---|
|
||||
| `hero` | Varianten `stage`, `editorial`; zweite Schaltfläche; Bildausschnitt; Textseite der Markenbühne | `variant`; `data.cta2_label`, `data.cta2_url` (sicheres Linkziel wie `cta_url`); `settings.focus` (Werte wie Abschnittsfokus), `settings.text_side` (`left`, `right`) |
|
||||
| `image_text` | Bildformat und Bildausschnitt | `settings.format` (`landscape`, `portrait`, `square`, `original`), `settings.focus` |
|
||||
| `cards` | Variante `featured`; ganze Karte über den Titellink klickbar | `variant` |
|
||||
| `catalog_cards` | Markentafel statt Bild, eine Karte breit mit Tafel daneben | keine Datenänderung |
|
||||
|
||||
Ältere Instanzen enthalten die neuen Schlüssel nicht und werden mit den Vorgaben dargestellt (Test `CmsDesignIterationTest`). Die erste Schaltfläche des Einstiegs ist jetzt die gelbe Markenschaltfläche (`button button-brand`).
|
||||
|
||||
**Randlos (`WidgetType::bleeds`).** Eine Markenbühne mit Bild, die allein in ihrem Abschnitt steht, setzt am Abschnitt `section-bleed`: kein Innenabstand, keine Breitenbegrenzung, das Bild reicht über die ganze Fensterbreite; die Texttafel richtet sich am Standardraster aus. In mehrspaltigen Abschnitten erscheint dieselbe Bühne als Bild mit runden Ecken und überlappender Tafel.
|
||||
|
||||
## 5. Neues Widget hinzufügen
|
||||
|
||||
@@ -157,7 +170,9 @@ ## 9. Rollback und Datenformat (wichtig vor dem Merge nach `main`)
|
||||
WHERE p.published_revision_id IN (SELECT id FROM page_revisions WHERE created_at >= :deploy);
|
||||
```
|
||||
|
||||
Die Migrationen (`sections`, `parent_id`) sind ergänzend und müssen beim Rollback nicht zurückgenommen werden; älterer Code ignoriert beide Spalten. Ein reiner Code-Rollback ist nach redaktionellen Änderungen im neuen Editor **nicht** als sicher anzusehen; der Weg oben ist Teil jedes Rollbacks.
|
||||
Die Migrationen (`sections`, `parent_id`) sind ergänzend und müssen beim Rollback nicht zurückgenommen werden; älterer Code ignoriert beide Spalten.
|
||||
|
||||
**Designiteration 1** bringt keine Migration. Bei einem Code-Rollback auf Iteration 2 fallen die neuen Varianten beim Lesen auf die Vorgabe zurück (`stage`/`editorial` → `standard`, `featured` → `standard`); die neuen Einstellungen und `cta2_*` werden nicht dargestellt, aber nicht gelöscht. Seiten bleiben darstellbar; der Wiederherstellungsweg oben ist dafür nicht nötig. Ein reiner Code-Rollback ist nach redaktionellen Änderungen im neuen Editor **nicht** als sicher anzusehen; der Weg oben ist Teil jedes Rollbacks.
|
||||
|
||||
## 10. Navigation
|
||||
|
||||
@@ -205,12 +220,12 @@ ## 12. Responsive Widget-Regeln
|
||||
|
||||
| Widget | Mindestbreite | Vorzug | Stufen |
|
||||
|---|---|---|---|
|
||||
| Einstieg (Hero) | 2 | 4 | unter 48 rem Bild unter dem Text; ab 48 rem nebeneinander; Überschrift wächst mit der Platzbreite |
|
||||
| Einstieg (Hero) | 2 | 4 | unter 48 rem Bild unter dem Text; ab 48 rem nebeneinander; Überschrift wächst mit der Platzbreite. Markenbühne: unter 56 rem Bild 4:3 mit überlappender Tafel, ab 56 rem Bild über die ganze Bühne (30–46 rem hoch) mit Tafel links oder rechts. Editorial: ab 56 rem Beschreibung und Schaltflächen nebeneinander, Bild 21:9 |
|
||||
| Überschrift | 1 | 4 | Größe folgt der Platzbreite |
|
||||
| Fließtext | 1 | 2 | Zeilenlänge höchstens etwa 70 Zeichen |
|
||||
| Bild und Text | 2 | 4 | unter 36 rem gestapelt; ab 36 rem Bild links oder rechts |
|
||||
| Redaktionelle Karten | 1 | 4 | so viele Karten nebeneinander, wie bei 14 rem Kartenbreite passen |
|
||||
| Programm- und Modulkarten | 1 | 4 | ab 16 rem Kartenbreite mehrspaltig; kompakte Liste für schmale Plätze |
|
||||
| Bild und Text | 2 | 4 | unter 36 rem gestapelt; ab 36 rem Bild und Text gleich breit; ab 56 rem Bild betont (7:5); festes Bildformat nach Einstellung |
|
||||
| Redaktionelle Karten | 1 | 4 | so viele Karten nebeneinander, wie bei 15 rem Kartenbreite passen; hervorgehobene erste Karte ab 44 rem mit Bild neben dem Text; kompakte Liste mit kleinem Bild rechts |
|
||||
| Programm- und Modulkarten | 1 | 4 | ab 17 rem Kartenbreite mehrspaltig; eine einzelne Karte ab 40 rem mit Tafel neben dem Text; kompakte Liste für schmale Plätze |
|
||||
| Handlungsaufruf | 1 | 2 | unter 20 rem Schaltfläche in voller Breite |
|
||||
| FAQ | 2 | 4 | Fragen untereinander, Antworten auf Lesebreite |
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Gemeinsames Designsystem (ADR-36) – umgesetzter Stand
|
||||
|
||||
Stand: 17.11.2026, Branch `feature/cms-sections`. Gilt für öffentliche Website, Anmeldung, Mitgliederbereich und Mitgliederbibliothek; später für Warenkorb und Checkout. Die Verwaltung (Filament) bleibt in Standardgestaltung.
|
||||
Stand: 18.11.2026, Designiteration 1 (Branch `feature/design-iteration-1`; Vorstand 17.11.2026 `feature/cms-sections`). Gilt für öffentliche Website, Anmeldung, Mitgliederbereich und Mitgliederbibliothek; später für Warenkorb und Checkout. Die Verwaltung (Filament) bleibt in Standardgestaltung.
|
||||
|
||||
**Status der Werte:** Alle Markenwerte, Schriften und die Wortmarke sind **vorläufig**. Sie stammen aus `docs/Brand-UI-Kit/02_design_tokens` (Entwurf vom 15.11.2026, aus den Originalmotiven abgeleitet, laut Kit nicht freigegeben) und aus der Empfehlung im Website-Zielkonzept §7.2. Diese Datei ist keine Markenfreigabe. Eine Freigabe ändert ausschließlich `resources/css/tokens.css` (und für die Wortmarke `resources/views/components/site/brand.blade.php`).
|
||||
**Status der Werte:** Alle Markenwerte, Schriften und die Wortmarke sind **vorläufig**. Sie stammen aus `docs/Brand-UI-Kit/02_design_tokens` (Entwurf vom 15.11.2026, aus den Originalmotiven abgeleitet, laut Kit nicht freigegeben) und aus der Empfehlung im Website-Zielkonzept §7.2. Diese Datei ist keine Markenfreigabe. Eine Freigabe ändert ausschließlich `resources/css/tokens.css` (und für die Wortmarke `resources/views/components/site/brand.blade.php`, für die Markenakzente `resources/views/components/brand/`).
|
||||
|
||||
## 1. Dateien
|
||||
|
||||
@@ -11,7 +11,9 @@ ## 1. Dateien
|
||||
| `resources/css/tokens.css` | Ebene 1 Markenwerte (`--lf-*`), Ebene 2 Bedeutungswerte (`--color-*`), Typografie, Abstände, Rundungen, Layoutmaße, Flächen-Gültigkeitsbereiche `.scope-dark`, `.scope-accent`, `.scope-light` |
|
||||
| `resources/css/base.css` | Grundelemente, Überschriften, Links, Fokus, Sprunglink, `prefers-reduced-motion` |
|
||||
| `resources/css/components.css` | Grundkomponenten: Container, Schaltflächen, Formulare, Statusanzeigen, Karte, Dialog, Kennzeile, Themensignatur, Redaktionshinweise |
|
||||
| `resources/css/site.css` | Website-Gerüst: Wortmarke, Kopfzeile, Hauptnavigation, mobile Navigation, Inhaltsfläche, Fußbereich |
|
||||
| `resources/css/site.css` | Website-Gerüst: Wortmarke, Kopfzeile (zwei Zustände), Hauptnavigation, Menümodus, Inhaltsfläche, Fußbereich, Markenakzente |
|
||||
| `resources/views/components/brand/` | Markenakzente als Blade-Komponenten: `underline` (Unterstreichung), `rays` (Signalstrahlen), `arc` (grüner Bogen); dekorativ, `aria-hidden`, Farbe über Tokens |
|
||||
| `resources/js/site-nav.js` | Breitenstufen der Kopfzeile, Menü, Fokusfalle, Untermenüs, kompakter Zustand |
|
||||
| `resources/css/sections.css` | Abschnitte, Raster, Flächen, Hintergrundbilder, Trenner |
|
||||
| `resources/css/widgets.css` | Widget-Ansichten (Container-Abfragen) |
|
||||
| `resources/css/app.css` | bindet alles ein; Mitgliederbereich über seine bisherigen Variablennamen, die auf die gemeinsamen Tokens zeigen |
|
||||
@@ -48,7 +50,11 @@ ## 4. Kontraste (berechnet nach WCAG-Formel)
|
||||
| Fließtext `#15243a` auf Weiß / Creme | 15,61 / 14,43 : 1 | Text 4,5 |
|
||||
| Leiser Text `#3e4c5c` auf Weiß / Creme | 8,78 / 8,11 : 1 | Text 4,5 |
|
||||
| Navy (Überschrift, Link) auf Weiß | 15,14 : 1 | Text 4,5 |
|
||||
| Weiß auf Aktionsgrün `#3b7b09` (Schaltfläche, Markenakzent) | 5,22 : 1 | Text 4,5 |
|
||||
| Weiß auf Aktionsgrün `#3b7b09` (Schaltfläche, Markenakzent, Wortmarken-Schild, Programmtafel auf dunkler Fläche) | 5,22 : 1 | Text 4,5 |
|
||||
| Grün dunkel auf Weiß (Art „Programm“/„Modul“ in Listen) | 5,22 : 1 | Text 4,5 |
|
||||
| Navy auf Gelb (Markenschaltfläche `.button-brand`) / Hover `#ffe05c` | 10,28 / 11,58 : 1 | Text 4,5 |
|
||||
| Navy auf Creme (Tafel der Markenbühne) | 14,00 : 1 | Text 4,5 |
|
||||
| Fußbereich Grundzeile `#f4f6f8` auf Grün dunkel (falls der Bogen Links berührt) | 4,82 : 1 | Text 4,5 |
|
||||
| Text `#f4f6f8` / leise `#d3dde8` auf Navy | 13,97 / 11,01 : 1 | Text 4,5 |
|
||||
| Navy auf Gelb (Schaltfläche auf dunkler Fläche) | 10,28 : 1 | Text 4,5 |
|
||||
| Leiser Text `#eef4e8` auf Aktionsgrün | 4,66 : 1 | Text 4,5 |
|
||||
@@ -69,7 +75,7 @@ ## 5. Typografie, Abstände, Maße
|
||||
| Skala | Fließtext 17 → 18 px, Zeilenhöhe 1,6; H3 20 → 22; H2 26 → 34; H1 34 → 52; Lesebreite 70 Zeichen |
|
||||
| Abstände | Grundmaß 4 px: 4, 8, 12, 16, 24, 32, 48, 64, 96 px |
|
||||
| Rundungen | 8 (klein), 14 (Karte), 22 (Fläche), Pille |
|
||||
| Container | schmal 45 rem, Standard 75 rem, breit 90 rem; Randabstand 16–32 px |
|
||||
| Breiten | Lesebereich 44 rem, Standard 82 rem, Breit 96 rem, Vollbreite; Randabstand 16–40 px (siehe Abschnitt 12) |
|
||||
| Trefferfläche | mindestens 44 × 44 px |
|
||||
| Fokus | 3 px Rahmen in `--color-focus`, 3 px Abstand, auf jeder Fläche sichtbar |
|
||||
|
||||
@@ -80,7 +86,7 @@ ## 6. Grundkomponenten
|
||||
| Komponente | Klassen | Hinweis |
|
||||
|---|---|---|
|
||||
| Container | `.ui-container`, `.ui-container-wide` | Standard- bzw. breite Inhaltsbreite mit Randabstand |
|
||||
| Schaltfläche | `.button` / `.ui-button`, `-secondary`, `-quiet`, `[disabled]` | Haupt-, Neben-, Textaktion; Farben aus der jeweiligen Fläche |
|
||||
| Schaltfläche | `.button` / `.ui-button`, `-secondary`, `-quiet`, `[disabled]`; `.button-brand` | Haupt-, Neben-, Textaktion; Farben aus der jeweiligen Fläche. `.button-brand` (Gelb, Navy-Schrift) nur für die erste Handlung im Seiteneinstieg |
|
||||
| Formular | `.form`, `.ui-field`, `.ui-input`, `.ui-field-error`, `.check` | sichtbare Beschriftung, Fehlerzustand über `aria-invalid` |
|
||||
| Statusanzeige | `.status`, `.errors`, `.ui-notice-{success,warning,danger,info}` | Farbe, Randlinie und Text, nie Farbe allein |
|
||||
| Karte | `.ui-card`, `.empty` | helle Fläche mit Linie |
|
||||
@@ -94,10 +100,13 @@ ## 7. Wortmarke und Markenassets
|
||||
|
||||
| Asset | Status | Verwendung |
|
||||
|---|---|---|
|
||||
| Wortmarke als Weblogo (SVG/PNG) | **fehlt**; Logo-Varianten in den Filmmotiven weichen voneinander ab (Kit-README, Leitlinie 5) | vorläufiger Schriftzug „Lara & Felix / Stark im Alltag“ in Nunito, gekennzeichnet `data-brand-status="vorlaeufig"`, ohne Nachbildung (keine Drehung, kein Unterstrich-Schwung) |
|
||||
| Wortmarke als Weblogo (SVG/PNG) | **fehlt**; Logo-Varianten in den Filmmotiven weichen voneinander ab (Kit-README, Leitlinie 5) | vorläufiger Schriftzug „Lara & Felix“ in Nunito, auf der Website (`variant="lockup"`) mit grünem Schild „Stark im Alltag“ nach dem Web-Entwurf des Kits; gekennzeichnet `data-brand-status="vorlaeufig"`, ohne Nachbildung der Filmwortmarke (keine Wolkenform, keine Drehung, kein Unterstrich-Schwung, keine Strahlen) |
|
||||
| Titel-, Denkpause-, Outro-Motiv (`01_originale`) | Original vorhanden, **öffentliche Nutzung nicht freigegeben** (Quellenmanifest) | nicht verwendet; nicht in `public/` oder den Medienbestand kopiert |
|
||||
| Figurenreferenzen Lara, Felix, Oma | nur interne Referenz | nicht verwendet |
|
||||
| SVG-Entwürfe (`03_svg_entwuerfe`: Monogramm, Strahlen, Unterstreichung, Denkblase, Hand) | neue, nicht freigegebene Vorschläge | nicht verwendet |
|
||||
| SVG-Entwürfe Unterstreichung und Signalstrahlen (`03_svg_entwuerfe`) | neue, nicht freigegebene Vorschläge | **seit Designiteration 1 verwendet** als Akzente: Unterstreichung unter Einstiegs- und Abschnittsüberschriften, Strahlen an Bild- und Tafelecken; nie an der Wortmarke |
|
||||
| Grüner Bogen | eigene Ableitung nach dem Homepage-Entwurf des Kits | Abschluss des Fußbereichs |
|
||||
| SVG-Entwürfe Denkblase und Hand | didaktische Symbole der Denkpause | bewusst nicht als Dekor verwendet; gehören in Kursplayer und Lernansichten |
|
||||
| SVG-Entwurf Monogramm | kein freigegebenes Logo | nicht verwendet, auch nicht als Favicon |
|
||||
| KI-Konzeptgrafiken (`04_visuelle_entwuerfe`) | erfundene Inhalte, nicht freigegeben | nicht verwendet |
|
||||
| Themensymbole der fünf Bereiche | nicht entworfen | nicht verwendet; Platz vorbereitet |
|
||||
|
||||
@@ -107,12 +116,15 @@ ## 8. Themensignaturen (vorbereitet)
|
||||
|
||||
`.ui-theme-signature` trägt Nummer (1–5) und Name des Themenbereichs; `--color-theme-1` bis `--color-theme-5` sind Platzhalter, die bis zur Freigabe alle auf die neutrale helle Fläche zeigen. Unterscheidung erfolgt damit ohne Farbe (Design-Prinzipien §3). Nach Freigabe werden Tönungen in `tokens.css` und Symbole als SVG je Säule ergänzt; Mehrfachzuordnung ist als Reihe von Marken vorgesehen.
|
||||
|
||||
## 9. Website-Gerüst
|
||||
## 9. Website-Gerüst (Designiteration 1)
|
||||
|
||||
- **Kopfzeile** (klebend, 64/72 px): Wortmarke, CMS-Hauptnavigation, Kontozugang „Mitgliederbereich“ (für alle Besucher gleich; Gäste werden zur Anmeldung geleitet), vorbereiteter Warenkorbzugang (`config/cms.php` → `cart.enabled`, Vorgabe aus: es wird nichts ausgegeben).
|
||||
- **Hauptnavigation**: aus `navigation_items` (`header`), aktiver Eintrag mit gelber Linie und `aria-current`, eine Ebene Untermenü als Aufklappliste (Schaltfläche mit `aria-expanded`, Escape schließt, Klick außerhalb schließt). Ab 75 rem in der Zeile, darunter Menü-Schaltfläche.
|
||||
- **Mobile Navigation**: Menü-Schaltfläche (Symbol und Text) öffnet eine Fläche unter der Kopfzeile mit 48 px hohen Einträgen, Untermenüs eingerückt; Fokus springt in das Menü, Tabulator bleibt im Menü, Escape schließt und gibt den Fokus an die Schaltfläche zurück. Keine feste untere Navigationsleiste auf der Website. Ohne JavaScript bleibt die Navigation als umbrechende Liste sichtbar.
|
||||
- **Fußbereich** (dunkle Fläche): Wortmarke, „Themenbereiche“ aus den veröffentlichten Säulen, Gruppen „Service“, „Kontakt“, „Rechtliches“ aus der CMS-Navigation. Leere Gruppen entfallen; es werden keine Kontakt- oder Rechtstexte erfunden.
|
||||
- **Kopfzeile, zwei Zustände ohne Layoutsprung.** Die Box ist immer `--header-height-initial` hoch (104 px ab 75 rem, sonst 64 px) und klebt mit negativem Abstand (`top: kompakt − initial`). Die innere Leiste (`.site-header-bar`, 72 px) klebt oben. Beim Scrollen wandert sie 16 px nach oben und bleibt dann stehen; der Seitenfluss ändert sich nie. Ein Beobachter (`data-site-header-sentinel`) setzt `.is-compact`: Wortmarke von 1,16-facher auf normale Größe (nur `transform`) und Schatten. Unter `prefers-reduced-motion` ohne Übergang. Ohne JavaScript klebt die Kopfzeile genauso; nur die Wortmarke bleibt groß.
|
||||
- **Breitenstufen der Navigation** (`site-nav.js`, Messung an einer unsichtbaren Kopie): 1. Navigation und Kontozugang mit Beschriftung in einer Zeile; 2. sonst Kontozugang nur als Symbol (`.is-account-compact`); 3. sonst und immer unter 75 rem Menümodus (`.is-menu-mode`). Die Navigation bricht nie um; deshalb ist die Kopfzeile auf allen Seiten gleich hoch, unabhängig von Anzahl und Länge der CMS-Einträge. Unter 75 rem setzt ein Inline-Skript direkt nach der Kopfzeile den Menümodus vor dem ersten Zeichnen.
|
||||
- **Hauptnavigation**: aus `navigation_items` (`header`), aktiver Eintrag mit gelber Markenunterstreichung und `aria-current`, eine Ebene Untermenü als Aufklappliste (Schaltfläche mit `aria-expanded`, Escape schließt, Klick außerhalb schließt).
|
||||
- **Menümodus**: Menü-Schaltfläche (Symbol und Text) öffnet eine Fläche direkt unter dem sichtbaren Teil der Kopfzeile, 48 px hohe Einträge, Untermenüs eingerückt; Fokus springt in das Menü, Tabulator läuft im Kreis zwischen Schaltfläche und Einträgen, Escape schließt und gibt den Fokus zurück. Keine untere Navigationsleiste auf der Website. Ohne JavaScript bleibt die Navigation unter 75 rem als umbrechende Liste sichtbar.
|
||||
- **Kontozugang** „Mitgliederbereich“ (für alle Besucher gleich; Gäste werden zur Anmeldung geleitet) und vorbereiteter Warenkorbzugang (`config/cms.php` → `cart.enabled`, Vorgabe aus: es wird nichts ausgegeben).
|
||||
- **Fußbereich** (dunkle Fläche): Wortmarke, „Themenbereiche“ aus den veröffentlichten Säulen, Gruppen „Service“ und „Kontakt“ aus der CMS-Navigation; „Rechtliches“ in einer eigenen Grundzeile. Grüner Bogen als Abschluss. Leere Gruppen entfallen; es werden keine Kontakt- oder Rechtstexte erfunden.
|
||||
- **Stabile Geometrie**: `scrollbar-gutter: stable` auf `html` (kurze und lange Seiten gleich breit), `scroll-padding-top` für Sprungziele. Wortmarke, Navigation und Seiteninhalt fluchten im Standardraster.
|
||||
|
||||
## 10. Schnittstellen zum Mitgliederbereich
|
||||
|
||||
@@ -125,3 +137,15 @@ ## 11. Veredelung mit Design-Skills (Empfehlung)
|
||||
3. Themensignaturen als Symbolfamilie entwerfen (Design-Prinzipien §3, Zielkonzept §7.4), dann `--color-theme-*` und Symbole je Säule ergänzen.
|
||||
4. Hintergrundbilder: textfreie Zuschnitte der Originalmotive mit Fokuspunkt erzeugen (Hintergrundverarbeitung, `srcset`), sobald freigegeben.
|
||||
5. Sichtprüfung 390/768/1440 px und Kontrastmessung mit Prüfwerkzeug nach jeder Änderung an Markenwerten.
|
||||
|
||||
## 12. Breitenmodell (Designiteration 1)
|
||||
|
||||
| Stufe | Token | Wert | Abschnittsbreite im Editor | Einsatz |
|
||||
|---|---|---|---|---|
|
||||
| Lesebereich | `--width-reading` | 44 rem | `narrow` | lange Texte, Formulare |
|
||||
| Standard | `--width-standard` | 82 rem | `standard` | Grundraster; Kopfzeile, Fußbereich und Inhalt fluchten hier |
|
||||
| Breit | `--width-wide` | 96 rem | `wide` | bildstarke Kompositionen |
|
||||
| Vollbreite | – | 100 % abzüglich Randabstand | `full` | Inhalt bis an den Rand |
|
||||
| Randlos | – | 100 % | automatisch (`section-bleed`) | Markenbühne allein im Abschnitt |
|
||||
|
||||
Hintergründe reichen immer über die ganze Fensterbreite. `--frame-inset` = `max(Randabstand, (100 % − Standard) / 2)` richtet Inhalte in randlosen Flächen (Tafel der Markenbühne) am Standardraster aus, ohne `100vw` (kein Scrollbalkenfehler). Die Schlüssel der Abschnittsbreiten sind gespeicherte Daten und bleiben unverändert; nur die Werte wurden angepasst (vorher 45/75/90 rem).
|
||||
@@ -13,6 +13,10 @@ html {
|
||||
font-size: 100%;
|
||||
line-height: var(--leading-body);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* Platz für den Scrollbalken immer freihalten: kurze und lange Seiten haben dieselbe Breite, nichts springt. */
|
||||
scrollbar-gutter: stable;
|
||||
/* Sprungziele und Fokus nicht unter der klebenden Kopfzeile verstecken. */
|
||||
scroll-padding-top: calc(var(--header-height) + var(--space-4));
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
@@ -41,6 +41,17 @@ .ui-button:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Markenschaltfläche: Gelb mit dunkelblauer Schrift (11:1), für die wichtigste Handlung im Seiteneinstieg. */
|
||||
.button-brand {
|
||||
background: var(--lf-yellow);
|
||||
color: var(--lf-navy);
|
||||
}
|
||||
|
||||
.button-brand:hover {
|
||||
background: #ffe05c;
|
||||
color: var(--lf-navy);
|
||||
}
|
||||
|
||||
.button-secondary,
|
||||
.ui-button-secondary {
|
||||
background: transparent;
|
||||
|
||||
+289
-111
@@ -31,24 +31,88 @@ .brand-claim {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Kopfzeile: kompakt und klebend; nimmt höchstens 4,5 rem ein. */
|
||||
.site-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 50;
|
||||
background: var(--lf-white);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
/* Website-Variante: Name und Zusatz als grünes Schild (Brand-Kit 05_web_preview). Weiß auf Grün dunkel 5,2:1. */
|
||||
.brand-lockup {
|
||||
flex: none;
|
||||
align-items: flex-start;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.site-header.is-scrolled {
|
||||
box-shadow: 0 6px 18px rgb(3 37 81 / 8%);
|
||||
.brand-lockup .brand-name {
|
||||
font-size: 1.5rem;
|
||||
color: var(--color-heading);
|
||||
}
|
||||
|
||||
.brand-lockup .brand-claim {
|
||||
font-family: var(--font-display);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.01em;
|
||||
color: var(--lf-white);
|
||||
background: var(--lf-green-deep);
|
||||
border-radius: var(--radius-pill);
|
||||
padding: 0.2rem 0.6rem 0.25rem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Kopfzeile. Die Box hat immer dieselbe Höhe (--header-height-initial) und klebt mit negativem Abstand.
|
||||
* Die innere Leiste klebt oben: Beim Scrollen wandert sie um den Unterschied nach oben, danach bleibt
|
||||
* genau die kompakte Leiste stehen. Der Seitenfluss ändert sich nie; ohne JavaScript funktioniert es genauso.
|
||||
*/
|
||||
.site-header-sentinel {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 1px;
|
||||
height: max(1px, var(--header-height-initial) - var(--header-height));
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.site-header {
|
||||
position: sticky;
|
||||
top: calc(var(--header-height) - var(--header-height-initial));
|
||||
z-index: 50;
|
||||
height: var(--header-height-initial);
|
||||
background: var(--lf-white);
|
||||
box-shadow: 0 1px 0 var(--color-border);
|
||||
transition: box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.site-header.is-compact {
|
||||
box-shadow: 0 1px 0 var(--color-border), 0 8px 22px rgb(3 37 81 / 8%);
|
||||
}
|
||||
|
||||
/* Außenabstand statt Innenabstand der Kopfzeile: Klebende Elemente bleiben in der Inhaltsbox ihres Elternelements. */
|
||||
.site-header-bar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: var(--header-height);
|
||||
margin-top: calc((var(--header-height-initial) - var(--header-height)) / 2);
|
||||
}
|
||||
|
||||
.site-header-inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-4) var(--space-6);
|
||||
min-height: var(--header-height);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Großzügige Wortmarke im Ausgangszustand, kompakt beim Scrollen. Nur transform: keine Layoutverschiebung. */
|
||||
@media (min-width: 75rem) {
|
||||
.site-header .brand-lockup {
|
||||
transform-origin: left center;
|
||||
transform: scale(1.16);
|
||||
transition: transform 0.22s ease;
|
||||
}
|
||||
|
||||
.site-header.is-compact .brand-lockup {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
/* Platz für die skalierte Wortmarke, damit die Navigation nicht überdeckt wird. */
|
||||
.site-header .site-nav {
|
||||
margin-left: var(--space-6);
|
||||
}
|
||||
}
|
||||
|
||||
.site-header-actions {
|
||||
@@ -56,6 +120,7 @@ .site-header-actions {
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
margin-left: auto;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.site-icon-link,
|
||||
@@ -66,21 +131,24 @@ .site-menu-button {
|
||||
gap: var(--space-2);
|
||||
min-width: var(--touch-target);
|
||||
min-height: var(--touch-target);
|
||||
padding: 0 var(--space-3);
|
||||
border: 1px solid var(--color-border-strong);
|
||||
padding: 0 var(--space-4);
|
||||
border: 2px solid var(--lf-navy);
|
||||
border-radius: var(--radius-pill);
|
||||
background: transparent;
|
||||
color: var(--color-heading);
|
||||
color: var(--lf-navy);
|
||||
font: inherit;
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
|
||||
.site-icon-link:hover,
|
||||
.site-menu-button:hover {
|
||||
border-color: var(--color-heading);
|
||||
color: var(--color-heading);
|
||||
background: var(--lf-navy);
|
||||
color: var(--lf-white);
|
||||
}
|
||||
|
||||
.site-icon-link svg,
|
||||
@@ -90,7 +158,7 @@ .site-menu-button svg {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
/* Hauptnavigation (Desktop) */
|
||||
/* Hauptnavigation (Desktop): eine Zeile, nie umbrechend. Passt sie nicht, schaltet site-nav.js in den Menümodus. */
|
||||
.site-nav-list,
|
||||
.site-subnav {
|
||||
list-style: none;
|
||||
@@ -105,36 +173,56 @@ .site-nav {
|
||||
|
||||
.site-nav-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
gap: var(--space-1) 0;
|
||||
gap: 0 var(--space-1);
|
||||
}
|
||||
|
||||
.site-nav-item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.site-nav a {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: var(--touch-target);
|
||||
padding: 0 0.6rem;
|
||||
padding: 0 0.55rem;
|
||||
font-size: 1rem;
|
||||
color: var(--color-heading);
|
||||
color: var(--lf-navy);
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
border-radius: var(--radius-small);
|
||||
}
|
||||
|
||||
.site-nav a:hover {
|
||||
color: var(--lf-navy);
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 2px;
|
||||
text-underline-offset: 0.35em;
|
||||
}
|
||||
|
||||
.site-nav a[aria-current='page'],
|
||||
.site-nav .is-active-trail > a {
|
||||
box-shadow: inset 0 -3px 0 var(--color-accent);
|
||||
/* Aktive Seite: gelbe Markenunterstreichung (Brand-Kit), zusätzlich aria-current für Hilfsmittel. */
|
||||
.site-nav-list > .site-nav-item > a[aria-current='page']::after,
|
||||
.site-nav-list > .site-nav-item.is-active-trail > a::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0.55rem;
|
||||
right: 0.55rem;
|
||||
bottom: 0.2rem;
|
||||
height: 0.3rem;
|
||||
border-radius: 0.3rem;
|
||||
background: var(--lf-yellow);
|
||||
transform: rotate(-1deg);
|
||||
}
|
||||
|
||||
.site-nav-list > .site-nav-item > a[aria-current='page']:hover,
|
||||
.site-nav-list > .site-nav-item.is-active-trail > a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.site-nav-toggle {
|
||||
@@ -143,9 +231,10 @@ .site-nav-toggle {
|
||||
justify-content: center;
|
||||
width: 2rem;
|
||||
min-height: var(--touch-target);
|
||||
margin-left: -0.4rem;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--color-heading);
|
||||
color: var(--lf-navy);
|
||||
cursor: pointer;
|
||||
border-radius: var(--radius-small);
|
||||
}
|
||||
@@ -168,37 +257,41 @@ .site-subnav a {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (min-width: 75rem) {
|
||||
.site-subnav {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
min-width: 15rem;
|
||||
padding: var(--space-2);
|
||||
background: var(--lf-white);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-card);
|
||||
box-shadow: var(--shadow-raised);
|
||||
}
|
||||
.site-header:not(.is-menu-mode) .site-subnav {
|
||||
position: absolute;
|
||||
top: calc(100% + 0.25rem);
|
||||
left: 0;
|
||||
min-width: 15rem;
|
||||
padding: var(--space-2);
|
||||
background: var(--lf-white);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-card);
|
||||
box-shadow: var(--shadow-raised);
|
||||
}
|
||||
|
||||
.site-nav-item.is-open > .site-subnav {
|
||||
display: block;
|
||||
}
|
||||
.site-header:not(.is-menu-mode) .site-nav-item.is-open > .site-subnav {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site-menu-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* Mobile Navigation (unter 75 rem, nur mit JavaScript): Menü-Schaltfläche in der Kopfzeile öffnet eine
|
||||
* Fläche unter der Kopfzeile. Ohne JavaScript bleibt die Navigation als umbrechende Liste sichtbar.
|
||||
*/
|
||||
@media (max-width: 74.99rem) {
|
||||
.site-header-inner {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
/* Kontozugang nur als Symbol: unter 75 rem und wenn die Navigation sonst nicht in eine Zeile passt. */
|
||||
.site-header.is-account-compact .site-account-label {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0 0 0 0);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.site-header.is-account-compact .site-account-link {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 74.99rem) {
|
||||
.site-account-label {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
@@ -208,65 +301,100 @@ @media (max-width: 74.99rem) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.site-icon-link {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Ohne JavaScript: Navigation als umbrechende Liste unter der Leiste, Kopfzeile wächst mit. */
|
||||
html:not(.js) .site-header {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
html:not(.js) .site-header-bar {
|
||||
position: static;
|
||||
height: auto;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
html:not(.js) .site-header-inner {
|
||||
flex-wrap: wrap;
|
||||
min-height: var(--header-height);
|
||||
}
|
||||
|
||||
html:not(.js) .site-nav {
|
||||
order: 3;
|
||||
flex-basis: 100%;
|
||||
padding-bottom: var(--space-2);
|
||||
}
|
||||
|
||||
html.js .site-menu-button {
|
||||
display: inline-flex;
|
||||
html:not(.js) .site-nav-list {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
html.js .site-nav {
|
||||
display: none;
|
||||
position: fixed;
|
||||
inset: var(--header-height) 0 0;
|
||||
z-index: 49;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
background: var(--lf-white);
|
||||
padding: var(--space-4) var(--gutter) var(--space-8);
|
||||
border-top: 1px solid var(--color-border);
|
||||
}
|
||||
/*
|
||||
* Menümodus (mit JavaScript): unter 75 rem und immer dann, wenn die Navigation aus dem CMS nicht in eine Zeile passt.
|
||||
* Die Menü-Schaltfläche öffnet eine Fläche unter der sichtbaren Leiste. Keine Navigation am unteren Bildschirmrand.
|
||||
*/
|
||||
.site-header.is-menu-mode .site-menu-button {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
html.js .site-header.is-menu-open .site-nav {
|
||||
display: block;
|
||||
}
|
||||
.site-header.is-menu-mode .site-nav {
|
||||
display: none;
|
||||
position: fixed;
|
||||
inset: var(--site-menu-top, var(--header-height)) 0 0;
|
||||
z-index: 49;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
margin: 0;
|
||||
background: var(--lf-white);
|
||||
padding: var(--space-4) var(--gutter) var(--space-8);
|
||||
border-top: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
html.js .site-nav-list {
|
||||
display: block;
|
||||
}
|
||||
.site-header.is-menu-mode.is-menu-open .site-nav {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html.js .site-nav-item {
|
||||
display: block;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
.site-header.is-menu-mode .site-nav-list {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html.js .site-nav a {
|
||||
min-height: 3rem;
|
||||
font-size: 1.125rem;
|
||||
width: 100%;
|
||||
}
|
||||
.site-header.is-menu-mode .site-nav-item {
|
||||
display: block;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
html.js .site-nav-toggle {
|
||||
display: none;
|
||||
}
|
||||
.site-header.is-menu-mode .site-nav a {
|
||||
min-height: 3rem;
|
||||
font-size: 1.125rem;
|
||||
width: 100%;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
html.js .site-subnav {
|
||||
display: block;
|
||||
padding: 0 0 var(--space-2) var(--space-4);
|
||||
}
|
||||
.site-header.is-menu-mode .site-nav-list > .site-nav-item > a::after {
|
||||
right: auto;
|
||||
width: 3rem;
|
||||
}
|
||||
|
||||
html.js .site-subnav a {
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
min-height: var(--touch-target);
|
||||
}
|
||||
.site-header.is-menu-mode .site-nav-toggle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body.has-open-menu {
|
||||
overflow: hidden;
|
||||
}
|
||||
.site-header.is-menu-mode .site-subnav {
|
||||
display: block;
|
||||
padding: 0 0 var(--space-2) var(--space-4);
|
||||
}
|
||||
|
||||
.site-header.is-menu-mode .site-subnav a {
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
min-height: var(--touch-target);
|
||||
}
|
||||
|
||||
body.has-open-menu {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Inhaltsfläche */
|
||||
@@ -344,22 +472,26 @@ .course-actions {
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
/* Fußbereich */
|
||||
/* Fußbereich: dunkle Markenfläche, Wortmarke, Linkgruppen aus dem CMS, grüner Bogen als Abschluss. */
|
||||
.site-footer {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
isolation: isolate;
|
||||
background: var(--color-surface);
|
||||
color: var(--color-text);
|
||||
padding: var(--space-8) 0 var(--space-7);
|
||||
padding: clamp(3rem, 2rem + 4vw, 5rem) 0 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.site-footer-inner {
|
||||
display: grid;
|
||||
gap: var(--space-6) var(--space-7);
|
||||
padding-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem);
|
||||
}
|
||||
|
||||
@media (min-width: 48rem) {
|
||||
.site-footer-inner {
|
||||
grid-template-columns: minmax(12rem, 1.2fr) repeat(auto-fit, minmax(11rem, 1fr));
|
||||
grid-template-columns: minmax(13rem, 1.3fr) repeat(auto-fit, minmax(11rem, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,21 +499,17 @@ .site-footer .brand {
|
||||
color: var(--color-heading);
|
||||
}
|
||||
|
||||
.site-footer-brand p {
|
||||
margin: var(--space-3) 0 0;
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--text-small);
|
||||
max-width: 22rem;
|
||||
.site-footer .brand-lockup .brand-name {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
|
||||
.site-footer h2 {
|
||||
font-family: var(--font-reading);
|
||||
font-size: 0.875rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: var(--color-text-muted);
|
||||
margin: 0 0 var(--space-3);
|
||||
font-family: var(--font-display);
|
||||
font-size: 1.0625rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0;
|
||||
color: var(--color-heading);
|
||||
margin: 0 0 var(--space-2);
|
||||
}
|
||||
|
||||
.site-footer ul {
|
||||
@@ -394,15 +522,65 @@ .site-footer li a {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: var(--touch-target);
|
||||
color: var(--color-link);
|
||||
color: var(--color-text-muted);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.site-footer-meta {
|
||||
grid-column: 1 / -1;
|
||||
.site-footer li a:hover,
|
||||
.site-footer li a[aria-current='page'] {
|
||||
color: var(--color-link-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Grundzeile mit den rechtlichen Links; der Bogen läuft rechts darunter aus. */
|
||||
.site-footer-base {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
border-top: 1px solid var(--color-border);
|
||||
padding-top: var(--space-4);
|
||||
padding: var(--space-3) 0 clamp(3rem, 2rem + 4vw, 4.5rem);
|
||||
}
|
||||
|
||||
.site-footer-base ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0 var(--space-5);
|
||||
}
|
||||
|
||||
/* Helle Schrift: auf Navy 14:1, auf dem grünen Bogen 4,8:1. */
|
||||
.site-footer-base li a {
|
||||
font-size: var(--text-small);
|
||||
color: var(--color-text-muted);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
/* Grün dunkel unter weißer Schrift: 5,2:1, auch wenn der Bogen Links berührt. */
|
||||
.site-footer-arc {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
width: min(46rem, 70%);
|
||||
height: clamp(2.5rem, 1.5rem + 4vw, 5rem);
|
||||
color: var(--lf-green-deep);
|
||||
}
|
||||
|
||||
.site-footer:not(:has(.site-footer-base)) .site-footer-inner {
|
||||
padding-bottom: clamp(4rem, 3rem + 4vw, 6rem);
|
||||
}
|
||||
|
||||
/* Markenakzente (Brand-Kit 03_svg_entwuerfe, Entwürfe). Nur dekorativ, Farbe über Tokens. */
|
||||
.brand-underline {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 0.55em;
|
||||
color: var(--color-accent);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.brand-rays {
|
||||
display: block;
|
||||
width: 3.5rem;
|
||||
height: auto;
|
||||
color: var(--lf-yellow);
|
||||
}
|
||||
|
||||
/* Fußbereich schließt auch kurze Seiten am unteren Rand ab (nicht im Mitgliederbereich). */
|
||||
|
||||
@@ -101,19 +101,40 @@ :root {
|
||||
--radius-pill: 999px;
|
||||
--shadow-raised: 0 10px 28px rgb(3 37 81 / 8%);
|
||||
|
||||
/* Layoutmaße */
|
||||
--gutter: clamp(1rem, 4vw, 2rem);
|
||||
--grid-gap: clamp(1.25rem, 2.5vw, 2rem);
|
||||
--container-narrow: 45rem;
|
||||
--container-standard: 75rem;
|
||||
--container-wide: 90rem;
|
||||
/*
|
||||
* Breitenmodell (Designiteration 1). Vier semantische Stufen; die Abschnittsbreiten des Editors
|
||||
* (narrow, standard, wide, full) zeigen auf sie. Hintergründe reichen immer über die ganze Fensterbreite,
|
||||
* nur der Inhalt wird begrenzt.
|
||||
* - Lesebereich: lange Texte, Formulare
|
||||
* - Standard: Grundraster der Website; Kopfzeile, Fußbereich und Seiteninhalt fluchten hier
|
||||
* - Breit: bildstarke Kompositionen auf großen Bildschirmen
|
||||
* - Vollbreite: Inhalt bis an den Seitenrand (mit Randabstand)
|
||||
*/
|
||||
--gutter: clamp(1rem, 4vw, 2.5rem);
|
||||
--grid-gap: clamp(1.25rem, 2.5vw, 2.25rem);
|
||||
--width-reading: 44rem;
|
||||
--width-standard: 82rem;
|
||||
--width-wide: 96rem;
|
||||
--container-narrow: var(--width-reading);
|
||||
--container-standard: var(--width-standard);
|
||||
--container-wide: var(--width-wide);
|
||||
/* Linker Rand des Grundrasters innerhalb einer fensterbreiten Fläche (ohne 100vw, daher ohne Scrollbalken-Fehler). */
|
||||
--frame-inset: max(var(--gutter), (100% - var(--width-standard)) / 2);
|
||||
|
||||
/*
|
||||
* Kopfzeile: zwei Zustände bei unveränderter Box (kein Layoutsprung). Die Kopfzeile ist
|
||||
* --header-height-initial hoch und klebt mit negativem Abstand, sodass beim Scrollen nur die
|
||||
* kompakte Leiste (--header-height) sichtbar bleibt. Auf Smartphones sind beide Werte gleich.
|
||||
*/
|
||||
--header-height: 4rem;
|
||||
--header-height-initial: 4rem;
|
||||
--touch-target: 2.75rem;
|
||||
}
|
||||
|
||||
@media (min-width: 75rem) {
|
||||
:root {
|
||||
--header-height: 4.5rem;
|
||||
--header-height-initial: 6.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+596
-92
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Widget-Ansichten. Jede Regel verwendet Bedeutungswerte und richtet sich nach der Slotbreite
|
||||
* (Container „slot“), nicht nach dem Fenster. Die visuelle Veredelung einzelner Widgets erfolgt später;
|
||||
* Struktur und Klassen bleiben dafür stabil.
|
||||
* Widget-Ansichten (Designiteration 1). Jede Regel verwendet Bedeutungswerte und richtet sich nach der Slotbreite
|
||||
* (Container „slot“), nicht nach dem Fenster. Markenakzente (Unterstreichung, Strahlen) stammen aus
|
||||
* resources/views/components/brand und sind dekorativ.
|
||||
*/
|
||||
|
||||
.widget {
|
||||
@@ -19,54 +19,283 @@ .widget-heading h2 {
|
||||
max-width: 22ch;
|
||||
}
|
||||
|
||||
/* Einstieg (Hero). Varianten: standard, highlight. Stufen: schmal (Bild unter Text), breit (nebeneinander). */
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Einstieg (Hero)
|
||||
* Varianten: standard (Text | Bild), highlight (Markenfläche), stage (Markenbühne), editorial (textbetont).
|
||||
* ---------------------------------------------------------------------------------------------- */
|
||||
.hero {
|
||||
--hero-focus: 50% 50%;
|
||||
position: relative;
|
||||
display: grid;
|
||||
gap: var(--space-5);
|
||||
gap: var(--space-6);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.hero h1,
|
||||
.hero h2 {
|
||||
font-size: clamp(2rem, 1.1rem + 4.2cqi, 3.5rem);
|
||||
max-width: 16ch;
|
||||
.hero-copy > :is(h1, h2) {
|
||||
font-size: clamp(2.125rem, 1.2rem + 4.4cqi, 4rem);
|
||||
line-height: 1.05;
|
||||
letter-spacing: -0.025em;
|
||||
max-width: 15ch;
|
||||
margin: 0;
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
/* Markenstrich unter der Überschrift: kurze gelbe Unterstreichung, kein Hervorheben einzelner Wörter. */
|
||||
.hero-mark {
|
||||
width: clamp(5.5rem, 4rem + 6cqi, 9rem);
|
||||
height: 0.9rem;
|
||||
margin: var(--space-3) 0 var(--space-5);
|
||||
}
|
||||
|
||||
.hero .lede {
|
||||
max-width: 52ch;
|
||||
max-width: 48ch;
|
||||
margin: 0;
|
||||
font-size: clamp(1.125rem, 1rem + 0.6cqi, 1.3125rem);
|
||||
}
|
||||
|
||||
.hero .button {
|
||||
margin-top: var(--space-2);
|
||||
.hero-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-3);
|
||||
margin-top: var(--space-6);
|
||||
}
|
||||
|
||||
.hero-copy {
|
||||
position: relative;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.hero-figure {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.hero-image {
|
||||
width: 100%;
|
||||
display: block;
|
||||
border-radius: var(--radius-panel);
|
||||
aspect-ratio: 4 / 3;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: var(--hero-focus);
|
||||
}
|
||||
|
||||
.hero-figure .hero-image {
|
||||
aspect-ratio: 4 / 3;
|
||||
border-radius: var(--radius-panel);
|
||||
}
|
||||
|
||||
.hero-rays {
|
||||
position: absolute;
|
||||
width: clamp(2.75rem, 2rem + 3cqi, 4.5rem);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Standard: Bild mit grüner Fläche als Versatz und Signalstrahlen an der Ecke. */
|
||||
.hero-standard .hero-figure::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 1.25rem -1.25rem -1.25rem 1.25rem;
|
||||
z-index: -1;
|
||||
border-radius: var(--radius-panel);
|
||||
background: var(--lf-green-tint);
|
||||
}
|
||||
|
||||
.hero-standard .hero-rays {
|
||||
top: -2.25rem;
|
||||
left: -1.75rem;
|
||||
transform: rotate(-18deg);
|
||||
}
|
||||
|
||||
@container slot (min-width: 48rem) {
|
||||
.hero-with-image {
|
||||
grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
|
||||
gap: var(--space-7);
|
||||
.hero-standard.hero-with-image {
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
|
||||
gap: clamp(2.5rem, 6cqi, 5rem);
|
||||
}
|
||||
}
|
||||
|
||||
/* Hervorgehoben: dunkle Markenfläche mit gelben Akzenten. */
|
||||
.hero-highlight {
|
||||
padding: clamp(1.5rem, 5cqi, 3.5rem);
|
||||
padding: clamp(1.75rem, 6cqi, 4rem);
|
||||
border-radius: var(--radius-panel);
|
||||
background: var(--lf-navy);
|
||||
--color-text: #f4f6f8;
|
||||
--color-heading: var(--lf-white);
|
||||
--color-link: var(--lf-white);
|
||||
--color-link-hover: var(--lf-yellow);
|
||||
--color-focus: var(--lf-yellow);
|
||||
--color-action: var(--lf-yellow);
|
||||
--color-action-hover: #ffe05c;
|
||||
--color-action-text: var(--lf-navy);
|
||||
--color-border-strong: rgb(255 255 255 / 60%);
|
||||
--color-action-secondary-text: var(--lf-white);
|
||||
color: var(--color-text);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hero-highlight .hero-rays {
|
||||
top: clamp(1rem, 3cqi, 2rem);
|
||||
right: clamp(1rem, 4cqi, 2.5rem);
|
||||
}
|
||||
|
||||
.hero-highlight .hero-figure .hero-image {
|
||||
aspect-ratio: 16 / 10;
|
||||
}
|
||||
|
||||
@container slot (min-width: 48rem) {
|
||||
.hero-highlight.hero-with-image {
|
||||
grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
|
||||
gap: clamp(2rem, 5cqi, 4rem);
|
||||
}
|
||||
}
|
||||
|
||||
/* Editorial: großer Text, Beschreibung und Schaltflächen nebeneinander, Bild als breites Band darunter. */
|
||||
.hero-editorial {
|
||||
gap: var(--space-7);
|
||||
}
|
||||
|
||||
.hero-editorial .hero-copy > :is(h1, h2) {
|
||||
font-size: clamp(2.375rem, 1.2rem + 5.6cqi, 5rem);
|
||||
max-width: 18ch;
|
||||
}
|
||||
|
||||
.hero-editorial .hero-figure .hero-image {
|
||||
aspect-ratio: 16 / 9;
|
||||
}
|
||||
|
||||
/* Abgesetzter Markenstrich: liest sich als Abschluss der Überschrift, nicht als Hervorhebung eines Wortes. */
|
||||
.hero-editorial .hero-mark {
|
||||
margin-top: var(--space-5);
|
||||
}
|
||||
|
||||
@container slot (min-width: 56rem) {
|
||||
.hero-editorial .hero-copy {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
|
||||
column-gap: clamp(2rem, 6cqi, 5rem);
|
||||
align-items: end;
|
||||
}
|
||||
|
||||
.hero-editorial .hero-copy > :is(h1, h2),
|
||||
.hero-editorial .hero-mark {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.hero-editorial .hero-actions {
|
||||
margin-top: 0;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.hero-editorial .hero-figure .hero-image {
|
||||
aspect-ratio: 21 / 9;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Markenbühne: Bild über die volle Breite, Text auf einer hellen Tafel (Kontrast unabhängig vom Motiv).
|
||||
* Schmal: Bild oben im festen Format, Tafel überlappt den unteren Bildrand. Breit (ab 56rem): Bild füllt die Bühne,
|
||||
* die Tafel steht im Grundraster links oder rechts. Feste Formate verhindern Layoutverschiebungen beim Laden.
|
||||
*/
|
||||
.hero-stage {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.hero-stage .hero-media {
|
||||
position: relative;
|
||||
aspect-ratio: 4 / 3;
|
||||
overflow: hidden;
|
||||
background: var(--lf-green-tint);
|
||||
}
|
||||
|
||||
.hero-stage .hero-frame {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding-inline: var(--gutter);
|
||||
}
|
||||
|
||||
.hero-stage.hero-with-image .hero-frame {
|
||||
margin-top: -3.5rem;
|
||||
}
|
||||
|
||||
.hero-stage .hero-copy {
|
||||
--color-text: var(--lf-ink);
|
||||
--color-heading: var(--lf-navy);
|
||||
--color-link: var(--lf-navy);
|
||||
--color-focus: var(--lf-focus);
|
||||
--color-border-strong: var(--lf-navy);
|
||||
--color-action-secondary-text: var(--lf-navy);
|
||||
color: var(--color-text);
|
||||
background: var(--lf-cream);
|
||||
border-radius: var(--radius-panel);
|
||||
padding: clamp(1.5rem, 1rem + 3cqi, 3rem);
|
||||
box-shadow: 0 18px 40px rgb(3 37 81 / 12%);
|
||||
}
|
||||
|
||||
.hero-stage .hero-rays {
|
||||
top: -1.6rem;
|
||||
right: 1.5rem;
|
||||
}
|
||||
|
||||
/* Ohne Bild: Markenbühne als ruhige Fläche. */
|
||||
.hero-stage:not(.hero-with-image) .hero-copy {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
@container slot (min-width: 56rem) {
|
||||
.hero-stage.hero-with-image {
|
||||
display: grid;
|
||||
min-height: clamp(30rem, 72svh, 46rem);
|
||||
}
|
||||
|
||||
.hero-stage .hero-media {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
aspect-ratio: auto;
|
||||
}
|
||||
|
||||
.hero-stage.hero-with-image .hero-frame {
|
||||
display: grid;
|
||||
align-items: center;
|
||||
justify-items: end;
|
||||
margin-top: 0;
|
||||
padding-block: clamp(3rem, 6cqi, 5.5rem);
|
||||
padding-inline: var(--frame-inset);
|
||||
}
|
||||
|
||||
.hero-stage.hero-text-left .hero-frame {
|
||||
justify-items: start;
|
||||
}
|
||||
|
||||
.hero-stage .hero-copy {
|
||||
width: min(36rem, 46%);
|
||||
}
|
||||
|
||||
.hero-stage .hero-rays {
|
||||
top: -2.25rem;
|
||||
right: auto;
|
||||
left: -2rem;
|
||||
transform: rotate(-18deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* Randlos (SectionRenderer: section-bleed): keine Begrenzung, Abstand nach unten bleibt für die Tafel. */
|
||||
.section-bleed {
|
||||
padding-block: 0;
|
||||
}
|
||||
|
||||
.section-bleed .page-section-inner {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Schmal: Abstand unter der Tafel bis zum nächsten Abschnitt. */
|
||||
@container slot (max-width: 55.99rem) {
|
||||
.section-bleed .hero-stage .hero-frame {
|
||||
padding-bottom: clamp(2rem, 8cqi, 3.5rem);
|
||||
}
|
||||
}
|
||||
|
||||
/* Nicht randlos (Markenbühne in schmaleren Abschnitten oder Rastern): Bild mit runden Ecken. */
|
||||
.page-section:not(.section-bleed) .hero-stage .hero-media {
|
||||
border-radius: var(--radius-panel);
|
||||
}
|
||||
|
||||
.page-section:not(.section-bleed) .hero-stage .hero-frame {
|
||||
padding-inline: clamp(0.75rem, 4cqi, 2.5rem);
|
||||
}
|
||||
|
||||
/* Fließtext */
|
||||
@@ -74,30 +303,99 @@ .widget-prose .prose p {
|
||||
margin: 0 0 var(--space-4);
|
||||
}
|
||||
|
||||
/* Bild und Text. Varianten: image_left, image_right. Stufen: schmal (gestapelt), breit (nebeneinander ab 36rem). */
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Bild und Text. Varianten: image_left, image_right. Stufen: schmal (gestapelt), ab 36rem nebeneinander,
|
||||
* ab 56rem Bild betont. Formate über Einstellung: Quer-, Hochformat, Quadrat, Original.
|
||||
* ---------------------------------------------------------------------------------------------- */
|
||||
.image-text {
|
||||
--image-focus: 50% 50%;
|
||||
--image-ratio: 4 / 3;
|
||||
display: grid;
|
||||
gap: var(--space-5);
|
||||
gap: var(--space-6);
|
||||
}
|
||||
|
||||
.image-text img {
|
||||
width: 100%;
|
||||
.image-format-portrait {
|
||||
--image-ratio: 4 / 5;
|
||||
}
|
||||
|
||||
.image-format-square {
|
||||
--image-ratio: 1 / 1;
|
||||
}
|
||||
|
||||
.image-text-figure {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Versetzte Markenfläche hinter dem Bild, auf der Außenseite des Textes. */
|
||||
.image-text-figure::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0.6rem -0.6rem -0.6rem 0.6rem;
|
||||
z-index: -1;
|
||||
border-radius: var(--radius-panel);
|
||||
background: var(--lf-yellow-tint);
|
||||
}
|
||||
|
||||
@container slot (min-width: 36rem) {
|
||||
.image-text-figure::before {
|
||||
inset: 1rem 1rem -1rem -1rem;
|
||||
}
|
||||
|
||||
.image-text-right .image-text-figure::before {
|
||||
inset: 1rem -1rem -1rem 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.scope-dark .image-text-figure::before,
|
||||
.scope-accent .image-text-figure::before {
|
||||
background: rgb(255 255 255 / 12%);
|
||||
}
|
||||
|
||||
.image-text-figure img {
|
||||
display: block;
|
||||
border-radius: var(--radius-card);
|
||||
width: 100%;
|
||||
aspect-ratio: var(--image-ratio);
|
||||
object-fit: cover;
|
||||
object-position: var(--image-focus);
|
||||
border-radius: var(--radius-panel);
|
||||
}
|
||||
|
||||
.image-format-original .image-text-figure img {
|
||||
aspect-ratio: auto;
|
||||
}
|
||||
|
||||
.image-text-copy > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.image-text-copy h1,
|
||||
.image-text-copy h2 {
|
||||
font-size: clamp(1.75rem, 1.2rem + 2.4cqi, 2.75rem);
|
||||
line-height: 1.1;
|
||||
max-width: 20ch;
|
||||
margin: 0;
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
.image-text-mark {
|
||||
width: 5rem;
|
||||
height: 0.75rem;
|
||||
margin: var(--space-3) 0 var(--space-5);
|
||||
}
|
||||
|
||||
.image-text-copy .prose {
|
||||
font-size: clamp(1.0625rem, 1rem + 0.25cqi, 1.1875rem);
|
||||
}
|
||||
|
||||
@container slot (min-width: 36rem) {
|
||||
.image-text {
|
||||
grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 1.2fr);
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
||||
align-items: center;
|
||||
gap: var(--space-6);
|
||||
gap: clamp(2rem, 5cqi, 4rem);
|
||||
}
|
||||
|
||||
.image-text-right {
|
||||
grid-template-columns: minmax(0, 1.2fr) minmax(12rem, 0.8fr);
|
||||
}
|
||||
|
||||
.image-text-right > img {
|
||||
.image-text-right > .image-text-figure {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
@@ -106,142 +404,336 @@ @container slot (min-width: 36rem) {
|
||||
}
|
||||
}
|
||||
|
||||
.image-text-copy > :first-child {
|
||||
margin-top: 0;
|
||||
@container slot (min-width: 56rem) {
|
||||
.image-text-left {
|
||||
grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
|
||||
}
|
||||
|
||||
.image-text-right {
|
||||
grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
|
||||
}
|
||||
|
||||
.image-text-no-image {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Redaktionelle Karten. Varianten: Raster (cards-grid), kompakte Liste (cards-compact). */
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Redaktionelle Karten. Varianten: Raster (cards-grid), kompakte Liste (cards-compact),
|
||||
* erste Karte hervorgehoben (cards-featured). Die ganze Karte ist über den Titellink klickbar.
|
||||
* ---------------------------------------------------------------------------------------------- */
|
||||
.cards {
|
||||
--card-surface: var(--lf-cream);
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr));
|
||||
gap: var(--space-4);
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
|
||||
gap: var(--grid-gap);
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.section-bg-light .cards,
|
||||
.scope-dark .cards,
|
||||
.scope-accent .cards,
|
||||
.section-bg-image .cards {
|
||||
--card-surface: var(--lf-white);
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--lf-white);
|
||||
border: 1px solid var(--lf-line);
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--card-surface);
|
||||
border-radius: var(--radius-card);
|
||||
padding: var(--space-5);
|
||||
overflow: hidden;
|
||||
color: var(--lf-ink);
|
||||
--color-text: var(--lf-ink);
|
||||
--color-text-muted: var(--lf-ink-muted);
|
||||
--color-heading: var(--lf-navy);
|
||||
--color-link: var(--lf-navy);
|
||||
--color-focus: var(--lf-focus);
|
||||
}
|
||||
|
||||
.card h3 {
|
||||
margin: 0 0 var(--space-2);
|
||||
}
|
||||
|
||||
.card p {
|
||||
margin: 0;
|
||||
color: var(--lf-ink-muted);
|
||||
}
|
||||
|
||||
.card a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.card a:hover h3 {
|
||||
text-decoration: underline;
|
||||
.card-media {
|
||||
aspect-ratio: 3 / 2;
|
||||
overflow: hidden;
|
||||
background: var(--lf-green-tint);
|
||||
}
|
||||
|
||||
.card-image {
|
||||
display: block;
|
||||
width: calc(100% + 2 * var(--space-5));
|
||||
max-width: none;
|
||||
aspect-ratio: 4 / 3;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-5)) var(--space-4);
|
||||
}
|
||||
|
||||
.card-body {
|
||||
display: grid;
|
||||
gap: var(--space-2);
|
||||
padding: var(--space-5);
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: clamp(1.1875rem, 1.1rem + 0.4cqi, 1.375rem);
|
||||
line-height: 1.2;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.card-title a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Gestreckter Link: die ganze Karte ist klickbar, ein einziger Tabstopp. */
|
||||
.card-title a::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
.card-linked:hover .card-title a {
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 2px;
|
||||
text-underline-offset: 0.2em;
|
||||
}
|
||||
|
||||
.card-linked:has(a:focus-visible) {
|
||||
outline: 3px solid var(--color-focus);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.card-title a:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.card p {
|
||||
margin: 0;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
/* Karte ohne Bild: gelbe Markenkante oben. */
|
||||
.cards-grid .card:not(.card-with-image),
|
||||
.cards-featured .card:not(.card-with-image) {
|
||||
box-shadow: inset 0 5px 0 var(--lf-yellow);
|
||||
}
|
||||
|
||||
/* Hervorgehoben: Die erste Karte nimmt die ganze Zeile ein, ab 44rem Bild neben dem Text. */
|
||||
.cards-featured .card-lead {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.cards-featured .card-lead .card-title {
|
||||
font-size: clamp(1.5rem, 1.1rem + 1.8cqi, 2.25rem);
|
||||
}
|
||||
|
||||
.cards-featured .card-lead .card-body {
|
||||
padding: clamp(1.5rem, 4cqi, 3rem);
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
@container slot (min-width: 44rem) {
|
||||
.cards-featured .card-lead.card-with-image {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.cards-featured .card-lead .card-media {
|
||||
aspect-ratio: auto;
|
||||
min-height: 20rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Kompakte Liste: redaktionelle Zeilen mit Trennlinie, Bild klein rechts. */
|
||||
.cards-compact {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.cards-compact .card {
|
||||
border-width: 0 0 1px;
|
||||
flex-direction: row-reverse;
|
||||
align-items: center;
|
||||
gap: var(--space-4);
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
padding: var(--space-3) 0;
|
||||
border-top: 1px solid var(--color-border);
|
||||
color: var(--color-text);
|
||||
--color-text: inherit;
|
||||
--color-heading: inherit;
|
||||
border-color: var(--color-border);
|
||||
--color-link: inherit;
|
||||
--color-text-muted: inherit;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.cards-compact .card:last-child {
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.cards-compact .card-body {
|
||||
flex: 1;
|
||||
padding: var(--space-4) 0;
|
||||
}
|
||||
|
||||
.cards-compact .card p {
|
||||
color: var(--color-text-muted);
|
||||
opacity: 0.88;
|
||||
}
|
||||
|
||||
.cards-compact .card-image {
|
||||
display: none;
|
||||
.cards-compact .card-media {
|
||||
flex: none;
|
||||
width: clamp(4.5rem, 18cqi, 6.5rem);
|
||||
aspect-ratio: 1;
|
||||
margin-block: var(--space-3);
|
||||
border-radius: var(--radius-small);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Programm- und Modulkarten. Inhalte aus den Fachdaten; die Markentafel trägt die Art (Programm, Modul).
|
||||
* Stufen: schmal gestapelt; ab 40rem Slotbreite bei einer Karte Tafel neben dem Text; Liste in „compact“.
|
||||
* ---------------------------------------------------------------------------------------------- */
|
||||
.catalog-cards > h2 {
|
||||
max-width: 22ch;
|
||||
}
|
||||
|
||||
/* Programm- und Modulkarten. Inhalte kommen aus den Fachdaten. */
|
||||
.catalog-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
|
||||
gap: var(--space-4);
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr));
|
||||
gap: var(--grid-gap);
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: var(--space-4) 0 0;
|
||||
margin: var(--space-5) 0 0;
|
||||
}
|
||||
|
||||
.catalog-cards > :first-child + .catalog-list,
|
||||
.catalog-cards > .catalog-list:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.catalog-card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--lf-white);
|
||||
border: 1px solid var(--lf-line);
|
||||
border-radius: var(--radius-card);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: var(--lf-ink);
|
||||
--color-text: var(--lf-ink);
|
||||
--color-text-muted: var(--lf-ink-muted);
|
||||
--color-heading: var(--lf-navy);
|
||||
--color-link: var(--lf-navy);
|
||||
--color-focus: var(--lf-focus);
|
||||
}
|
||||
|
||||
.catalog-card-visual {
|
||||
background: var(--lf-cream);
|
||||
border-bottom: 4px solid var(--lf-yellow);
|
||||
min-height: 6rem;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
padding: var(--space-3) var(--space-4);
|
||||
min-height: 7rem;
|
||||
padding: var(--space-4) var(--space-5);
|
||||
background: var(--lf-navy);
|
||||
border-bottom: 5px solid var(--lf-yellow);
|
||||
}
|
||||
|
||||
/* Auf dunklen Flächen trägt Grün dunkel die Tafel, damit sie sich vom Abschnitt abhebt. */
|
||||
.scope-dark .catalog-card-visual {
|
||||
background: var(--lf-green-deep);
|
||||
}
|
||||
|
||||
.catalog-card-visual span {
|
||||
font-family: var(--font-display);
|
||||
font-weight: 800;
|
||||
font-size: 1.125rem;
|
||||
color: var(--lf-navy);
|
||||
font-size: 1.25rem;
|
||||
color: var(--lf-white);
|
||||
}
|
||||
|
||||
.catalog-card-rays {
|
||||
position: absolute;
|
||||
top: var(--space-4);
|
||||
right: var(--space-5);
|
||||
width: 2.75rem;
|
||||
}
|
||||
|
||||
.catalog-card-body {
|
||||
padding: var(--space-4) var(--space-5) var(--space-5);
|
||||
display: grid;
|
||||
gap: var(--space-2);
|
||||
align-content: start;
|
||||
padding: var(--space-5);
|
||||
}
|
||||
|
||||
.catalog-card-body h3 {
|
||||
margin: 0 0 var(--space-2);
|
||||
font-size: clamp(1.25rem, 1.15rem + 0.5cqi, 1.5rem);
|
||||
line-height: 1.2;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.catalog-card-body h3 a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.catalog-card-linked h3 a::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
}
|
||||
|
||||
.catalog-card-linked:hover h3 a {
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 2px;
|
||||
text-underline-offset: 0.2em;
|
||||
}
|
||||
|
||||
.catalog-card-linked:has(a:focus-visible) {
|
||||
outline: 3px solid var(--color-focus);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.catalog-card-linked h3 a:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.catalog-card-body p {
|
||||
margin: 0 0 var(--space-2);
|
||||
margin: 0;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
/* Die Art steht in der Tafel; für Hilfsmittel bleibt sie im Text erhalten. */
|
||||
.catalog-cards-standard .catalog-card-kind {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0 0 0 0);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.catalog-card-kind {
|
||||
font-size: 0.8125rem;
|
||||
font-size: var(--text-small);
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
color: var(--lf-ink-muted);
|
||||
color: var(--lf-green-deep);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.catalog-cards[data-count='1'] .catalog-list {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
@container slot (min-width: 40rem) {
|
||||
.catalog-cards-standard[data-count='1'] .catalog-card {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr);
|
||||
}
|
||||
|
||||
.catalog-cards-standard[data-count='1'] .catalog-card-visual {
|
||||
border-bottom: 0;
|
||||
border-right: 5px solid var(--lf-yellow);
|
||||
min-height: 11rem;
|
||||
}
|
||||
|
||||
.catalog-cards-standard[data-count='1'] .catalog-card-body {
|
||||
align-content: center;
|
||||
padding: var(--space-6);
|
||||
}
|
||||
}
|
||||
|
||||
.catalog-cards-compact .catalog-list {
|
||||
@@ -250,18 +742,25 @@ .catalog-cards-compact .catalog-list {
|
||||
}
|
||||
|
||||
.catalog-cards-compact .catalog-card {
|
||||
border-width: 0 0 1px;
|
||||
border-width: 1px 0 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
color: var(--color-text);
|
||||
--color-text: inherit;
|
||||
--color-text-muted: inherit;
|
||||
--color-heading: inherit;
|
||||
--color-link: inherit;
|
||||
border-color: var(--color-border);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.catalog-cards-compact .catalog-card:last-child {
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
|
||||
.catalog-cards-compact .catalog-card-body {
|
||||
padding: var(--space-3) 0;
|
||||
padding: var(--space-4) 0;
|
||||
gap: var(--space-1);
|
||||
}
|
||||
|
||||
.catalog-cards-compact .catalog-card-kind {
|
||||
@@ -275,9 +774,10 @@ .catalog-card-internal {
|
||||
|
||||
/* Handlungsaufruf */
|
||||
.cta {
|
||||
position: relative;
|
||||
background: var(--color-surface-subtle);
|
||||
border-radius: var(--radius-panel);
|
||||
padding: clamp(1.25rem, 5cqi, 2.5rem);
|
||||
padding: clamp(1.5rem, 5cqi, 3rem);
|
||||
color: var(--lf-ink);
|
||||
--color-heading: var(--lf-navy);
|
||||
--color-text: var(--lf-ink);
|
||||
@@ -288,8 +788,12 @@ .cta {
|
||||
--color-action-text: var(--lf-white);
|
||||
}
|
||||
|
||||
.section-bg-light .cta {
|
||||
background: var(--lf-white);
|
||||
}
|
||||
|
||||
.cta h2 {
|
||||
font-size: clamp(1.5rem, 1.1rem + 2cqi, 2.125rem);
|
||||
font-size: clamp(1.5rem, 1.1rem + 2cqi, 2.25rem);
|
||||
}
|
||||
|
||||
.cta p {
|
||||
|
||||
+105
-19
@@ -1,19 +1,27 @@
|
||||
/**
|
||||
* Website-Kopfzeile: mobile Navigation, Untermenüs und Schatten beim Scrollen.
|
||||
* Website-Kopfzeile: Menümodus, mobile Navigation, Untermenüs und kompakter Zustand beim Scrollen.
|
||||
*
|
||||
* Breitenstufen der Kopfzeile (Messung an einer unsichtbaren Kopie, unabhängig vom aktuellen Modus):
|
||||
* 1. Navigation und Kontozugang mit Beschriftung passen in eine Zeile.
|
||||
* 2. Sonst: Kontozugang nur als Symbol (is-account-compact).
|
||||
* 3. Sonst und immer unter 75 rem: Menümodus (is-menu-mode).
|
||||
* So bricht die Navigation aus dem CMS nie um, und die Höhe der Kopfzeile bleibt auf allen Seiten gleich.
|
||||
* Ohne JavaScript bleibt die Navigation als umbrechende Liste bedienbar (CSS: html:not(.js)).
|
||||
*/
|
||||
const DESKTOP = window.matchMedia('(min-width: 75rem)');
|
||||
const BASELINE = window.matchMedia('(max-width: 74.99rem)');
|
||||
|
||||
function focusableIn(element) {
|
||||
return [...element.querySelectorAll('a[href], button:not([disabled])')].filter((node) => node.offsetParent !== null);
|
||||
}
|
||||
|
||||
const isMenuMode = (header) => header.classList.contains('is-menu-mode');
|
||||
|
||||
function setupMenu(header) {
|
||||
const button = header.querySelector('[data-site-menu-button]');
|
||||
const nav = header.querySelector('#site-nav');
|
||||
|
||||
if (!button || !nav) {
|
||||
return;
|
||||
return () => {};
|
||||
}
|
||||
|
||||
const label = button.querySelector('[data-menu-label]');
|
||||
@@ -21,6 +29,10 @@ function setupMenu(header) {
|
||||
const iconClose = button.querySelector('[data-icon-close]');
|
||||
|
||||
const setOpen = (open, { restoreFocus = true } = {}) => {
|
||||
if (open) {
|
||||
// Die Fläche beginnt unter dem sichtbaren Teil der Kopfzeile, gleich in welchem Zustand.
|
||||
header.style.setProperty('--site-menu-top', `${Math.max(0, Math.round(header.getBoundingClientRect().bottom))}px`);
|
||||
}
|
||||
header.classList.toggle('is-menu-open', open);
|
||||
document.body.classList.toggle('has-open-menu', open);
|
||||
button.setAttribute('aria-expanded', String(open));
|
||||
@@ -51,16 +63,15 @@ function setupMenu(header) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Fokus bleibt in Menü und Menü-Schaltfläche, solange das Menü offen ist.
|
||||
// Fokus bleibt in Menü-Schaltfläche und Menü, solange das Menü offen ist. Die Reihenfolge wird vollständig
|
||||
// selbst gesteuert, weil die Schaltfläche im Quelltext hinter der Navigation steht (sonst springt Tab in den Inhalt).
|
||||
if (event.key === 'Tab') {
|
||||
const items = [button, ...focusableIn(nav)];
|
||||
const index = items.indexOf(document.activeElement);
|
||||
const next = event.shiftKey ? index - 1 : index + 1;
|
||||
const next = index === -1 ? 0 : (index + (event.shiftKey ? -1 : 1) + items.length) % items.length;
|
||||
|
||||
if (index === -1 || next < 0 || next >= items.length) {
|
||||
event.preventDefault();
|
||||
items[event.shiftKey ? items.length - 1 : 0].focus();
|
||||
}
|
||||
event.preventDefault();
|
||||
items[next].focus();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -70,11 +81,75 @@ function setupMenu(header) {
|
||||
}
|
||||
});
|
||||
|
||||
DESKTOP.addEventListener('change', (event) => {
|
||||
if (event.matches && header.classList.contains('is-menu-open')) {
|
||||
// Rückgabe: schließt das Menü, wenn der Menümodus endet.
|
||||
return () => {
|
||||
if (header.classList.contains('is-menu-open')) {
|
||||
setOpen(false, { restoreFocus: false });
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function setupMode(header, closeMenu) {
|
||||
const inner = header.querySelector('.site-header-inner');
|
||||
const list = header.querySelector('.site-nav-list');
|
||||
const brand = inner?.querySelector('.brand');
|
||||
const actions = inner?.querySelector('.site-header-actions');
|
||||
const account = actions?.querySelector('.site-account-link');
|
||||
const menuButton = actions?.querySelector('[data-site-menu-button]');
|
||||
|
||||
if (!inner || !list || !brand || !actions || !account) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Unsichtbare Kopie von Navigation und Kontozugang in Desktop-Darstellung: liefert die benötigten Breiten in jedem Modus.
|
||||
const probe = document.createElement('div');
|
||||
probe.className = 'site-header site-nav-probe';
|
||||
probe.setAttribute('aria-hidden', 'true');
|
||||
probe.style.cssText = 'position:absolute;visibility:hidden;pointer-events:none;left:-10000px;top:0;height:auto;padding:0;width:max-content;';
|
||||
const nav = document.createElement('nav');
|
||||
nav.className = 'site-nav';
|
||||
nav.appendChild(list.cloneNode(true));
|
||||
const accountProbe = account.cloneNode(true);
|
||||
probe.append(nav, accountProbe);
|
||||
probe.querySelectorAll('[id]').forEach((node) => node.removeAttribute('id'));
|
||||
probe.querySelectorAll('a, button').forEach((node) => node.setAttribute('tabindex', '-1'));
|
||||
document.body.appendChild(probe);
|
||||
|
||||
const width = (element) => element.getBoundingClientRect().width;
|
||||
|
||||
const update = () => {
|
||||
const gap = parseFloat(getComputedStyle(inner).columnGap) || 0;
|
||||
const actionsGap = parseFloat(getComputedStyle(actions).columnGap) || 0;
|
||||
const navMargin = parseFloat(getComputedStyle(nav).marginLeft) || 0;
|
||||
let fixedActions = width(actions) - width(account);
|
||||
if (menuButton && menuButton.offsetParent !== null) {
|
||||
fixedActions -= width(menuButton) + actionsGap;
|
||||
}
|
||||
// Die Wortmarke ist im Ausgangszustand skaliert; gemessen wird die tatsächlich belegte Breite.
|
||||
const room = inner.clientWidth - width(brand) - 2 * gap - navMargin - fixedActions;
|
||||
const needed = nav.scrollWidth;
|
||||
const accountIcon = parseFloat(getComputedStyle(account).minWidth) || 44;
|
||||
|
||||
let state = 'menu';
|
||||
if (!BASELINE.matches && needed + width(accountProbe) <= room) {
|
||||
state = 'full';
|
||||
} else if (!BASELINE.matches && needed + accountIcon <= room) {
|
||||
state = 'icon';
|
||||
}
|
||||
|
||||
header.classList.toggle('is-account-compact', state !== 'full');
|
||||
if ((state === 'menu') !== isMenuMode(header)) {
|
||||
header.classList.toggle('is-menu-mode', state === 'menu');
|
||||
if (state !== 'menu') {
|
||||
closeMenu();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
update();
|
||||
new ResizeObserver(update).observe(inner);
|
||||
BASELINE.addEventListener('change', update);
|
||||
document.fonts?.ready.then(update);
|
||||
}
|
||||
|
||||
function setupSubmenus(header) {
|
||||
@@ -113,7 +188,7 @@ function setupSubmenus(header) {
|
||||
});
|
||||
|
||||
item.addEventListener('focusout', (event) => {
|
||||
if (DESKTOP.matches && !item.contains(event.relatedTarget)) {
|
||||
if (!isMenuMode(header) && !item.contains(event.relatedTarget)) {
|
||||
close(item);
|
||||
}
|
||||
});
|
||||
@@ -124,14 +199,25 @@ function setupSubmenus(header) {
|
||||
});
|
||||
}
|
||||
|
||||
function setupShadow(header) {
|
||||
const update = () => header.classList.toggle('is-scrolled', window.scrollY > 8);
|
||||
window.addEventListener('scroll', update, { passive: true });
|
||||
update();
|
||||
/**
|
||||
* Kompakter Zustand: Sobald der Bereich über der kompakten Leiste aus dem Bild gescrollt ist, wird die Wortmarke
|
||||
* verkleinert und ein Schatten gesetzt. Die Höhe im Seitenfluss ändert sich dabei nicht.
|
||||
*/
|
||||
function setupCompact(header) {
|
||||
const sentinel = document.querySelector('[data-site-header-sentinel]');
|
||||
|
||||
if (!sentinel || !('IntersectionObserver' in window)) {
|
||||
return;
|
||||
}
|
||||
|
||||
new IntersectionObserver(([entry]) => {
|
||||
header.classList.toggle('is-compact', !entry.isIntersecting);
|
||||
}).observe(sentinel);
|
||||
}
|
||||
|
||||
document.querySelectorAll('[data-site-header]').forEach((header) => {
|
||||
setupMenu(header);
|
||||
const closeMenu = setupMenu(header);
|
||||
setupMode(header, closeMenu);
|
||||
setupSubmenus(header);
|
||||
setupShadow(header);
|
||||
setupCompact(header);
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
{{-- Markenakzent „Bogen“: grüne Schwungfläche als Abschluss dunkler Flächen (nach dem Homepage-Entwurf des Brand-Kits). Dekorativ. --}}
|
||||
<svg {{ $attributes->class(['brand-arc']) }} viewBox="0 0 400 120" preserveAspectRatio="none" aria-hidden="true" focusable="false"><path d="M0 120 C120 112 250 80 400 0 L400 120 Z" fill="currentColor"/></svg>
|
||||
@@ -0,0 +1,2 @@
|
||||
{{-- Markenakzent „Signalstrahlen“ (Brand-Kit 03_svg_entwuerfe/yellow-rays.svg, Entwurf). Dekorativ; nie an der Wortmarke. --}}
|
||||
<svg {{ $attributes->class(['brand-rays']) }} viewBox="0 0 100 85" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="11"><path d="M23 52L6 40"/><path d="M48 29L46 9"/><path d="M74 44L89 23"/></g></svg>
|
||||
@@ -0,0 +1,2 @@
|
||||
{{-- Markenakzent „Unterstreichung“ (Brand-Kit 03_svg_entwuerfe/yellow-underline.svg, Entwurf). Dekorativ, Farbe über currentColor. --}}
|
||||
<svg {{ $attributes->class(['brand-underline']) }} viewBox="0 0 280 28" preserveAspectRatio="none" aria-hidden="true" focusable="false"><path d="M9 18 Q102 1 270 12" fill="none" stroke="currentColor" stroke-width="13" stroke-linecap="round" vector-effect="non-scaling-stroke"/></svg>
|
||||
@@ -1,10 +1,12 @@
|
||||
{{--
|
||||
Wortmarke. VORLÄUFIG: Es liegt keine freigegebene Logodatei vor (docs/Brand-UI-Kit/README.md, Markenleitlinie 5).
|
||||
Bis dahin steht hier ein schlichter Schriftzug in der vorläufigen Auszeichnungsschrift, ohne Nachbildung der
|
||||
Filmwortmarke (keine Drehung, kein Unterstrich-Schwung). Eine freigegebene SVG-Datei wird ausschließlich hier eingesetzt.
|
||||
Bis dahin steht hier ein Schriftzug in der vorläufigen Auszeichnungsschrift. Die Variante „lockup“ (Website)
|
||||
ergänzt den Zusatz als grünes Schild nach dem Web-Entwurf des Brand-Kits (05_web_preview). Keine Nachbildung der
|
||||
Filmwortmarke: keine Wolkenform, keine Drehung, kein Unterstrich-Schwung, keine Strahlen.
|
||||
Eine freigegebene SVG-Datei wird ausschließlich hier eingesetzt.
|
||||
--}}
|
||||
@props(['href' => null, 'claim' => 'Stark im Alltag'])
|
||||
<a {{ $attributes->class(['brand']) }} href="{{ $href ?? route('home') }}" data-brand-status="vorlaeufig">
|
||||
@props(['href' => null, 'claim' => 'Stark im Alltag', 'variant' => 'plain'])
|
||||
<a {{ $attributes->class(['brand', 'brand-lockup' => $variant === 'lockup']) }} href="{{ $href ?? route('home') }}" data-brand-status="vorlaeufig">
|
||||
<span class="brand-name">Lara & Felix</span>
|
||||
<span class="brand-claim">{{ $claim }}</span>
|
||||
</a>
|
||||
@@ -1,16 +1,21 @@
|
||||
@props(['navigation', 'path' => null])
|
||||
@php
|
||||
$groups = \App\Domain\Cms\SiteNavigation::forPath($navigation, $path ?? request()->path())->footerGroups();
|
||||
$groups = collect(\App\Domain\Cms\SiteNavigation::forPath($navigation, $path ?? request()->path())->footerGroups());
|
||||
$legal = $groups->firstWhere('key', 'footer_legal');
|
||||
$columns = $groups->reject(fn (array $group): bool => $group['key'] === 'footer_legal');
|
||||
$themes = \App\Domain\Catalog\Pillar::query()->published()->get(['id', 'name', 'slug']);
|
||||
@endphp
|
||||
{{-- Fußbereich: Links aus der CMS-Navigation (Plätze „Fußbereich: …“) und die veröffentlichten Themenbereiche. Keine erfundenen Kontakt- oder Rechtstexte. --}}
|
||||
{{--
|
||||
Fußbereich: Links aus der CMS-Navigation (Plätze „Fußbereich: …“) und die veröffentlichten Themenbereiche.
|
||||
Keine eigene Inhaltsverwaltung, keine erfundenen Kontakt- oder Rechtstexte. „Rechtliches“ steht in der Grundzeile.
|
||||
--}}
|
||||
<footer class="site-footer scope-dark">
|
||||
<div class="site-footer-inner ui-container">
|
||||
<div class="site-footer-brand">
|
||||
<x-site.brand />
|
||||
<x-site.brand variant="lockup" />
|
||||
</div>
|
||||
@if ($themes->isNotEmpty())
|
||||
<nav aria-labelledby="fuss-themen">
|
||||
<nav class="site-footer-group site-footer-themes" aria-labelledby="fuss-themen">
|
||||
<h2 id="fuss-themen">Themenbereiche</h2>
|
||||
<ul>
|
||||
@foreach ($themes as $theme)
|
||||
@@ -19,8 +24,8 @@
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
@foreach ($groups as $group)
|
||||
<nav aria-labelledby="fuss-{{ $group['key'] }}">
|
||||
@foreach ($columns as $group)
|
||||
<nav class="site-footer-group" aria-labelledby="fuss-{{ $group['key'] }}">
|
||||
<h2 id="fuss-{{ $group['key'] }}">{{ $group['heading'] }}</h2>
|
||||
<ul>
|
||||
@foreach ($group['links'] as $link)
|
||||
@@ -30,4 +35,17 @@
|
||||
</nav>
|
||||
@endforeach
|
||||
</div>
|
||||
@if ($legal)
|
||||
<div class="site-footer-base ui-container">
|
||||
<nav aria-labelledby="fuss-footer_legal">
|
||||
<h2 id="fuss-footer_legal" class="visually-hidden">{{ $legal['heading'] }}</h2>
|
||||
<ul>
|
||||
@foreach ($legal['links'] as $link)
|
||||
<li><a href="{{ $link['href'] }}" @if ($link['current']) aria-current="page" @endif>{{ $link['label'] }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
@endif
|
||||
<x-brand.arc class="site-footer-arc" />
|
||||
</footer>
|
||||
@@ -2,45 +2,55 @@
|
||||
@php
|
||||
$entries = \App\Domain\Cms\SiteNavigation::forPath($navigation, $path ?? request()->path())->header();
|
||||
@endphp
|
||||
{{-- Gleiche Ausgabe für Gäste und Mitglieder (ADR-32): Der Kontozugang führt zum Mitgliederbereich, der bei Bedarf zur Anmeldung leitet. --}}
|
||||
{{--
|
||||
Globale Kopfzeile. Gleiche Ausgabe für Gäste und Mitglieder (ADR-32): Der Kontozugang führt zum Mitgliederbereich,
|
||||
der bei Bedarf zur Anmeldung leitet.
|
||||
Geometrie: Die Box ist immer --header-height-initial hoch und klebt mit negativem Abstand; die innere Leiste
|
||||
klebt oben. Beim Scrollen bleibt nur die kompakte Leiste sichtbar, ohne dass sich die Höhe im Seitenfluss ändert.
|
||||
--}}
|
||||
<span class="site-header-sentinel" aria-hidden="true" data-site-header-sentinel></span>
|
||||
<header class="site-header" data-site-header>
|
||||
<div class="site-header-inner ui-container ui-container-wide">
|
||||
<x-site.brand />
|
||||
<nav class="site-nav" id="site-nav" aria-label="Hauptnavigation">
|
||||
<ul class="site-nav-list">
|
||||
@foreach ($entries as $entry)
|
||||
<li @class(['site-nav-item', 'has-children' => $entry['children'] !== [], 'is-active-trail' => $entry['activeTrail']])>
|
||||
@if ($entry['href'])
|
||||
<a href="{{ $entry['href'] }}" @if ($entry['current']) aria-current="page" @endif>{{ $entry['label'] }}</a>
|
||||
@else
|
||||
<a href="#untermenue-{{ $entry['id'] }}" data-site-subnav-label>{{ $entry['label'] }}</a>
|
||||
@endif
|
||||
@if ($entry['children'] !== [])
|
||||
<button type="button" class="site-nav-toggle" aria-expanded="false" aria-controls="untermenue-{{ $entry['id'] }}" data-site-subnav-toggle>
|
||||
<x-heroicon-o-chevron-down aria-hidden="true" />
|
||||
<span class="visually-hidden">Untermenü {{ $entry['label'] }}</span>
|
||||
</button>
|
||||
<ul class="site-subnav" id="untermenue-{{ $entry['id'] }}">
|
||||
@foreach ($entry['children'] as $child)
|
||||
<li><a href="{{ $child['href'] }}" @if ($child['current']) aria-current="page" @endif>{{ $child['label'] }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="site-header-actions">
|
||||
<a class="site-icon-link" href="{{ route('member.dashboard') }}">
|
||||
<x-heroicon-o-user-circle aria-hidden="true" />
|
||||
<span class="site-account-label">Mitgliederbereich</span>
|
||||
</a>
|
||||
<x-site.cart-link />
|
||||
<button type="button" class="site-menu-button" aria-expanded="false" aria-controls="site-nav" data-site-menu-button>
|
||||
<x-heroicon-o-bars-3 aria-hidden="true" data-icon-open />
|
||||
<x-heroicon-o-x-mark aria-hidden="true" data-icon-close hidden />
|
||||
<span data-menu-label>Menü</span>
|
||||
</button>
|
||||
<div class="site-header-bar">
|
||||
<div class="site-header-inner ui-container">
|
||||
<x-site.brand variant="lockup" />
|
||||
<nav class="site-nav" id="site-nav" aria-label="Hauptnavigation">
|
||||
<ul class="site-nav-list">
|
||||
@foreach ($entries as $entry)
|
||||
<li @class(['site-nav-item', 'has-children' => $entry['children'] !== [], 'is-active-trail' => $entry['activeTrail']])>
|
||||
@if ($entry['href'])
|
||||
<a href="{{ $entry['href'] }}" @if ($entry['current']) aria-current="page" @endif>{{ $entry['label'] }}</a>
|
||||
@else
|
||||
<a href="#untermenue-{{ $entry['id'] }}" data-site-subnav-label>{{ $entry['label'] }}</a>
|
||||
@endif
|
||||
@if ($entry['children'] !== [])
|
||||
<button type="button" class="site-nav-toggle" aria-expanded="false" aria-controls="untermenue-{{ $entry['id'] }}" data-site-subnav-toggle>
|
||||
<x-heroicon-o-chevron-down aria-hidden="true" />
|
||||
<span class="visually-hidden">Untermenü {{ $entry['label'] }}</span>
|
||||
</button>
|
||||
<ul class="site-subnav" id="untermenue-{{ $entry['id'] }}">
|
||||
@foreach ($entry['children'] as $child)
|
||||
<li><a href="{{ $child['href'] }}" @if ($child['current']) aria-current="page" @endif>{{ $child['label'] }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="site-header-actions">
|
||||
<a class="site-icon-link site-account-link" href="{{ route('member.dashboard') }}">
|
||||
<x-heroicon-o-user-circle aria-hidden="true" />
|
||||
<span class="site-account-label">Mitgliederbereich</span>
|
||||
</a>
|
||||
<x-site.cart-link />
|
||||
<button type="button" class="site-menu-button" aria-expanded="false" aria-controls="site-nav" data-site-menu-button>
|
||||
<x-heroicon-o-bars-3 aria-hidden="true" data-icon-open />
|
||||
<x-heroicon-o-x-mark aria-hidden="true" data-icon-close hidden />
|
||||
<span data-menu-label>Menü</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{-- Menümodus vor dem ersten Zeichnen setzen, damit die Navigation auf kleinen Bildschirmen nicht aufblitzt. --}}
|
||||
<script>(function (h) { if (window.matchMedia('(max-width: 74.99rem)').matches) { h.classList.add('is-menu-mode'); } })(document.querySelector('[data-site-header]'));</script>
|
||||
@@ -1,26 +1,36 @@
|
||||
{{--
|
||||
Redaktionelle Karten. Varianten: standard (Raster), compact (Liste), featured (erste Karte hervorgehoben).
|
||||
Die ganze Karte ist über den Titellink klickbar (gestreckter Link); Bilder sind dekorativ.
|
||||
--}}
|
||||
@php
|
||||
$variant = in_array($variant, ['standard', 'compact', 'featured'], true) ? $variant : 'standard';
|
||||
@endphp
|
||||
@if ($items !== [])
|
||||
<ul class="cards cards-{{ $variant === 'compact' ? 'compact' : 'grid' }}">
|
||||
<ul class="cards cards-{{ $variant === 'standard' ? 'grid' : $variant }}">
|
||||
@foreach ($items as $item)
|
||||
<li class="card @if ($item['imageUrl']) card-with-image @endif">
|
||||
@if ($item['url'])
|
||||
<a href="{{ $item['url'] }}">
|
||||
@if ($item['imageUrl'])
|
||||
<img class="card-image" src="{{ $item['imageUrl'] }}" alt="" loading="lazy">
|
||||
<li @class([
|
||||
'card',
|
||||
'card-with-image' => $item['imageUrl'],
|
||||
'card-linked' => $item['url'],
|
||||
'card-lead' => $variant === 'featured' && $loop->first,
|
||||
])>
|
||||
@if ($item['imageUrl'])
|
||||
<div class="card-media">
|
||||
<img class="card-image" src="{{ $item['imageUrl'] }}" alt="" loading="lazy" decoding="async">
|
||||
</div>
|
||||
@endif
|
||||
<div class="card-body">
|
||||
<h3 class="card-title">
|
||||
@if ($item['url'])
|
||||
<a href="{{ $item['url'] }}">{{ $item['title'] }}</a>
|
||||
@else
|
||||
{{ $item['title'] }}
|
||||
@endif
|
||||
<h3>{{ $item['title'] }}</h3>
|
||||
@if (filled($item['text']))
|
||||
<p>{{ $item['text'] }}</p>
|
||||
@endif
|
||||
</a>
|
||||
@else
|
||||
@if ($item['imageUrl'])
|
||||
<img class="card-image" src="{{ $item['imageUrl'] }}" alt="" loading="lazy">
|
||||
@endif
|
||||
<h3>{{ $item['title'] }}</h3>
|
||||
</h3>
|
||||
@if (filled($item['text']))
|
||||
<p>{{ $item['text'] }}</p>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{{--
|
||||
Programm- und Modulkarten. Titel, Kurzbeschreibung, Art und Ziel kommen zur Laufzeit aus den maßgeblichen
|
||||
Fachdaten (PublicCatalogReader); nichts davon wird im CMS gespeichert. Statt Bildern trägt eine Markentafel die Art.
|
||||
Darstellung nach Slotbreite: schmal gestapelt, breit mit Tafel neben dem Text (siehe widgets.css).
|
||||
--}}
|
||||
@if ($entries !== [] || $context->preview)
|
||||
<div class="catalog-cards catalog-cards-{{ $variant === 'compact' ? 'compact' : 'standard' }}">
|
||||
<div class="catalog-cards catalog-cards-{{ $variant === 'compact' ? 'compact' : 'standard' }}" data-count="{{ count($entries) }}">
|
||||
@if (filled($data['heading'] ?? null))
|
||||
<h2>{{ $data['heading'] }}</h2>
|
||||
@endif
|
||||
@@ -11,9 +16,12 @@
|
||||
@else
|
||||
<ul class="catalog-list">
|
||||
@foreach ($entries as $entry)
|
||||
<li class="catalog-card @unless ($entry->public) catalog-card-internal @endunless">
|
||||
<li @class(['catalog-card', 'catalog-card-linked' => $entry->url, 'catalog-card-internal' => ! $entry->public])>
|
||||
@if ($variant !== 'compact')
|
||||
<div class="catalog-card-visual" aria-hidden="true"><span>{{ $entry->kindLabel }}</span></div>
|
||||
<div class="catalog-card-visual" aria-hidden="true">
|
||||
<span>{{ $entry->kindLabel }}</span>
|
||||
<x-brand.rays class="catalog-card-rays" />
|
||||
</div>
|
||||
@endif
|
||||
<div class="catalog-card-body">
|
||||
<p class="catalog-card-kind">{{ $entry->kindLabel }}</p>
|
||||
|
||||
@@ -1,18 +1,52 @@
|
||||
<div class="hero hero-{{ $variant === 'highlight' ? 'highlight' : 'standard' }} @if ($imageUrl) hero-with-image @endif">
|
||||
<div class="hero-copy">
|
||||
@if (! empty($first))
|
||||
<h1>{{ $data['heading'] ?? '' }}</h1>
|
||||
@else
|
||||
<h2>{{ $data['heading'] ?? '' }}</h2>
|
||||
@endif
|
||||
@if (filled($data['text'] ?? null))
|
||||
<p class="lede">{{ $data['text'] }}</p>
|
||||
@endif
|
||||
@if ($action)
|
||||
<a class="button" href="{{ $action['url'] }}">{{ $action['label'] }}</a>
|
||||
@endif
|
||||
{{--
|
||||
Einstieg (Hero). Varianten:
|
||||
- standard: Text neben dem Bild (ältere Instanzen unverändert gültig)
|
||||
- highlight: dunkle Markenfläche
|
||||
- stage: Markenbühne, Bild über die volle Breite, Text auf heller Tafel (randlos, wenn allein im Abschnitt)
|
||||
- editorial: textbetonter Einstieg, Bild optional als breites Band darunter
|
||||
Das Bild des ersten Widgets wird sofort geladen (größtes Element), alle anderen verzögert.
|
||||
--}}
|
||||
@php
|
||||
$variant = in_array($variant, ['standard', 'highlight', 'stage', 'editorial'], true) ? $variant : 'standard';
|
||||
$headingTag = ! empty($first) ? 'h1' : 'h2';
|
||||
$loading = ! empty($first) ? 'loading="eager" fetchpriority="high"' : 'loading="lazy"';
|
||||
@endphp
|
||||
<div @class([
|
||||
'hero',
|
||||
'hero-'.$variant,
|
||||
'hero-with-image' => $imageUrl,
|
||||
'hero-text-left' => $variant === 'stage' && $textSide === 'left',
|
||||
]) style="--hero-focus: {{ $focus }}">
|
||||
@if ($imageUrl && $variant === 'stage')
|
||||
<div class="hero-media">
|
||||
<img class="hero-image" src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" {!! $loading !!} decoding="async">
|
||||
</div>
|
||||
@endif
|
||||
<div class="hero-frame">
|
||||
<div class="hero-copy">
|
||||
@if ($variant === 'stage' || $variant === 'highlight')
|
||||
<x-brand.rays class="hero-rays" />
|
||||
@endif
|
||||
<{{ $headingTag }}>{{ $data['heading'] ?? '' }}</{{ $headingTag }}>
|
||||
<x-brand.underline class="hero-mark" />
|
||||
@if (filled($data['text'] ?? null))
|
||||
<p class="lede">{{ $data['text'] }}</p>
|
||||
@endif
|
||||
@if ($actions !== [])
|
||||
<div class="hero-actions">
|
||||
@foreach ($actions as $index => $item)
|
||||
<a @class(['button', 'button-brand' => $index === 0, 'button-secondary' => $index > 0]) href="{{ $item['url'] }}">{{ $item['label'] }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@if ($imageUrl)
|
||||
<img class="hero-image" src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}">
|
||||
@if ($imageUrl && $variant !== 'stage')
|
||||
<figure class="hero-figure">
|
||||
<img class="hero-image" src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" {!! $loading !!} decoding="async">
|
||||
@if ($variant === 'standard')
|
||||
<x-brand.rays class="hero-rays" />
|
||||
@endif
|
||||
</figure>
|
||||
@endif
|
||||
</div>
|
||||
@@ -1,6 +1,9 @@
|
||||
<div class="image-text image-text-{{ $variant === 'image_right' ? 'right' : 'left' }} @unless ($imageUrl) image-text-no-image @endunless">
|
||||
{{-- Bild und Text. Varianten: image_left, image_right. Einstellungen: Bildformat und Bildausschnitt. --}}
|
||||
<div class="image-text image-text-{{ $variant === 'image_right' ? 'right' : 'left' }} @unless ($imageUrl) image-text-no-image @endunless image-format-{{ $format }}" style="--image-focus: {{ $focus }}">
|
||||
@if ($imageUrl)
|
||||
<img src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" loading="lazy">
|
||||
<figure class="image-text-figure">
|
||||
<img src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" @if (! empty($first)) loading="eager" fetchpriority="high" @else loading="lazy" @endif decoding="async">
|
||||
</figure>
|
||||
@endif
|
||||
<div class="image-text-copy">
|
||||
@if (filled($data['title'] ?? null))
|
||||
@@ -9,6 +12,7 @@
|
||||
@else
|
||||
<h2>{{ $data['title'] }}</h2>
|
||||
@endif
|
||||
<x-brand.underline class="image-text-mark" />
|
||||
@endif
|
||||
<div class="prose">{!! $body !!}</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Domain\Cms\NavigationItem;
|
||||
use App\Domain\Cms\Page;
|
||||
use App\Domain\Cms\PageService;
|
||||
use App\Domain\Cms\Widgets\WidgetRegistry;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* Designiteration 1: stabiler Website-Rahmen, Markenakzente und neue Widget-Varianten.
|
||||
* Alle Erweiterungen sind additiv: gespeicherte Widgets bleiben gültig und werden wie bisher dargestellt.
|
||||
*/
|
||||
class CmsDesignIterationTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
/**
|
||||
* @param list<array<string, mixed>> $content Abschnitte oder Widgets
|
||||
*/
|
||||
private function publish(string $path, array $content): string
|
||||
{
|
||||
$page = Page::query()->create(['path' => $path]);
|
||||
$service = app(PageService::class);
|
||||
$service->publish($page, $service->saveRevision($page, $content, null, null, null));
|
||||
|
||||
return $this->get($path)->assertOk()->getContent();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<array<string, mixed>|null> $slots
|
||||
* @param array<string, string> $style
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
private function section(string $layout, array $slots, array $style = []): array
|
||||
{
|
||||
return ['layout' => $layout, 'style' => $style, 'slots' => $slots];
|
||||
}
|
||||
|
||||
public function test_header_keeps_one_box_with_compact_bar_and_sets_the_menu_mode_before_painting(): void
|
||||
{
|
||||
$html = $this->publish('/rahmen', [['type' => 'heading', 'v' => 1, 'data' => ['heading' => 'Rahmen']]]);
|
||||
|
||||
$this->assertStringContainsString('data-site-header-sentinel', $html);
|
||||
$this->assertMatchesRegularExpression('#<header class="site-header" data-site-header>\s*<div class="site-header-bar">\s*<div class="site-header-inner ui-container">#', $html);
|
||||
$this->assertStringContainsString('class="brand brand-lockup"', $html);
|
||||
$this->assertStringContainsString('class="site-icon-link site-account-link" href="'.route('member.dashboard').'"', $html);
|
||||
// Menümodus wird direkt nach der Kopfzeile gesetzt, nicht erst durch das Modul-Skript.
|
||||
$this->assertMatchesRegularExpression('#</header>\s*<script>\(function \(h\) \{ if \(window\.matchMedia\(\'\(max-width: 74\.99rem\)\'\)\.matches\)#', $html);
|
||||
}
|
||||
|
||||
public function test_footer_shows_legal_links_in_the_base_row_and_a_decorative_arc(): void
|
||||
{
|
||||
$legal = Page::query()->create(['path' => '/impressum-test']);
|
||||
NavigationItem::query()->create(['label' => 'Impressum', 'page_id' => $legal->id, 'placement' => 'footer_legal', 'sort_order' => 1, 'is_visible' => true]);
|
||||
|
||||
$html = $this->publish('/fuss', [['type' => 'heading', 'v' => 1, 'data' => ['heading' => 'Fuß']]]);
|
||||
|
||||
$this->assertMatchesRegularExpression('#<div class="site-footer-base ui-container">\s*<nav aria-labelledby="fuss-footer_legal">\s*<h2 id="fuss-footer_legal" class="visually-hidden">Rechtliches</h2>#', $html);
|
||||
$this->assertStringContainsString('Impressum', $html);
|
||||
$this->assertMatchesRegularExpression('#<svg class="brand-arc site-footer-arc"[^>]*aria-hidden="true"#', $html);
|
||||
}
|
||||
|
||||
public function test_hero_stored_before_this_iteration_renders_unchanged_content(): void
|
||||
{
|
||||
$html = $this->publish('/alt', [[
|
||||
'type' => 'hero', 'v' => 1, 'variant' => 'standard',
|
||||
'data' => ['heading' => 'Stark im Alltag', 'text' => 'Einstieg', 'cta_label' => 'Mehr', 'cta_url' => '/praevention', 'alt' => 'Bild'],
|
||||
'refs' => ['image' => 'cms/alt.jpg'],
|
||||
]]);
|
||||
|
||||
$this->assertStringContainsString('class="hero hero-standard hero-with-image"', $html);
|
||||
$this->assertStringContainsString('<h1>Stark im Alltag</h1>', $html);
|
||||
$this->assertStringContainsString('<p class="lede">Einstieg</p>', $html);
|
||||
$this->assertSame(1, substr_count($html, 'class="button button-brand"'));
|
||||
$this->assertStringNotContainsString('button-secondary', $html);
|
||||
$this->assertStringContainsString('alt="Bild" loading="eager" fetchpriority="high" decoding="async"', $html);
|
||||
$this->assertStringNotContainsString('section-bleed', $html);
|
||||
}
|
||||
|
||||
public function test_brand_stage_bleeds_only_when_it_is_alone_in_its_section_and_has_an_image(): void
|
||||
{
|
||||
$stage = fn (?string $image) => [
|
||||
'type' => 'hero', 'v' => 1, 'variant' => 'stage',
|
||||
'settings' => ['focus' => 'left', 'text_side' => 'left'],
|
||||
'data' => ['heading' => 'Bühne', 'alt' => $image ? 'Motiv' : null],
|
||||
'refs' => ['image' => $image],
|
||||
];
|
||||
|
||||
$html = $this->publish('/buehne', [
|
||||
$this->section('u4', [$stage('cms/buehne.jpg')], ['width' => 'full']),
|
||||
$this->section('u2_2', [$stage('cms/buehne.jpg'), ['type' => 'prose', 'v' => 1, 'data' => ['body' => '<p>Text</p>']]]),
|
||||
$this->section('u4', [$stage(null)]),
|
||||
]);
|
||||
|
||||
$this->assertSame(1, substr_count($html, 'section-bleed'));
|
||||
$this->assertMatchesRegularExpression('#class="page-section [^"]*section-bleed"#', $html);
|
||||
$this->assertStringContainsString('class="hero hero-stage hero-with-image hero-text-left" style="--hero-focus: 0% 50%"', $html);
|
||||
$this->assertStringContainsString('<div class="hero-media">', $html);
|
||||
// Nur das erste Bild der Seite wird sofort geladen.
|
||||
$this->assertSame(1, substr_count($html, 'fetchpriority="high"'));
|
||||
}
|
||||
|
||||
public function test_hero_renders_a_second_action_and_rejects_unsafe_targets(): void
|
||||
{
|
||||
$html = $this->publish('/zwei', [[
|
||||
'type' => 'hero', 'v' => 1, 'variant' => 'editorial',
|
||||
'data' => ['heading' => 'Konzept', 'cta_label' => 'Programme', 'cta_url' => '/programme', 'cta2_label' => 'Mitgliederbereich', 'cta2_url' => '/bereich'],
|
||||
]]);
|
||||
|
||||
$this->assertStringContainsString('class="hero hero-editorial"', $html);
|
||||
$this->assertStringContainsString('<a class="button button-brand" href="/programme">Programme</a>', $html);
|
||||
$this->assertStringContainsString('<a class="button button-secondary" href="/bereich">Mitgliederbereich</a>', $html);
|
||||
|
||||
try {
|
||||
app(WidgetRegistry::class)->normalize([[
|
||||
'type' => 'hero', 'v' => 1, 'variant' => 'stage',
|
||||
'data' => ['heading' => 'X', 'cta2_label' => 'Böse', 'cta2_url' => 'javascript:alert(1)'],
|
||||
]]);
|
||||
$this->fail('Unsicheres zweites Linkziel wurde angenommen.');
|
||||
} catch (ValidationException $exception) {
|
||||
$this->assertArrayHasKey('blocks.0.data.cta2_url', $exception->errors());
|
||||
}
|
||||
}
|
||||
|
||||
public function test_image_settings_are_enumerations_only(): void
|
||||
{
|
||||
$html = $this->publish('/format', [[
|
||||
'type' => 'image_text', 'v' => 2, 'variant' => 'image_left',
|
||||
'settings' => ['format' => 'portrait', 'focus' => 'top_right'],
|
||||
'data' => ['title' => 'Hochformat', 'body' => '<p>Text</p>', 'alt' => 'Motiv'],
|
||||
'refs' => ['image' => 'cms/hoch.jpg'],
|
||||
]]);
|
||||
|
||||
$this->assertStringContainsString('class="image-text image-text-left image-format-portrait" style="--image-focus: 100% 0%"', $html);
|
||||
|
||||
try {
|
||||
app(WidgetRegistry::class)->normalize([[
|
||||
'type' => 'image_text', 'v' => 2, 'variant' => 'image_left',
|
||||
'settings' => ['format' => 'panorama; color: red'],
|
||||
'data' => ['body' => '<p>Text</p>'],
|
||||
]]);
|
||||
$this->fail('Freier Einstellungswert wurde angenommen.');
|
||||
} catch (ValidationException $exception) {
|
||||
$this->assertArrayHasKey('blocks.0.settings.format', $exception->errors());
|
||||
}
|
||||
}
|
||||
|
||||
public function test_featured_cards_lead_with_the_first_card_and_link_the_whole_card(): void
|
||||
{
|
||||
$html = $this->publish('/karten', [[
|
||||
'type' => 'cards', 'v' => 1, 'variant' => 'featured',
|
||||
'data' => ['items' => [
|
||||
['title' => 'Erste', 'text' => 'Hervorgehoben', 'url' => '/a', 'image' => 'cms/a.jpg'],
|
||||
['title' => 'Zweite', 'url' => '/b'],
|
||||
['title' => 'Dritte'],
|
||||
]],
|
||||
]]);
|
||||
|
||||
$this->assertStringContainsString('<ul class="cards cards-featured">', $html);
|
||||
$this->assertMatchesRegularExpression('#<li class="card card-with-image card-linked card-lead">#', $html);
|
||||
$this->assertSame(1, substr_count($html, 'card-lead'));
|
||||
$this->assertMatchesRegularExpression('#<h3 class="card-title">\s*<a href="/a">Erste</a>#', $html);
|
||||
$this->assertMatchesRegularExpression('#<h3 class="card-title">\s*Dritte\s*</h3>#', $html, 'Karten ohne Linkziel bleiben ohne Link.');
|
||||
}
|
||||
|
||||
public function test_unknown_variant_from_a_newer_version_falls_back_to_the_default(): void
|
||||
{
|
||||
$widget = app(WidgetRegistry::class)->upcast(['type' => 'cards', 'v' => 1, 'variant' => 'masonry', 'data' => ['items' => [['title' => 'Eins']]]]);
|
||||
|
||||
$this->assertSame('standard', $widget['variant']);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
use App\Domain\Catalog\PillarService;
|
||||
use App\Domain\Cms\NavigationItem;
|
||||
use App\Domain\Cms\Page;
|
||||
use App\Domain\Cms\PageService;
|
||||
use App\Filament\Resources\NavigationItems\Pages\ManageNavigationItems;
|
||||
use App\Filament\Resources\Pages\Pages\CreatePage;
|
||||
use App\Filament\Resources\Pages\Pages\EditPage;
|
||||
@@ -486,6 +487,44 @@ public function test_navigation_rejects_script_addresses(): void
|
||||
$this->get('/praevention')->assertDontSee('javascript:alert(1)', false);
|
||||
}
|
||||
|
||||
public function test_editor_saves_brand_stage_with_settings_and_second_action(): void
|
||||
{
|
||||
Storage::fake('media_public');
|
||||
Storage::fake('cms_incoming');
|
||||
Storage::disk('media_public')->put('cms/buehne.jpg', 'bild');
|
||||
|
||||
Livewire::actingAs($this->editor(), 'staff')
|
||||
->test(CreatePage::class)
|
||||
->fillForm([
|
||||
'path' => '/markenbuehne',
|
||||
'sections' => [
|
||||
$this->sectionState('u4', [
|
||||
['type' => 'hero', 'data' => [
|
||||
'variant' => 'stage',
|
||||
'settings' => ['focus' => 'left', 'text_side' => 'left'],
|
||||
'data' => ['heading' => 'Bühne', 'cta_label' => 'Programme', 'cta_url' => '/programme', 'cta2_label' => 'Mitgliederbereich', 'cta2_url' => '/bereich', 'alt' => 'Motiv'],
|
||||
'refs' => ['image' => 'cms/buehne.jpg'],
|
||||
]],
|
||||
], ['width' => 'full']),
|
||||
],
|
||||
])
|
||||
->call('create')
|
||||
->assertHasNoFormErrors();
|
||||
|
||||
$page = Page::query()->where('path', '/markenbuehne')->firstOrFail();
|
||||
$widget = $page->latestRevision->sections[0]['slots'][0];
|
||||
$this->assertSame('stage', $widget['variant']);
|
||||
$this->assertSame(['focus' => 'left', 'text_side' => 'left'], $widget['settings']);
|
||||
$this->assertSame('/bereich', $widget['data']['cta2_url']);
|
||||
|
||||
app(PageService::class)->publish($page, $page->latestRevision);
|
||||
$this->get('/markenbuehne')
|
||||
->assertOk()
|
||||
->assertSee('section-bleed', false)
|
||||
->assertSee('hero hero-stage hero-with-image hero-text-left', false)
|
||||
->assertSee('<a class="button button-secondary" href="/bereich">Mitgliederbereich</a>', false);
|
||||
}
|
||||
|
||||
private function editor(): User
|
||||
{
|
||||
$editor = User::factory()->redakteur()->create();
|
||||
|
||||
@@ -137,7 +137,7 @@ public function test_global_layout_has_header_navigation_mobile_menu_and_footer(
|
||||
$html = $this->get('/praevention')->assertOk()->getContent();
|
||||
|
||||
$this->assertStringContainsString('<a class="skip" href="#inhalt">', $html);
|
||||
$this->assertStringContainsString('class="brand" href="'.route('home').'" data-brand-status="vorlaeufig"', $html);
|
||||
$this->assertStringContainsString('class="brand brand-lockup" href="'.route('home').'" data-brand-status="vorlaeufig"', $html);
|
||||
$this->assertStringContainsString('aria-label="Hauptnavigation"', $html);
|
||||
$this->assertMatchesRegularExpression('#<a href="[^"]*/praevention"\s+aria-current="page"\s*>Prävention</a>#', $html);
|
||||
$this->assertStringContainsString('data-site-menu-button', $html);
|
||||
|
||||
@@ -158,7 +158,7 @@ public function test_reference_widgets_render_their_variants(): void
|
||||
->assertOk()
|
||||
->assertSee('hero hero-highlight', false)
|
||||
->assertSee('<h1>Stark im Alltag</h1>', false)
|
||||
->assertSee('class="button" href="/praevention"', false)
|
||||
->assertSee('class="button button-brand" href="/praevention"', false)
|
||||
->assertSee('image-text image-text-right', false)
|
||||
->assertSee('<h2>Bild rechts</h2>', false)
|
||||
->assertSee('<em>betont</em>', false)
|
||||
|
||||
Reference in new issue
Block a user