Landing Page Builder
by @jonathanlindsay
Build premium static landing pages with the Stomme/PolyTrader design system. Glass morphism, CSS custom properties, separated copy, responsive, Cloudflare Pa...
clawhub install stomme-landing-page-builderπ About This Skill
name: landing-page-builder description: Build premium static landing pages with the Stomme/PolyTrader design system. Glass morphism, CSS custom properties, separated copy, responsive, Cloudflare Pages-ready. Use when building a website, landing page, marketing site, or product page. Produces static HTML/CSS/JS with no framework dependencies.
Landing Page Builder
Build premium static landing pages using the proven design system from polytrader.ai.
Stack
Procedure
1. Read content sources β all copy must come from provided markdown files, never invented
2. Read the design system reference β read references/design-system.md for the full CSS pattern library
3. Separate copy from layout β define ALL text in a js/copy.js data file, reference from HTML via data-copy attributes or JS injection. This enables i18n later.
4. Build pages using the section patterns from the design system
5. Include: _headers (security headers), _redirects, robots.txt, sitemap.xml, .gitignore
6. Generate validation scripts β adapt references/pre-push-check-template.sh and references/validate-live-template.js for the specific site (selectors, locales, CSS vars). Place in scripts/. Set up .githooks/pre-push. Wire into CI workflow.
7. Test: open in browser at desktop AND mobile viewports. Run bash scripts/pre-push-check.sh. Verify theme toggle (3 full cycles), lang switcher (all locales), contrast on all interactive elements.
8. Git init + commit (hooks path set to .githooks/)
9. Write BUILD-NOTES.md with Cloudflare Pages deployment instructions
Design System Principles
The reference file has the full implementation. Key principles:
prefers-color-scheme, user toggle in nav, localStorage persistence, inline script prevents flash.glass cards with backdrop-filter, subtle borders, inset shadows β adapts to both themes:root, light overrides in [data-theme="light"]localStorage key for persistence, OS change listenerSection Patterns (in order)
1. Sticky nav β frosted glass, pill shape or clean bar, brand + links + theme toggle + CTA 2. Hero β large headline, subheadline, dual CTAs (gradient primary + outline secondary), trust signals in glass card grid below 3. Value proposition β narrative text section explaining the core differentiator 4. How it works β numbered steps (01, 02, 03...) in glass cards, 2-column layout 5. Features β alternating layout (text left/visual right, then swap), glass cards 6. Pricing β tier cards with ring highlight on featured plan, checklist items with check icons 7. FAQ β 2-column glass card grid, question + answer 8. Bottom CTA β full-width banner, headline + CTA + supporting line 9. Footer β minimal, border-top, brand + links + legal
Theme Architecture
Every page must include:
1. Inline script (blocking, before CSS loads) β reads localStorage key, falls back to prefers-color-scheme, sets data-theme="light" on if light
2. :root β dark theme variables (default)
3. [data-theme="light"] β light theme variable overrides
4. --body-bg-gradient variable β ambient background through a custom property so it switches with theme
5. Theme toggle button in nav with sun/moon SVG icons, visibility driven by CSS --theme-icon-sun / --theme-icon-moon variables
6. JS in main.js β initTheme() function: toggle click handler, localStorage.setItem, OS change listener (respects manual override)
7. Smooth transitions β 300ms ease on color, background, border-color, box-shadow for themed elements
8. --btn-primary-text β button text color variable (dark on dark theme where bg is gold, white on light theme)
File Structure
site-root/
βββ index.html
βββ pricing.html
βββ privacy.html
βββ terms.html
βββ 404.html
βββ css/
β βββ style.css # Full design system + page styles (dark + light themes)
βββ js/
β βββ copy.js # ALL text content as exportable object
β βββ main.js # Nav toggle, smooth scroll, theme toggle, minor interactions
βββ img/
β βββ favicon.svg
β βββ og-placeholder.png
βββ _headers # Cloudflare security headers
βββ _redirects # Cloudflare redirects
βββ robots.txt
βββ sitemap.xml
βββ .gitignore
βββ BUILD-NOTES.md
Post-Build Validation (MANDATORY)
Every build must include a scripts/ directory with two validation scripts. These are not optional β they are part of the deliverable, like _headers or sitemap.xml.
1. scripts/pre-push-check.sh β Static pre-push gate
Runs before every git push (via .githooks/pre-push). Checks:
and tags have cache-bust version params (?v=HASH)applyTheme() is called on DOM load (not just on toggle click).nav-links a)removeAttribute('data-theme') in any HTML file (must always set theme explicitly)2. scripts/validate-live.js β Post-deploy browser validation
Runs in CI after every Cloudflare Pages deploy, using Playwright. Tests at both desktop (1440px) and mobile (375px) viewports:
localStorage synclocalStorage value and tags have version paramshref="#", empty, or undefined)3. Git hook setup
mkdir -p .githooks
echo '#!/bin/bash' > .githooks/pre-push
echo 'bash "$(git rev-parse --show-toplevel)/scripts/pre-push-check.sh"' >> .githooks/pre-push
chmod +x .githooks/pre-push
git config core.hooksPath .githooks
4. CI workflow must include validation job
The GitHub Actions workflow must have avalidate job that runs after the deploy job:
validate:
needs: deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '22' }
- name: Install Playwright
run: npx playwright install chromium --with-deps
- name: Wait for deploy propagation
run: sleep 30
- name: Run post-deploy validation
run: node scripts/validate-live.js https://$DOMAIN
Why this exists: We shipped a grey-on-red CTA button and a broken theme toggle to production because we relied on visual review alone. Computed style checks catch what eyes miss. Mobile Safari caching broke deploys because we tested desktop only. These scripts encode every lesson into automated gates.