From b2e17d96c214217f48cf88c77a6c8ccab47b2e0c Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Oct 2026 10:43:16 +0000 Subject: [PATCH] Hintergrundbilder nur im Dark Mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit problem_blitz.jpg, loesung.jpg und backgroud_effect.webp sind dunkle Bilder mit 30 % Deckkraft und wurden im hellen Modus zu harten grauen Quadraten. Die Bild-Ebenen sind jetzt "hidden dark:block"; der dunkle Modus bleibt unverändert. Co-Authored-By: Claude Sonnet 5.5 --- src/components/ProblemSection.tsx | 4 ++-- src/components/SolutionSection.tsx | 4 ++-- src/components/Values.tsx | 4 ++-- src/test/sofort-paket.test.tsx | 15 +++++++++++++++ 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/components/ProblemSection.tsx b/src/components/ProblemSection.tsx index cbde41e..c40c82c 100644 --- a/src/components/ProblemSection.tsx +++ b/src/components/ProblemSection.tsx @@ -58,9 +58,9 @@ const ProblemSection = () => { )} - {/* Hintergrundbild: nur Blitze rechts, auf Handy maximale Breite */} + {/* Hintergrundbild: nur Blitze rechts, auf Handy maximale Breite; nur im Dark Mode (dunkles Bild wäre im hellen ein graues Quadrat) */}
{
)} - {/* Hintergrundbild mittig, auf Handy maximale Breite */} + {/* Hintergrundbild mittig, auf Handy maximale Breite; nur im Dark Mode (dunkles Bild wäre im hellen ein graues Quadrat) */}
{
- {/* Hintergrundbild: auf Handy maximale Breite */} + {/* Hintergrundbild: auf Handy maximale Breite; nur im Dark Mode (dunkles Bild wäre im hellen ein graues Quadrat) */}
{ expect(lies("src/index.css")).toMatch(/section\[id\]\s*\{[^}]*scroll-margin-top:\s*6rem/); }); }); + +describe("A2 Hintergrundbilder nur im dunklen Modus", () => { + const BILDER: { name: string; ui: React.ReactElement; datei: string }[] = [ + { name: "ProblemSection", ui: , datei: "problem_blitz.jpg" }, + { name: "SolutionSection", ui: , datei: "loesung.jpg" }, + { name: "Values", ui: , datei: "backgroud_effect.webp" }, + ]; + + it.each(BILDER)("$name: $datei ist im hellen Modus ausgeblendet und im dunklen sichtbar", ({ ui, datei }) => { + const { container } = zeige(ui); + const bild = container.querySelector(`[style*="${datei}"]`); + expect(bild).not.toBeNull(); + expect(bild).toHaveClass("hidden", "dark:block"); + }); +});