From 96be810cc9d94f0784ca44ba471e6110ff342d67 Mon Sep 17 00:00:00 2001 From: Maaxxs <61059039+MaaxxsDev@users.noreply.github.com> Date: Thu, 9 Jul 2026 04:19:50 +0200 Subject: [PATCH] Collapse long feature lists behind a per-card "+X weitere Leistungen" toggle Cards show the first 5 bullet points; anything beyond that sits behind an accent-colored toggle whose count itself signals package depth (pricier packages carry longer lists). Expanding affects only the clicked card - the row aligns items-start instead of stretching every neighbor to the tallest card. The darkening gradient behind the list holds its opacity almost to the bottom edge so the toggle and deep list entries stay readable over the bright road glow, and the expanded state uses a denser scrim for the same reason. Co-Authored-By: Claude Fable 5 --- hifi-src/src/i18n/de.js | 2 + hifi-src/src/i18n/en.js | 2 + hifi-src/src/pages/public/ModelPage.jsx | 318 ++++++++++++++---------- 3 files changed, 184 insertions(+), 138 deletions(-) diff --git a/hifi-src/src/i18n/de.js b/hifi-src/src/i18n/de.js index d40ed8a..83fe8ed 100644 --- a/hifi-src/src/i18n/de.js +++ b/hifi-src/src/i18n/de.js @@ -155,6 +155,8 @@ export default { productLoading: 'Produkt wird geladen…', requestContact: 'Kontakt anfragen', featuredBadge: 'Empfohlen', + moreBullets: (n) => (n === 1 ? '+ 1 weitere Leistung' : `+ ${n} weitere Leistungen`), + lessBullets: 'Weniger anzeigen', }, leistungen: { metaTitle: 'Leistungen', diff --git a/hifi-src/src/i18n/en.js b/hifi-src/src/i18n/en.js index 1af9c9c..4a7e732 100644 --- a/hifi-src/src/i18n/en.js +++ b/hifi-src/src/i18n/en.js @@ -155,6 +155,8 @@ export default { productLoading: 'Loading product…', requestContact: 'Request contact', featuredBadge: 'Recommended', + moreBullets: (n) => (n === 1 ? '+ 1 more feature' : `+ ${n} more features`), + lessBullets: 'Show less', }, leistungen: { metaTitle: 'Services', diff --git a/hifi-src/src/pages/public/ModelPage.jsx b/hifi-src/src/pages/public/ModelPage.jsx index 09fbb13..78b2fa9 100644 --- a/hifi-src/src/pages/public/ModelPage.jsx +++ b/hifi-src/src/pages/public/ModelPage.jsx @@ -85,6 +85,172 @@ const PRICE_COLOR = '#f2f2f2'; const LABEL_COLOR = '#8a8a8a'; const BULLET_COLOR = '#c4c4c4'; +// Mehr sichtbare Stichpunkte wuerden das Straßenbild verdraengen - gerade bei den teuren +// Paketen (die laut Kunde die laengsten Listen haben) soll die Kachel ruhig bleiben. Der +// Rest steckt hinter einem "+X weitere Leistungen"-Toggle, dessen Zaehler selbst als +// Wertigkeitssignal wirkt. +const VISIBLE_BULLETS = 5; + +function PackageCard({ pkg, tier, tierT, isStripLayout, bullets, formatPrice, contactUrl, t }) { + const [expanded, setExpanded] = useState(false); + const hiddenCount = bullets.length - VISIBLE_BULLETS; + const shownBullets = expanded ? bullets : bullets.slice(0, VISIBLE_BULLETS); + + // Fuer die Themes ohne eigenes Straßenbild: neutrales Glow-Motiv, per Maske + // in die Akzentfarbe eingefaerbt (zwei Ebenen: weicher Halo + scharfe Kontur). + const glowMask = tier.img + ? null + : { + backgroundColor: tier.accent, + WebkitMaskImage: `url(${roadGlowTexture})`, + maskImage: `url(${roadGlowTexture})`, + maskMode: 'luminance', + WebkitMaskSize: 'cover', + maskSize: 'cover', + WebkitMaskPosition: 'center', + maskPosition: 'center', + WebkitMaskRepeat: 'no-repeat', + maskRepeat: 'no-repeat', + }; + + return ( +
+ {/* Vollflaechiges Straßen-Glow-Bild der Preisstufe (Referenzdesign). */} + {tier.img ? ( + + ) : ( + <> +