Files
laraundfelix/resources/views/filament/cms/styles.blade.php
T
LarsandClaude Opus 5.5 5548106c31 Verdichte Seitenaufbau und Abschnittsgestaltung im CMS
- Seitenaufbau: Bausteine als Miniaturvorschau in Desktop-Proportion (verkleinert,
  Höhe begrenzt); Abschnittskopf „Abschnitt N“ mit knapper Angabe zu Raster und
  abweichender Gestaltung, vollständig im Titel; Plätze ohne eigenen Kopf, nur
  über Lage und Breite; Aktionen benennen Abschnitt oder Baustein.
- Seitenkopf kompakter; Erläuterungen als aufrufbare Hilfe; kein Rahmen
  „Inhalt der Seite“, keine leeren Abstände ausgeblendeter Teile.
- „Abschnitt gestalten“: knappe Leiste mit „Zum Seitenaufbau“ und Hilfe, keine
  wiederholte Zusammenfassung; Einstellungen in Raster und Breite, Hintergrund,
  Abstände und Trenner; Erklärungen als Hinweis. Rückkehr an den Abschnitt.
- Tests: Gruppen speichern gemeinsam; Texte bewusst angepasst.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 16:37:14 +01:00

176 lines
12 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: .75rem; }
.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: .25rem .75rem; min-height: 0; }
.luf-sections > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-content { padding: .4rem .6rem .6rem; }
.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; }
.luf-abschnitt-nr { font-weight: 700; }
.luf-abschnitt-meta { font-size: .8rem; font-weight: 500; color: #3e4c5c; }
/* 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: .5rem; 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)); }
}
.luf-slots .fi-fo-repeater-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; background: transparent; border: 1px dashed rgb(3 37 81 / 18%); box-shadow: none; }
.luf-slots .fi-fo-repeater-item-header { padding: .3rem 0 .3rem .15rem; 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: .3rem .4rem .4rem .25rem; 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 .25rem; gap: .25rem .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; }
.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; }
.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>