diff --git a/app/cart/components/CartContent.tsx b/app/cart/components/CartContent.tsx
index 27d8469..f6d8c61 100644
--- a/app/cart/components/CartContent.tsx
+++ b/app/cart/components/CartContent.tsx
@@ -14,6 +14,7 @@ import { Reveal } from "../../components/Reveal";
import { VersandModal } from "../../components/VersandModal";
import { VatBreakdown } from "../../components/VatBreakdown";
import { ArrowLeftIcon } from "../../components/ArrowLeftIcon";
+import { ProductName } from "../../components/ProductName";
import { FreeShippingBanner } from "./FreeShippingBanner";
import type { TrustBadge, ShippingSettings } from "../../lib/payload";
@@ -260,7 +261,7 @@ export function CartContent({
className="font-semibold text-h-small text-text-primary hover:text-brand transition-colors"
style={{ fontFamily: "var(--font-lora)" }}
>
- {product.name}
+
{product.subline}
} {/* Independent stacked rows, not grid siblings — no equal-height pressure from neighboring lines, so a plain conditional line is enough here. */} diff --git a/app/components/ProductCard.tsx b/app/components/ProductCard.tsx index f2839a3..5eb98ea 100644 --- a/app/components/ProductCard.tsx +++ b/app/components/ProductCard.tsx @@ -5,6 +5,7 @@ import { formatPrice, discountPercent } from "../lib/format"; import { effectiveTaxRate } from "../lib/cartTotals"; import { AddToCartInlineButton } from "./AddToCartInlineButton"; import { WishlistButton } from "./WishlistButton"; +import { ProductName } from "./ProductName"; import type { Product } from "../lib/payload"; // Single shared card markup for every product grid (ProductGrid, @@ -108,13 +109,14 @@ export function ProductCard({ className="font-semibold text-h4 text-text-primary w-full hover:text-brand transition-colors" style={{ fontFamily: "var(--font-lora)" }} > - {product.name} +
- {product.name}
+
{product.subline}
}{discount !== null && ( diff --git a/app/components/ProductName.tsx b/app/components/ProductName.tsx new file mode 100644 index 0000000..76d4ffe --- /dev/null +++ b/app/components/ProductName.tsx @@ -0,0 +1,16 @@ +// Every hand-written PDP headline styles a trailing "." in brand color +// (e.g. der-eine/Pricing.tsx's "Der Eine."), +// matching how every product's own Payload `name` is actually written +// ("Der Eine.", "Die Pause.", "Einfach anfangen."). Anywhere `product.name` +// is rendered as plain text instead (cards, cart line items, the one +// Payload-driven PDP hero) silently lost that styling — this centralizes +// the same trailing-period split so it can't drift per call site again. +export function ProductName({ name }: { name: string }) { + if (!name.endsWith(".")) return <>{name}>; + return ( + <> + {name.slice(0, -1)} + . + > + ); +} diff --git a/app/der-eine/components/Hero.tsx b/app/der-eine/components/Hero.tsx index 7d6a229..2141af9 100644 --- a/app/der-eine/components/Hero.tsx +++ b/app/der-eine/components/Hero.tsx @@ -63,12 +63,14 @@ export async function Hero() { > Der Eine.
-- Für die eine Sache, die gerade zählt. -
+ {product?.subline && ( ++ {product.subline} +
+ )}
diff --git a/app/lib/__tests__/cartTotals.test.ts b/app/lib/__tests__/cartTotals.test.ts
index 540a408..9e7c141 100644
--- a/app/lib/__tests__/cartTotals.test.ts
+++ b/app/lib/__tests__/cartTotals.test.ts
@@ -6,6 +6,7 @@ const product = (overrides: Partial
- {product?.name ?? "Tasse"} -
+
+ {product ?
+ {product.subline} +
+ )} +{product.subline}
} {product.description ?- Kleine Karten. Große Wirkung. -
+ {product?.subline && ( ++ {product.subline} +
+ )}