feat: message starter in the contact section
Build & Deploy / 🔍 Prepare (push) Successful in 5s
Build & Deploy / 🏗️ Build (push) Successful in 6m26s
Build & Deploy / 🚀 Deploy (push) Successful in 18s
Build & Deploy / 🩺 Smoke Test (push) Successful in 5s
Build & Deploy / 🔔 Notify (push) Successful in 2s

The visitor picks what they need and a prepared email types itself out; one
press opens it in their own mail app with subject and body filled in. The
mailto link is built by a tested pure function (src/domain/email.ts, spec
first) and only in the browser, so the address still never appears in the
page source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-04 09:01:03 +02:00
co-authored by Claude Opus 5.5
parent dc4a01cbe4
commit 390936856c
5 changed files with 318 additions and 10 deletions
+57
View File
@@ -0,0 +1,57 @@
import type { MailDraft } from "@/src/domain/email";
/**
* Message starters for the contact section. The visitor picks what they need and
* gets a prepared email to finish in their own mail app. The square brackets are
* blanks for the visitor to fill in.
*/
export type ContactTopic = {
readonly id: string;
readonly label: string;
readonly draft: MailDraft;
};
const SIGN_OFF = "Best regards";
export const CONTACT_TOPICS: readonly ContactTopic[] = [
{
id: "developer",
label: "A developer",
draft: {
subject: "A developer for our product",
body: `Hi Marc,\n\nwe are working on [what you are building] and need help with [what is next on your list].\n\nA first call would suit us around [date or week].\n\n${SIGN_OFF}`,
},
},
{
id: "rescue",
label: "A reliable app",
draft: {
subject: "Our app needs to become reliable",
body: `Hi Marc,\n\nour app [name or short description] works, but [what keeps going wrong].\n\nCould you take a look?\n\n${SIGN_OFF}`,
},
},
{
id: "automation",
label: "Automation",
draft: {
subject: "We want to automate a process",
body: `Hi Marc,\n\nwe would like to automate [the process]. Today it is done by hand in [the tools involved].\n\nCan we talk about it?\n\n${SIGN_OFF}`,
},
},
{
id: "website",
label: "A website",
draft: {
subject: "A website for my business",
body: `Hi Marc,\n\nI need a website for [your business]. It should [what it is for].\n\nWhen could we talk?\n\n${SIGN_OFF}`,
},
},
{
id: "other",
label: "Something else",
draft: {
subject: "A question",
body: `Hi Marc,\n\n[what you have in mind]\n\n${SIGN_OFF}`,
},
},
];