Skip to content

Restyle the home page with a hero illustration and full-width bands - #82

Merged
carlrafting merged 11 commits into
devfrom
claude/project-thread-0lkzi5
Dec 1, 2026
Merged

carlrafting merged 11 commits into
devfrom
claude/project-thread-0lkzi5

Conversation

@carlrafting

@carlrafting carlrafting commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Requested by Carl · project thread

What

Gives the home page more personality, following the mock-up agreed in the project thread (inspired by Bootstrap, Astro and Lume's landing pages).

  • Hero illustration: the existing logo, unchanged, on a warm butter sun with two vanilla pods and an orchid. It floats gently and stops for prefers-reduced-motion.
  • Full-width bands: "Start with HTML that works" (before and after side by side), "What's in the box" (package cards with small logo-coloured icon tiles), and a tangerine "See it working" band.
  • Type: headings and the header and footer wordmark in Gabarito 800/900, self-hosted in assets/fonts/ (OFL), so the site makes no third-party font requests.
  • Import line in the hero with a copy button, using the existing copy-button component. It stays hidden without JS.

How

  • index.md becomes index.vto so the page can hold its own sections.
  • page.vto skips its title header when a page sets hideTitle: true. Other pages are unchanged.
  • assets/home.css is rewritten. It uses the site's colour tokens, so it follows the theme toggle. The code panes set color-scheme: dark, so the Prism token colours pick their dark values in both themes.
  • Primary buttons and the tangerine band use dark brown text (5.5:1) instead of white (3.1:1), for contrast.

Notes

  • I couldn't run deno task build here, because the sandbox can't reach cdn.jsdelivr.net. I previewed the page by rendering the layouts by hand with the site CSS, in light, dark and at 390px. Please check deno task serve locally, especially Prism highlighting in the two code panes.
  • Block spacing on the home page uses lh inside text and rlh for layout, with rem for inline spacing.

Generated by Claude Code

The home page now opens on a hero with the logo on a warm sun, vanilla
pods and an orchid, followed by full-width bands: before and after, the
packages, and a tangerine "See it working" band. Headings use Gabarito.

- index.md becomes index.vto so the page can hold its own sections.
- page.vto skips its title header when a page sets hideTitle.
- The import line in the hero uses the copy-button component.
- Primary buttons and the tangerine band use dark text for contrast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsQ2rDB8K8SNwFFLMu6vjr
@carlrafting carlrafting self-assigned this Nov 30, 2026

Copy link
Copy Markdown
Owner Author

The Workers Builds: vanillapod failure is not from this PR. The same check also fails on dev at b2e4b97, the commit this branch is based on. I can't open the Cloudflare build logs from here, so the cause needs a look in the Cloudflare dashboard. The repo's own CI (Packages, Browser tests and site build) covers this change.


Generated by Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Cloudflare builds and deploys previews for this pull request. Learn more about Cloudflare previews.

Worker Status Deployment Commit
Not available Failed Not deployed 492641b

Updated: Dec 1, 2026, 14:23 UTC

Adds an "Or build it in JavaScript" band after the enhance() comparison,
with short examples of the element helpers and h(). Code panes now fill
their height, so the empty strip under short code is gone, and code is a
little smaller on phones so an import line fits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsQ2rCESxmk93SbPNQwFo5
claude and others added 8 commits December 1, 2026 15:17
The home page now opens on a hero with the logo on a warm sun, vanilla
pods and an orchid, followed by full-width bands: before and after, the
packages, and a tangerine "See it working" band. Headings use Gabarito.

- index.md becomes index.vto so the page can hold its own sections.
- page.vto skips its title header when a page sets hideTitle.
- The import line in the hero uses the copy-button component.
- Primary buttons and the tangerine band use dark text for contrast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsQ2rDB8K8SNwFFLMu6vjr
The "vanillapod" name next to the logo now uses the same bold Gabarito as
the home page headings, instead of italic monospace. The footer gets the
logo and wordmark too. Gabarito now loads on every page from
document.vto, so the wordmark matches site-wide. The logo icon is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsQ2rDB8K8SNwFFLMu6vjr
Block-direction margins, paddings and gaps in home.css and the footer now
use line-height units instead of rem: lh for space inside text, so it
follows the type, and rlh for layout space such as band padding and grid
gaps. Inline spacing stays in rem. The values keep the page's spacing
close to what it was.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsQ2rDB8K8SNwFFLMu6vjr
The font now ships in assets/fonts as two woff2 files (Latin and Latin
Extended) from @fontsource-variable/gabarito 5.3.0, with its SIL Open
Font License. assets/fonts.css declares them with @font-face, and
document.vto preloads the Latin file. The site no longer makes any
request to fonts.googleapis.com or fonts.gstatic.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsQ2rDB8K8SNwFFLMu6vjr
Signed-off-by: Carl Räfting <mail@carlrafting.com>
Following the pattern from the previous commit, home.css groups each
component's rules in its own @scope block: the band, intro, hero,
actions, button, install line, compare section, pane, packages, card,
examples band and example links. Descendant selectors drop their class
prefix, :scope styles the component itself, and media queries for a
component sit inside its scope. Keyframes stay outside, since @scope
can't hold them. The rendered page is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsQ2rDB8K8SNwFFLMu6vjr
The hero glow colors were rgb() and the package icon tiles used hex.
All of them are now oklch() values converted from the same colors, so the
page looks the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsQ2rDB8K8SNwFFLMu6vjr
components.css now follows the same conventions as home.css:

- Each part of the component pages has its own @scope block: the list,
  the page, tags, filter, card, custom properties table, source, pager
  and install snippets.
- Block spacing uses lh inside text and rlh for layout. Inline spacing
  stays in rem. The page's rhythm is close to before, a few pixels
  roomier in places.
- color-mix() mixes in oklch instead of srgb.

The source code blocks use `:scope pre`, so they still win over Prism's
unlayered pre[class*=language-] styles. The same issue affected the home
page code panes: docs/styles.css gives highlighted pre a surface
background, so home.css now matches that selector's specificity to keep
the panes dark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsQ2rDB8K8SNwFFLMu6vjr
@carlrafting
carlrafting force-pushed the claude/project-thread-0lkzi5 branch from 7e6d89b to 87b327a Compare December 1, 2026 14:17
Brings in the "Or build it in JavaScript" band from #83 and fits its CSS
to this branch's conventions. The panes and the "More about" link get
their own @scope blocks, so both sections can use them. The pane changes
from #83 (pre fills the pane, smaller code on phones, inline code in the
caption) move into @scope (.home-pane). The rule that removes the top
padding after the comparison becomes @scope (.home-compare + .home-create).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsQ2rDB8K8SNwFFLMu6vjr
@carlrafting
carlrafting removed this pull request from stack #84 December 1, 2026 14:24
@carlrafting
carlrafting merged commit 81f69af into dev Dec 1, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants