diff --git a/README.md b/README.md index a71e699..4842263 100644 --- a/README.md +++ b/README.md @@ -1854,6 +1854,26 @@ has its own dedicated Live Preview renderer, not the shared generic order-status one — there's no order for this email type, so no fake "Bestellnummer" line; CTA is "Zum Produkt", not "Bestellung ansehen". +## Product image gallery + +`ProductGallery.tsx` — main image + thumbnail strip, swappable on click, +backed by an optional `Products.gallery` field (backend, `hasMany` upload, +empty for most products — see the Payload README). Renders as a single +plain image with no thumbnail row at all when `gallery` is empty, i.e. the +same appearance every product already had before this existed — a product +only gets the gallery UI once someone deliberately adds extra photos in +the admin. + +There's no generic `/shop/[slug]` product detail page in this app — every +product beyond the plain grid card gets a bespoke hero page (currently +just `/todo-cards`), matching the custom-per-client site model. +`ProductGallery` is wired into `TodoKartenHero.tsx` as a drop-in +replacement for that page's static hero photo — but only once +`product.gallery.length > 0`; otherwise the curated static lifestyle +photo (`/hero-todo-karten.png`, deliberately not just the catalog image) +stays exactly as it was. A future bespoke product page can reuse the same +component the same way. + ## Tests `npm run test:unit` (Vitest, `node` environment, no jsdom/Next.js runtime diff --git a/app/components/KlaroConsentManager.tsx b/app/components/KlaroConsentManager.tsx index af80227..c056ff6 100644 --- a/app/components/KlaroConsentManager.tsx +++ b/app/components/KlaroConsentManager.tsx @@ -38,9 +38,14 @@ import { loadTrackingCode } from "../lib/loadTrackingCode"; function KlaroTheme() { return (