feat(newsletter, checkout): add consent links, unify trust-note styling, optimize images

Every email-signup form (Home/newsletter Newsletter section, /newsletter
hero, /challenge, the Newsletter overlay) now links "Datenschutzerklärung"
to /datenschutz next to its consent checkbox, opened in a new tab so a
partially filled form isn't lost. Checkout gets an equivalent AGB +
Datenschutzerklärung note under the order button, and the Versand
modal's Widerrufsbelehrung link also opens in a new tab.

Unified the "Keine Werbung. Jederzeit abbestellbar." trust note (icon +
#888 copy) across all newsletter forms, matching /challenge's existing
style instead of each form having its own wording/color.

Also converted the remaining raw <img> tags in these files to next/image
per the no-img-element lint rule (bandwidth/LCP).
This commit is contained in:
Marco
2026-07-21 11:15:44 +00:00
parent a72aea1070
commit cc9da6ac6d
6 changed files with 159 additions and 30 deletions
@@ -2,6 +2,17 @@ import Link from "next/link";
import Image from "next/image";
import { Reveal } from "../../components/Reveal";
// Same lock icon + copy as /challenge's and the shared Newsletter
// component's trust note — unified across all newsletter-signup forms.
function LockIcon() {
return (
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" className="shrink-0">
<rect x="2" y="6" width="10" height="7" rx="1.5" stroke="#888" strokeWidth="1.3" />
<path d="M4.5 6V4.5a2.5 2.5 0 0 1 5 0V6" stroke="#888" strokeWidth="1.3" />
</svg>
);
}
const checklist = [
"Jeden Mittwoch neue Impulse & Tipps",
"Kurz & knackig in 5 Minuten gelesen",
@@ -47,7 +58,7 @@ export function WeeklyImpulsesHero() {
<div className="flex flex-col gap-6 items-start w-full flex-1 lg:justify-center">
{/* Pill badge */}
<div className="flex gap-2 items-center border border-border rounded-full pl-3.5 pr-4 py-2">
<img alt="" src="/icon-envelope-small.svg" className="w-4 h-3 shrink-0" />
<Image alt="" src="/icon-envelope-small.svg" width={16} height={12} className="w-4 h-3 shrink-0" />
<span className="text-body-sm font-semibold text-text-primary whitespace-nowrap">
Jeden Mittwoch in deinem Postfach
</span>
@@ -73,7 +84,7 @@ export function WeeklyImpulsesHero() {
<ul className="flex flex-col gap-3 items-start w-full">
{checklist.map((item) => (
<li key={item} className="flex gap-[0.625rem] items-center w-full">
<img alt="" src="/icon-check.svg" className="size-5 shrink-0" />
<Image alt="" src="/icon-check.svg" width={20} height={20} className="size-5 shrink-0" />
<span className="flex-1 text-body text-text-primary">{item}</span>
</li>
))}
@@ -96,9 +107,31 @@ export function WeeklyImpulsesHero() {
</button>
</div>
{/* Consent checkbox — this signup's legal basis is consent
(email marketing), same wording/pattern as the shared
Newsletter component's and NewsletterModal's checkbox. */}
<label className="flex gap-2 items-start cursor-pointer">
<input
type="checkbox"
className="size-4 shrink-0 mt-0.5 rounded-xs border border-border accent-brand"
/>
<span className="text-label text-text-primary font-normal leading-normal">
Ich akzeptiere die{" "}
<Link
href="/datenschutz"
target="_blank"
rel="noopener noreferrer"
className="underline hover:text-brand"
>
Datenschutzerklärung
</Link>
.
</span>
</label>
<div className="flex gap-[0.375rem] items-center">
<img alt="" src="/icon-lock.svg" className="size-3.5" />
<span className="text-label text-text-muted">Keine Werbung. Jederzeit abbestellbar.</span>
<LockIcon />
<span className="text-label text-[#888]">Keine Werbung. Jederzeit abbestellbar.</span>
</div>
</div>
</Reveal>