feat(site): add an email signup band to the homepage - #28
Merged
Conversation
Adds a contained signup band as the last section of the homepage, above the footer. Email address only, one field, one button. Submissions post directly to HubSpot's unauthenticated forms endpoint from about 30 lines of our own script. HubSpot's embed snippet is deliberately NOT used: it also installs visitor tracking and cookies across the page. Nothing third-party is loaded, and no tracking cookie (hutk) is sent. Design notes: - Contained band rather than a full-bleed section. The border is what stops it reading as footer furniture when it sits directly above the footer. - The submit control is .btn-secondary, not .btn-primary, per the rationed accent rule -- the hero already spends the page's one primary button. - The band heading steps down from the section heading size; a band should not shout as loudly as a section. - Tokens only, no colour literals. Two workarounds are commented in site.css: - A <button class="btn-secondary"> falls through to the ported .btn-secondary further down the file (border 1.23:1 in light, effectively invisible). The canonical rule only out-specifies it for <a>. The site had no <button> before this, so nothing had hit it. Restated locally rather than editing the ported block. - [hidden] is display:none in the UA sheet, which any author display rule out-specifies, so .signup[hidden] is set explicitly. Without it the form stays on screen after a successful submit. Verified: submission lands in HubSpot; no horizontal overflow at 320 or 375px; contrast clears AA in both themes (placeholder uses --muted, as --subtle measured 4.38:1 in light).
The signup button carried padding: 9px 16px, which made it a second distinct computed style for .btn-secondary and failed the page-anatomy gate added in #27. Canonical padding is 6px 12px. The field height is matched by flex stretch rather than by tuning the button, so both still render at 37px and the button is now byte-identical to every other secondary button on the site. The .signup .btn-secondary rule itself is still needed: #27 did not remove the ported .btn-secondary duplicate further down site.css, so a <button> still falls through to it and picks up a var(--divider) border at 1.23:1 in light.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a signup band as the last section of the homepage, above the footer. Email address only — one field, one button.
Homepage only for now. Not on the Memory, Database or Forge pages, and not on getting-started.
How submissions are handled
Submissions post straight to HubSpot's unauthenticated forms endpoint from ~30 lines of our own script.
HubSpot's embed snippet is deliberately not used — it also installs visitor tracking and cookies across whatever page it sits on. Nothing third-party is loaded here, and no tracking cookie (
hutk) is sent. The account and form IDs in the source are public by design; they appear in any HubSpot form embed.Verified end to end: a real submission lands as a contact in HubSpot.
Design decisions
.btn-secondary, not.btn-primary— the rationed-accent rule. The hero already spends the page's one primary button.Two workarounds, both commented in
site.css<button class="btn btn-secondary">gets the wrong border. The ported legacy block further downsite.cssredefines.btn-secondarywithborder: 1px solid var(--divider)— 1.23:1 in light, effectively invisible — and the canonical rule only out-specifies it viaa.btn-secondary. Links are fine; buttons are not. The site had no<button>anywhere before this, so nothing had hit it. Restated the canonical values inside.signuprather than editing the ported block. Worth fixing properly at some point — either addbutton.btn-secondaryto the canonical selector list or drop the ported duplicate.[hidden]needed an explicit rule. It'sdisplay: nonein the UA sheet, which any authordisplayrule out-specifies, so the form stayed on screen after a successful submit.Checks
scripts/check-site.py— passedscripts/check-brand-contrast.mjs— 127 combinations, 0 below AApython3 scripts/build-docs-nav.py— no driftgit diff --check— clean--muted;--subtlemeasured 4.38:1 in light, below AA.scripts/generate-example-docs.shwas not run — Asciidoctor isn't installed on this machine — but nothing undersources/ortheme/is touched.Not included
Deliberately out of scope, tracked separately: a privacy note (the site has none, and normally the fine print under a form links to one), and a Contact Us section.