Marketing Page
elements man recipes/marketing-pageA dark landing page with a hero, a three-feature row, three pricing tiers, and a
footer. The recipe leans on @elements/ui: a hero CTA is a Button with
href, the pricing tiers are Cards, the dark surface is one class on the
page that overrides a handful of CSS variables. No database, no RPC, no
LiveTable: the recipe is a route, a template, and a style.css.
Page setup
Terminalelements create page marketing
The page has no attributes and no rpc. The route renders the template; the
template carries all the content and the style.css carries the dark theme
overrides.
app/pages/marketing/index.tsimport { Request, Response } from "@elements/app"; import marketing from "./template"; export default function route(req: Request, res: Response) { return new marketing(); }
app/pages/marketing/template.ehtmlimport "./style.css"; import { Button } from "@elements/ui/button"; import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, } from "@elements/ui/card"; interface Tier { name: string; price: string; blurb: string; features: string[]; cta: string; emphasis: boolean; } const TIERS: Tier[] = [ { name: "starter", price: "$9", blurb: "for side projects and prototypes.", features: ["1 app", "shared workers", "email support"], cta: "choose starter", emphasis: false, }, { name: "pro", price: "$29", blurb: "for teams shipping production apps.", features: ["unlimited apps", "dedicated workers", "priority support"], cta: "choose pro", emphasis: true, }, { name: "enterprise", price: "custom", blurb: "for orgs with security and compliance needs.", features: ["everything in pro", "SSO + SAML", "managed onboarding"], cta: "talk to sales", emphasis: false, }, ]; const FEATURES = [ { title: "one workspace", body: "projects, tasks, and files in one place, shared with your whole team.", }, { title: "real-time by default", body: "every change appears for everyone on the team the moment it is made.", }, { title: "set up in minutes", body: "import your projects, invite your team, and start the same afternoon.", }, ]; <html class="page-marketing"> <main class="page-shell"> <section class="hero"> <h1>ship projects in days, not months.</h1> <p class="lead"> acme keeps your projects, your tasks, and your team in one live workspace. </p> <div class="cta-row"> <Button href="/signup" variant="primary" size="lg">get started</Button> <Button href="/docs" size="lg">read the docs</Button> </div> </section> <section class="features"> <h2>everything you need, nothing you don't.</h2> <ul class="feature-grid"> <li e:for={f of FEATURES}> <h3>{f.title}</h3> <p>{f.body}</p> </li> </ul> </section> <section class="pricing"> <h2>simple pricing.</h2> <div class="tiers"> <Card e:for={t of TIERS} class={t.emphasis ? "tier is-featured" : "tier"}> <CardHeader> <CardTitle>{t.name}</CardTitle> <p class="price">{t.price}<span class="cadence" e:if={t.price !== "custom"}>/mo</span></p> <CardDescription>{t.blurb}</CardDescription> </CardHeader> <CardContent> <ul class="checks"> <li e:for={feat of t.features}>{feat}</li> </ul> </CardContent> <CardFooter align="stack"> <Button href="/signup" variant={t.emphasis ? "primary" : "outline"}>{t.cta}</Button> </CardFooter> </Card> </div> </section> </main> <footer> <nav> <a href="/about">about</a> <a href="/docs">docs</a> <a href="/blog">blog</a> <a href="/changelog">changelog</a> <a href="/contact">contact</a> </nav> <p class="copy">© 2026 acme. made for builders.</p> </footer> </html>
The <html class="page-marketing"> tag carries the page class, matching what
elements create page marketing produces. The class is the anchor for every
page-scoped style rule below.
The hero CTAs are Buttons with href, so each renders an <a> styled as a
button; variant="primary" picks the fill and size="lg" the height.
The pricing tiers iterate TIERS and emit a Card each, built from its parts:
CardHeader with the CardTitle and CardDescription, CardContent for the
feature list, and CardFooter align="stack" for a full-width CTA. The
emphasized tier adds is-featured through class and takes the primary
variant for its button; the rest are outline buttons.
The feature row uses a <ul> with e:for over the FEATURES constant. No
images, no icons in the recipe; the focus is the layout.
Styles
app/pages/marketing/style.css@import "#app/shared/styles/page.css"; /** * Dark surface for the marketing page. Overriding the design-system * tokens on `.page-marketing` flips every nested element (buttons, cards, * anchors) to the dark palette without restyling each one. */ .page-marketing { --bg: #0a0a0c; --bg-soft: #16161a; --ink: #f5f5f7; --ink-dim: #9ea1a8; --rule: #2a2b30; --rule-soft: #1f2024; --accent: #7c7cff; --accent-deep: #a3a3ff; --accent-soft: rgba(124, 124, 255, 0.14); background: var(--bg); color: var(--ink); min-height: 100vh; } /** * Hero section. Centered copy on a reading width, with a primary * and secondary CTA below the lead. */ .page-marketing .hero { max-width: var(--container-4xl); margin: 0 auto; padding: var(--space-24) var(--container-padding) var(--space-16); text-align: center; } .page-marketing .hero h1 { font-size: var(--text-4xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); margin: 0 0 var(--space-6); } .page-marketing .hero .lead { font-size: var(--text-lg); color: var(--ink-dim); max-width: var(--container-prose); margin: 0 auto var(--space-10); } .page-marketing .hero .cta-row { display: inline-flex; gap: var(--space-4); } /** * Features. Three-column grid of value props. */ .page-marketing .features { max-width: var(--container-wide); margin: 0 auto; padding: var(--space-16) var(--container-padding); text-align: center; } .page-marketing .features h2 { font-size: var(--text-2xl); margin: 0 0 var(--space-12); } .page-marketing .feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-10); list-style: none; padding: 0; margin: 0; text-align: left; } .page-marketing .feature-grid h3 { font-size: var(--text-lg); margin: 0 0 var(--space-3); } .page-marketing .feature-grid p { color: var(--ink-dim); margin: 0; line-height: var(--leading-body); } /** * Pricing tiers. Three Cards; the featured one takes the accent border. */ .page-marketing .pricing { max-width: var(--container-wide); margin: 0 auto; padding: var(--space-16) var(--container-padding); text-align: center; } .page-marketing .pricing h2 { font-size: var(--text-2xl); margin: 0 0 var(--space-12); } .page-marketing .tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); text-align: left; } .page-marketing .tier.is-featured { border-color: var(--accent); } .page-marketing .tier .price { font-size: var(--text-2xl); font-weight: var(--weight-semibold); margin: var(--space-2) 0; } .page-marketing .tier .price .cadence { font-size: var(--text-md); color: var(--ink-dim); font-weight: var(--weight-regular); } .page-marketing .checks { list-style: none; padding: 0; margin: 0; } .page-marketing .checks li { padding: var(--space-2) 0; border-top: 1px solid var(--rule-soft); } .page-marketing .checks li:first-child { border-top: none; } /** * Footer. Horizontal nav above a copyright line. */ .page-marketing footer { max-width: var(--container-wide); margin: 0 auto; padding: var(--space-12) var(--container-padding); border-top: 1px solid var(--rule); text-align: center; } .page-marketing footer nav { display: inline-flex; gap: var(--space-8); margin-bottom: var(--space-4); } .page-marketing footer nav a { color: var(--ink-dim); text-decoration: none; } .page-marketing footer nav a:hover { color: var(--ink); } .page-marketing footer .copy { color: var(--ink-dim); font-size: var(--text-sm); margin: 0; }
The dark surface is a handful of variable overrides on .page-marketing.
Every element inside the page (cards, buttons, anchors, text) reads those
tokens, so changing them flips the whole page from light to dark without
restyling any individual element. The card's own padding, header and footer
come from Card; the page styles only the price line and the feature list
inside it.
The layout uses the --container-* width caps from the design system:
--container-4xl (56rem) for the hero copy, --container-wide (80rem) for
the feature and pricing grids. --container-padding (var(--space-8)) gives
a consistent gutter at the viewport edge.
Routes
Register the page in index.ts:
index.tsimport marketing from "#app/pages/marketing"; // ... app.route("/", marketing);
Notes
- The page class is the theme switch. Everything dark on this page is gated
by
.page-marketing. Drop the class and the page reverts to the default light surface. Add a second wrapper class with its own variable overrides for a "summer" theme, a tenant-branded theme, or a print stylesheet. - Link as button.
<Button href="/signup">renders an<a>with the design system's.buttonclass, so a link and a<button>on the same page match. A bare<a class="button is-primary">is the same thing without the template. - Pricing tiers from data. The
TIERSconstant is in the template module; rendering iterates the array. To pull pricing from the database (per-tenant pricing, A/B-tested copy), turn the constant into aselectin the route handler and pass the array through as a template attribute. - No JS-driven interactivity. The page has no
oninput, noonclick, no RPC calls. Every byte of the rendered HTML is in the first response. That keeps Time-to-First-Paint at the floor and means the page works with JavaScript disabled. Add interactivity (newsletter signup, theme toggle) as small additions; the rest stays static. - Token customization. The marketing wrapper overrides nine tokens. The
full set of token names is in
elements man ui/themes; pick the ones that matter for the look you want and override them locally. Avoid hardcoding raw hex or px values in.page-marketingrules; reach for a token first.