const colors = {
mauveDark: "#8b616d",
plum: "#66505f",
cream: "#f2e2d6",
creamLight: "#fbf6f1",
};
export function escapeHtml(value: string): string {
return value
.replace(/&/g, "&")
.replace(//g, ">")
.replace(/"/g, """);
}
export function renderButton(label: string, href: string): string {
return `
`;
}
export function renderFactBox(rows: { label: string; value: string }[]): string {
const cells = rows
.map(
(row, i) => `
${escapeHtml(row.label)}:
${escapeHtml(row.value)}
`,
)
.join("\n");
return ``;
}
/** Shared table-based, inline-styled email shell — same design language across all ANOUMA emails. */
export function renderEmailShell(args: { preheader?: string; bodyHtml: string; footerText?: string }): string {
const { bodyHtml, footerText = "Räume für Verbindung — mit dir selbst, miteinander und mit der Natur." } = args;
return `
|
ANOUMA
|
|
${bodyHtml}
|
|
${escapeHtml(footerText)}
|
|
`;
}
export function paragraph(text: string, opts: { italic?: boolean; small?: boolean } = {}): string {
const size = opts.small ? "13px" : "16px";
const style = opts.italic ? "font-style:italic;" : "";
return `${escapeHtml(text)}
`;
}