← back to Govarbitrage
src/app/api/newsletter/result-page.ts
23 lines
// Small friendly HTML result page for confirm/unsubscribe links, styled to
// match the public pricing page.
export function resultPage(status: number, title: string, body: string): Response {
const html = `<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${title} — GovArbitrage</title>
</head>
<body style="margin:0;background:#f8fafc;font-family:system-ui;color:#0f172a">
<main style="max-width:560px;margin:96px auto;padding:0 20px;text-align:center">
<div style="background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:36px 28px">
<h1 style="font-size:26px;margin:0 0 10px">${title}</h1>
<p style="color:#475569;font-size:15px;line-height:1.6;margin:0">${body}</p>
<p style="margin-top:22px"><a href="/newsletter" style="color:#111827;font-weight:600">← Back to the newsletter page</a></p>
</div>
</main>
</body>
</html>`;
return new Response(html, { status, headers: { "Content-Type": "text/html; charset=utf-8" } });
}