From 7a3ae0ea5380b25098ab13499fad5c6e0af08f11 Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 19 Jul 2026 19:57:28 +0000 Subject: [PATCH] Add /widerruf and /agb legal pages, fix newsletter modal scroll jank - New /widerruf page: CMS-driven content via getLegalPage("widerruf"), sidebar TOC + "Nachhaltig handeln" callout, TrustRow, and a download card for the Muster-Widerrufsformular PDF attachment. - New /agb page, same legal-page shell pattern as Impressum/Datenschutz. - lib/payload.ts: getLegalPage now also resolves the optional `attachment` media relation (depth=1) for legal pages that have a downloadable file. - NewsletterModal: replaced the body overflow/position scroll-lock hacks (which fought with the sticky Navbar and the global scroll-smooth CSS) with a wheel/touch event interceptor that never touches scroll position at all, plus `preventScroll: true` on all modal/drawer focus() calls to stop the browser's implicit scrollIntoView from nudging the page for elements near the sticky navbar's reserved scroll-padding-top zone. Same preventScroll fix applied to VersandModal and the Navbar mobile drawer for consistency. - globals.css: scrollbar-gutter: stable, so a modal's overflow:hidden lock never causes a scrollbar-width layout shift. - Divider: stagger its reveal animation slightly (delay 0.3s) behind the section above it. Co-Authored-By: Claude Sonnet 5 --- app/agb/page.tsx | 74 ++++++++++++++++++ app/components/Divider.tsx | 5 +- app/components/Footer.tsx | 9 ++- app/components/Navbar.tsx | 10 +-- app/components/NewsletterModal.tsx | 50 ++++++++++-- app/components/VersandModal.tsx | 6 +- app/globals.css | 6 ++ app/lib/payload.ts | 13 +++- app/widerruf/page.tsx | 117 +++++++++++++++++++++++++++++ 9 files changed, 270 insertions(+), 20 deletions(-) create mode 100644 app/agb/page.tsx create mode 100644 app/widerruf/page.tsx diff --git a/app/agb/page.tsx b/app/agb/page.tsx new file mode 100644 index 0000000..ce3602f --- /dev/null +++ b/app/agb/page.tsx @@ -0,0 +1,74 @@ +import type { Metadata } from "next"; +import Link from "next/link"; +import { Reveal } from "../components/Reveal"; +import { Footer } from "../components/Footer"; +import { TrustRow } from "../components/TrustRow"; +import { RichText, extractHeadings } from "../components/RichText"; +import { SectionTOC } from "../components/SectionTOC"; +import { getLegalPage } from "../lib/payload"; + +export const metadata: Metadata = { + title: "AGB", + description: "Allgemeine Geschäftsbedingungen von einfach produktiv.", + alternates: { canonical: "/agb" }, +}; + +export default async function AgbPage() { + const page = await getLegalPage("agb"); + const headings = page ? extractHeadings(page.content) : []; + + return ( + <> +
+ +

+ Startseite + + AGB +

+

+ Allgemeine Geschäftsbedingungen +

+

Stand: Juli 2026

+
+ +
+
+ + + {/* Static, not part of the CMS content — same reasoning as + the Impressum/Datenschutz pages' own callout cards. */} +
+ +

+ Unser Anspruch +

+

+ Wir entwickeln Produkte, die dich im Alltag wirklich weiterbringen – mit Klarheit, + Qualität und einem bewussten Umgang mit Ressourcen. +

+
+
+
+ +
+ {page ? ( + + ) : ( +

Inhalte werden gerade aktualisiert.

+ )} +
+
+ + +
+