mirror of
https://github.com/bitbaum/s-ink.git
synced 2026-12-04 04:47:40 +01:00
The mailto: lost enquiries three ways. It cannot carry the reference images that ARE the enquiry, it does nothing at all for a visitor with no mail client configured, and it hands the visitor to another app at the exact moment they had decided to act. The form asks for the five things needed to answer with a price rather than a question — name, email, idea, placement, size — plus up to three reference photos, and confirmation the visitor is 18. Nothing more: every extra box costs enquiries, and leaving out placement or size costs a whole round-trip on every single one. lib/enquiry.ts is the SSOT. The form renders from it and the API validates against it, so a field cannot end up required in the browser and optional on the server. Labels are keyed by field id, so adding a field breaks all seven dictionaries until translated. Delivery is Resend's REST API over fetch — no SDK for one POST — from a domain already verified in the account, with reply-to set to the visitor so answering is one keypress in his normal inbox. Verified end to end: a real send with an attachment reached a real mailbox, last_event=delivered. Anti-spam is a honeypot plus a minimum fill time, not a CAPTCHA, which taxes every real visitor to inconvenience a bot. BUG FOUND WHILE TESTING, now pinned: the first version sent the render timestamp and let the server subtract it from its own clock. A visitor whose phone runs fast produces a negative elapsed time, reads as "faster than a human could type", and the enquiry is silently discarded — while they are shown "Sent." A lost booking indistinguishable from a delivered one. The duration is now measured entirely in the browser and the check fails open on anything nonsensical. Also: hero and sticky CTAs scroll to the form rather than opening mail, the "what to send" checklist is gone (the fields ask the same three things), and the section title no longer says "Email to discuss". 92 tests, up from 74. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
48 lines
956 B
CSS
48 lines
956 B
CSS
.actions {
|
|
display: grid;
|
|
gap: 1rem;
|
|
}
|
|
|
|
/* The filled control that used to live here moved into the form's submit
|
|
button — there is one primary action in this section and it is Send. */
|
|
.orEmail {
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 1rem;
|
|
flex-wrap: wrap;
|
|
border: 1px solid var(--color-border);
|
|
padding: 0.35rem 0.9rem;
|
|
}
|
|
|
|
.address {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: 44px;
|
|
color: var(--color-text);
|
|
/* An address is the one string on the page nobody should have to squint at. */
|
|
letter-spacing: 0.08em;
|
|
text-transform: none;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.address:hover {
|
|
color: var(--color-accent);
|
|
}
|
|
|
|
.copy {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: 44px;
|
|
color: var(--color-text-muted);
|
|
transition: color var(--dur-fast) var(--ease-out);
|
|
}
|
|
|
|
.copy:hover {
|
|
color: var(--color-accent);
|
|
}
|