Files
laraundfelix/resources/views/filament/cms/styles.blade.php
T
LarsandClaude Sonnet 5.5 87de5a62d4 Füge die zentrale Farbpalette und die Hintergrundbreite für Abschnitte hinzu (ADR-67)
- DesignPalette: bis zu zehn benannte Farben (Hintergrund und Schrift) in site_settings,
  stabile Kennungen, Kontrastprüfung 4,5:1 auf dem Server, Verwendungssuche
- Seite Website → Design → Farben (Systemverwalter): Kacheln, Dialog mit Live-Vorschau,
  Kontrastwarnung mit Empfehlung, Bestätigung mit betroffenen Seiten, Entfernen gesperrt bei Verwendung
- Hintergrund „Farbe aus der Palette“ als Verweis im bestehenden Feld background; farbige Kacheln im Editor
- Renderer leitet Bedeutungswerte aus Hintergrund und Schrift ab; scope-dark bei heller Schrift
- Hintergrundbreite: volle Browserbreite (Vorgabe) oder auf Abschnittsbreite begrenzt
- Test sichert die Ausgabe aller bisherigen Varianten byte-gleich; Abnahme mit Screenshots

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-29 18:35:15 +01:00

231 lines
18 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<style>
/* Widget-Auswahl */
.luf-widget-pick { display: flex; gap: .75rem; align-items: flex-start; text-align: start; white-space: normal; }
.luf-widget-pick-schematic { flex: none; border: 1px solid rgb(0 0 0 / 12%); border-radius: 3px; }
.luf-widget-pick-text { display: flex; flex-direction: column; gap: .15rem; }
.luf-widget-pick-name { font-weight: 600; }
.luf-widget-pick-desc { font-size: .8rem; line-height: 1.3; opacity: .8; }
.luf-widget-pick-units { font-size: .75rem; line-height: 1.3; opacity: .7; font-style: italic; }
/* Widget-Vorschau: kompakt, ohne eigene Bildlaufleiste; lange Inhalte werden gekürzt angezeigt. */
.luf-widget-preview { position: relative; }
.luf-widget-preview-frame { display: block; width: 100%; min-height: 3rem; max-height: 28rem; border: 0; overflow: hidden; pointer-events: none; background: #fff; }
.luf-widget-preview.is-clipped::after {
content: 'Vorschau gekürzt – vollständig in der Seitenvorschau';
position: absolute; inset: auto 0 0 0; padding: 2.5rem .75rem .5rem;
font-size: .75rem; font-weight: 600; text-align: center; color: #15243a;
background: linear-gradient(to bottom, rgb(255 255 255 / 0), rgb(255 255 255 / .96) 55%);
}
.luf-widget-preview-empty { margin: 0; padding: 1rem; font-size: .875rem; opacity: .75; }
/* Live-Vorschau im Bearbeitungsdialog: feste logische Breite, auf die Dialogbreite verkleinert. */
.luf-live-preview { border: 1px solid rgb(0 0 0 / 10%); border-radius: .75rem; padding: .75rem; background: rgb(247 246 242 / 60%); }
.luf-live-preview-caption { margin: 0 0 .5rem; font-size: .75rem; opacity: .75; }
.luf-live-preview-stage { position: relative; overflow: hidden; background: #fff; border-radius: .5rem; }
.luf-live-preview-frame { display: block; border: 0; pointer-events: none; background: #fff; transform-origin: 0 0; }
.luf-preview-width .fi-btn-group { flex-wrap: wrap; }
/* Seitenaufbau (CMS-Abschluss): Abschnitt als Hauptgruppe, Plätze über Lage und Breite, Bausteine mit kurzem
Namen und Miniaturvorschau. Mehrere Abschnitte bleiben auf einem Desktopbildschirm überblickbar. */
.luf-sections > .fi-fo-repeater-items { gap: .5rem; }
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item { border-left: 4px solid rgb(3 37 81 / 70%); }
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-header { padding: .1rem .6rem; min-height: 0; }
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-content { padding: .25rem .5rem .5rem; }
.luf-sections .fi-fo-repeater-item-header-label { font-weight: 600; white-space: normal; }
.luf-abschnitt { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .65rem; }
/* Schmale Fenster: Name und Zusammenfassung des Abschnitts stehen in der ersten Zeile, die Aktionen darunter. */
@media (max-width: 40rem) {
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-header { flex-wrap: wrap; row-gap: .1rem; }
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-header > .fi-fo-repeater-item-header-label { order: -1; flex: 1 1 100%; }
}
.luf-abschnitt-nr { font-weight: 700; }
.luf-abschnitt-meta { font-size: .8rem; font-weight: 500; color: #3e4c5c; }
.luf-abschnitt-nummer { font-size: .8rem; font-weight: 500; color: #3e4c5c; }
.luf-abschnitt-marke { font-size: .78rem; font-weight: 600; color: #032551; background: #e6edf7; border-radius: .35rem; padding: .05rem .4rem; }
.luf-abschnitt-aus { font-size: .78rem; font-weight: 700; color: #5a3b00; background: #fdeec4; border: 1px solid #c98a00; border-radius: .35rem; padding: .05rem .4rem; }
/* Ausgeblendeter Abschnitt: gestrichelte Kante und zurückgenommener Inhalt, der Kopf bleibt gut lesbar. */
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item:has(.luf-abschnitt.is-ausgeblendet) { border-left-style: dashed; border-left-color: #c98a00; }
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item:has(.luf-abschnitt.is-ausgeblendet) > .fi-fo-repeater-item-content { opacity: .72; }
/* Meldung am Abschnitt, wenn Name oder Sprungmarke beim Speichern abgewiesen wurden (Eingabe im Einstellungsdialog). */
.luf-abschnitt-fehler { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .75rem; margin-bottom: .35rem; padding: .35rem .6rem; border: 1px solid var(--vw-error); border-radius: var(--vw-radius-small); background: var(--vw-error-soft); color: var(--vw-error); font-size: var(--vw-small); }
.luf-abschnitt-fehler-aktion { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.luf-sections .fi-fo-repeater-item-header [data-luf-einstellungen] { flex: none; }
/* Verdeckte Felder und leere Meldungen belegen keine Zeile im Abschnitt (sonst addiert sich der Zeilenabstand). */
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-content > .fi-sc { gap: .4rem; }
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-content > .fi-sc > .fi-sc-component:has(> input[type='hidden']),
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-content > .fi-sc > .fi-sc-component:not(:has(*)) { display: none; }
.luf-link-pfad { font-family: ui-monospace, monospace; font-size: .85em; overflow-wrap: anywhere; }
/* Hintergrund des Abschnitts als farbige Kacheln (ADR-67). Die Fläche selbst zeigt Farbe und Schriftfarbe; die Auswahl
erkennt man am Rahmen und am Haken, nicht nur an der Farbe. */
.luf-flaechen { min-width: 0; margin: 0; padding: 0; border: 0; }
.luf-flaechen-legende { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.luf-flaechen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr)); gap: .5rem; }
.luf-flaeche { position: relative; display: grid; grid-template-rows: auto auto auto; align-content: start; gap: .2rem; padding: .3rem; border: 2px solid transparent; border-radius: .6rem; cursor: pointer; background: transparent; }
.luf-flaeche:hover { background: rgb(0 0 0 / 4%); }
.luf-flaeche-eingabe { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.luf-flaeche:has(.luf-flaeche-eingabe:focus-visible) { outline: 3px solid #1769aa; outline-offset: 2px; }
.luf-flaeche.is-gewaehlt { border-color: #1769aa; background: #eef5fb; }
.luf-flaeche-probe { position: relative; display: grid; place-items: center; height: 3.4rem; border-radius: .4rem; border: 1px solid rgb(3 37 81 / 28%); overflow: hidden; }
.luf-flaeche.is-bild .luf-flaeche-probe { background: repeating-linear-gradient(135deg, #e8eef5 0 .5rem, #f5f8fb .5rem 1rem); color: #3e4c5c; }
.luf-flaeche-aa { font-size: 1.35rem; font-weight: 750; line-height: 1; }
.luf-flaeche-haken { position: absolute; top: .25rem; right: .25rem; display: none; padding: .15rem; width: 1.3rem; height: 1.3rem; border-radius: 999px; background: #1769aa; color: #fff; }
.luf-flaeche.is-gewaehlt .luf-flaeche-haken { display: block; }
.luf-flaeche-name { font-size: .8rem; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }
.luf-flaeche-art { font-size: .7rem; line-height: 1.2; color: #3e4c5c; }
.luf-flaechen-hilfe { margin: .5rem 0 0; font-size: .8rem; color: #3e4c5c; }
.luf-flaechen-hilfe a { text-decoration: underline; }
/* Rasterauswahl als grafische Kacheln */
.luf-layout-picker .fi-btn-group { flex-wrap: wrap; gap: .5rem; }
.luf-layout-picker .fi-btn { min-height: 3.25rem; padding: .35rem .6rem; border-radius: .5rem !important; }
.luf-layout-option { display: inline-flex; align-items: center; gap: .5rem; }
.luf-layout-schematic { fill: currentColor; opacity: .55; }
.luf-layout-picker .fi-btn[aria-pressed='true'] .luf-layout-schematic,
.luf-layout-picker input:checked + label .luf-layout-schematic { opacity: 1; }
.luf-layout-option-text { font-variant-numeric: tabular-nums; font-weight: 600; }
/* Plätze im Verhältnis des Desktop-Rasters; auf schmalen Bildschirmen untereinander. Ein Platz hat keinen eigenen
Kopf: links der Griff zum Verschieben des Bausteins, daneben der Baustein. */
.luf-slots > .fi-fo-repeater-items { display: grid; gap: .35rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) {
.luf-slots > .fi-fo-repeater-items { grid-template-columns: var(--luf-slot-cols, minmax(0, 1fr)); }
}
/* Ein Platz ist eine leise Fläche statt eines gestrichelten Rahmens; nur ein leerer Platz bleibt gestrichelt. */
.luf-slots .fi-fo-repeater-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; background: var(--vw-paper); border: 0; border-radius: var(--vw-radius-small); box-shadow: none; }
.luf-slots .fi-fo-repeater-item:not(:has(.fi-fo-builder-item)) { background: transparent; box-shadow: inset 0 0 0 1px var(--vw-line-strong); }
.luf-slots .fi-fo-repeater-item-header { padding: .2rem 0 .2rem .1rem; border: 0; background: transparent; min-height: 0; }
.luf-slots .fi-fo-repeater-item:has(.luf-platz-warnung) { grid-template-columns: minmax(0, 1fr); }
.luf-platz-warnung { display: block; padding: .25rem .5rem; border-radius: .35rem; background: #fff6dc; color: #9a5b00; font-size: .8rem; font-weight: 600; }
.luf-slots .fi-fo-repeater-item-content { padding: .2rem .35rem .3rem .15rem; border: 0; min-width: 0; }
.luf-slots .fi-fo-builder-item { border: 0; box-shadow: none; background: transparent; }
.luf-slots .fi-fo-builder-item-header { padding: 0 0 .15rem; gap: .15rem .35rem; flex-wrap: wrap; min-height: 0; }
.luf-slots .fi-fo-builder-item-header .fi-btn { min-height: 1.9rem; padding-block: .15rem; }
.luf-slots .fi-fo-builder-item-content { padding: 0; border: 0; }
.luf-slots .fi-fo-builder-add-action-ctn,
.luf-slots .fi-fo-builder .fi-fo-builder-add-btn-ctn { justify-content: center; }
.luf-baustein { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; min-width: 0; line-height: 1.3; }
.luf-baustein-name { font-size: .85rem; font-weight: 650; }
.luf-baustein-kurz { flex: 1 1 8rem; min-width: 0; overflow: hidden; font-size: .75rem; font-weight: 400; color: #3e4c5c; text-overflow: ellipsis; white-space: nowrap; }
.luf-sections .fi-fo-builder-item-header-label { flex: 1 1 7rem; min-width: 0; overflow: hidden; }
.luf-sections .fi-fo-builder-item-header-end-actions, .luf-sections .fi-fo-builder-item-header > :last-child { flex: none; }
/* Miniaturvorschau: Desktopbreite, verkleinert, Höhe begrenzt. */
.luf-mini { --luf-mini-hoehe: 96; position: relative; height: 3rem; overflow: hidden; border-radius: .35rem; background: #fff; box-shadow: inset 0 0 0 1px rgb(3 37 81 / 8%); }
.luf-mini-frame { position: absolute; top: 0; left: 0; border: 0; pointer-events: none; background: #fff; transform-origin: 0 0; }
.luf-mini.is-clipped::after { content: ''; position: absolute; inset: auto 0 0 0; height: 1.75rem; background: linear-gradient(to bottom, rgb(255 255 255 / 0), rgb(255 255 255 / .95)); }
/* Aktionen gut sichtbar und mit ausreichender Trefferfläche */
.luf-sections .fi-fo-repeater-item-header .fi-icon-btn,
.luf-sections .fi-fo-builder-item-header .fi-icon-btn { min-width: 2.25rem; min-height: 2.25rem; opacity: 1; }
/* Medienpicker (Bilder aus dem Medienmanager): Vorschaubild, Titel und Website-Status in der Auswahl. */
.luf-media-option { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.luf-media-option img, .luf-media-option-empty { flex: none; width: 4.5rem; height: 2.75rem; object-fit: cover; border-radius: .375rem; background: #eef1ee; }
.luf-media-option-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.luf-media-option-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.luf-media-badge { align-self: flex-start; padding: 0 .45rem; border-radius: 999px; font-size: .72rem; line-height: 1.35rem; }
.luf-media-badge-ok { background: #e3f0d8; color: #2d5c07; }
.luf-media-badge-warn { background: #fff1c7; color: #6b4b00; }
.luf-media-badge-wait { background: #e5eef8; color: #18456f; }
.luf-media-badge-quiet { background: #eceff1; color: #3e4c5c; }
/* Medien- und Materialkarte: Bild aus dem Film übernehmen. */
.luf-filmbild { display: flex; flex-direction: column; gap: .75rem; padding: .75rem; border: 1px solid #d5ddd6; border-radius: .5rem; }
.luf-filmbild-lead { margin: 0; font-size: .875rem; }
.luf-filmbild-frame { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.luf-filmbild-label { display: flex; flex-direction: column; gap: .25rem; font-size: .875rem; }
.luf-filmbild-second { width: 8rem; padding: .35rem .5rem; border: 1px solid #b9c4bd; border-radius: .375rem; }
.luf-filmbild-regler { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.luf-filmbild-regler input[type=range] { flex: 1 1 14rem; min-width: 10rem; }
.luf-filmbild-bild { width: 100%; max-width: 28rem; height: auto; border-radius: .375rem; background: #eef1ee; }
.luf-filmbild-aktuell { display: flex; gap: .75rem; align-items: flex-start; padding-top: .5rem; border-top: 1px solid #e3e8e4; }
.luf-filmbild-aktuell img { width: 9rem; height: auto; border-radius: .375rem; background: #eef1ee; }
.luf-filmbild-preview { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; width: 100%; }
.luf-filmbild-preview img { width: 100%; max-width: 28rem; height: auto; border-radius: .375rem; background: #eef1ee; }
.luf-media-status { display: flex; gap: 1rem; align-items: flex-start; padding: .75rem; border: 1px solid #d5ddd6; border-radius: .5rem; }
.luf-media-status img { width: 10rem; height: auto; border-radius: .375rem; }
.luf-media-status strong { display: block; }
.luf-media-status p { margin: .25rem 0 .4rem; font-size: .875rem; }
.luf-media-status a { font-size: .875rem; text-decoration: underline; }
.luf-media-status-unreleased, .luf-media-status-missing { border-color: #e7c35a; background: #fffaeb; }
.luf-media-status-pending { border-color: #9cbbe0; background: #f3f8fd; }
</style>
<script>
// Miniaturvorschau im Seitenaufbau: Breite = Anteil des Platzes an 1200 px Desktopbreite; verkleinert auf den
// Platz, bei hohen Bausteinen weiter bis höchstens zur Hälfte, damit Einstiege erkennbar bleiben. Höhe begrenzt.
window.lufMiniPreview = window.lufMiniPreview || function (frame) {
const stage = frame.parentElement;
const fit = () => {
const doc = frame.contentDocument;
if (!doc || !doc.documentElement || !stage || !stage.clientWidth) return;
const reihe = stage.closest('.luf-slots > .fi-fo-repeater-items');
const reiheBreite = reihe ? reihe.clientWidth : stage.clientWidth;
const breite = Math.max(320, Math.round(1200 * stage.clientWidth / Math.max(reiheBreite, 1)));
frame.style.width = breite + 'px';
const hoehe = doc.documentElement.scrollHeight;
frame.style.height = hoehe + 'px';
const max = parseFloat(getComputedStyle(stage).getPropertyValue('--luf-mini-hoehe')) || 150;
const voll = stage.clientWidth / breite;
const faktor = Math.max(voll * 0.5, Math.min(voll, max / Math.max(hoehe, 1)));
frame.style.transform = 'scale(' + faktor + ')';
const sichtbar = Math.ceil(hoehe * faktor);
stage.style.height = Math.min(sichtbar, max) + 'px';
stage.classList.toggle('is-clipped', sichtbar > max + 4);
};
fit();
try {
const doc = frame.contentDocument;
doc.fonts?.ready.then(fit);
doc.querySelectorAll('img').forEach((img) => img.complete || img.addEventListener('load', fit, { once: true }));
if (window.ResizeObserver) {
new ResizeObserver(fit).observe(doc.body);
new ResizeObserver(() => requestAnimationFrame(fit)).observe(stage.parentElement || stage);
}
} catch (error) {}
};
// Vorschau-Iframes an ihren Inhalt anpassen (nach Bildern und Schriften erneut), Höhe begrenzen.
// Live-Vorschau im Dialog: Inhalt in logischer Breite rendern, dann auf die verfügbare Breite skalieren.
window.lufLivePreview = window.lufLivePreview || function (frame) {
const stage = frame.parentElement;
const width = Number(frame.dataset.width) || 1200;
const fit = () => {
const doc = frame.contentDocument;
if (!doc || !doc.documentElement || !stage) return;
const scale = Math.min(1, stage.clientWidth / width);
frame.style.width = width + 'px';
const height = doc.documentElement.scrollHeight;
frame.style.height = height + 'px';
frame.style.transform = 'scale(' + scale + ')';
stage.style.height = Math.ceil(height * scale) + 'px';
};
fit();
try {
const doc = frame.contentDocument;
doc.fonts?.ready.then(fit);
doc.querySelectorAll('img').forEach((img) => img.complete || img.addEventListener('load', fit, { once: true }));
if (window.ResizeObserver) {
new ResizeObserver(fit).observe(doc.body);
new ResizeObserver(fit).observe(stage);
}
} catch (error) {}
};
window.lufFitPreview = window.lufFitPreview || function (frame) {
const max = 448;
const fit = () => {
const doc = frame.contentDocument;
if (!doc || !doc.documentElement) return;
const height = doc.documentElement.scrollHeight;
frame.style.height = Math.min(height, max) + 'px';
frame.parentElement?.classList.toggle('is-clipped', height > max + 4);
};
fit();
try {
const doc = frame.contentDocument;
doc.fonts?.ready.then(fit);
doc.querySelectorAll('img').forEach((img) => img.complete || img.addEventListener('load', fit, { once: true }));
if (window.ResizeObserver) new ResizeObserver(fit).observe(doc.body);
} catch (error) {}
};
</script>