Skip to content

Packs / web-development-public

footer

Site footer with brand blurb, validated newsletter form (no key in the browser), three link columns that become two on phones, outline wordmark, legal row and smooth back-to-top. Plain HTML/CSS/JS.

Install

logicpacks pack use web-development-public/footer
get_pack web-development-public/footer

The second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.

Keys it needs (names only)

None.

Playbooks included

  • Spec: spec/SPEC.md (goal, steps, edge cases, don’ts)
  • Routes: static-local
  • Checks: 1 in outcome/checks.yaml
  • Code: _shots/shot-1280-rm.png_shots/shot-1280.png_shots/shot-390-rm.png_shots/shot-390.pngfooter.jsindex.htmlstyle.css
  • Tools: python3, playwright-python, chromium

Usage, last 8 weeks

New: no recorded use yet.

Purpose (from spec/SPEC.md)

Goal

A footer that closes every page: brand and one-line promise, a newsletter signup that validates and reports its state, grouped links, legal links and a way back to the top. It must read well at 390 px and never cause horizontal scroll (the big wordmark is the usual culprit).

Steps

  1. Copy the <footer> block from code/index.html, code/style.css (from .site-footer down) and code/footer.js.
  2. Replace brand, blurb and links. Keep 3-4 columns of at most 5 links; group by user intent (Product, Company, Resources).
  3. Newsletter: set data-endpoint on the form to your own backend route (e.g. a Cloudflare Pages Function) that holds the provider key server-side. Without it the form only validates and shows the success message (demo mode).
  4. The status line uses role="status" + aria-live="polite" so screen readers hear success and errors.
  5. Layout: two columns (brand | links) above 860 px, one column below; link columns go 3 -> 2 below 520 px; the input and button stack on phones.
  6. Wordmark: font-size: clamp(...) with white-space: nowrap; overflow: hidden on its own box so it can never widen the page.
  7. Run the outcome checks.

Edge cases

  • Very long company names in the wordmark: lower the clamp max or drop the wordmark under 390 px.
  • Submit spam: add a honeypot field or Turnstile on the backend route, not in the browser.
  • Back to top must respect prefers-reduced-motion (instant jump).
  • Year: rendered by JS with a static fallback in the HTML for no-JS crawlers.

Don'ts

  • Never put a mailing-list API key (Resend, Mailchimp, etc.) in client JS.
  • Do not repeat every header link; the footer is for secondary navigation and legal.
  • No tiny tap targets: links keep at least 8 px gaps and 16 px text on mobile.
  • Do not use a fixed-width wordmark in px.