Repository navigation
feat(docsite): live theme + template previews on landing feature cards - #3064
Merged
Merged
Conversation
Replace the baked /feature-brand.png and /feature-templates.png on the home "Features" bento with live, dark-mode-aware previews: - Themes card (ThemesPreview): renders the real /themes ThemeShowcaseStore in a Butter <Theme> scope, fluidly scaled to a miniature cropped to the first section (nav + hero + products). Forces the store's desktop grid via an AppShellMobileContext override so it never collapses inside the scaled tile. Static Butter swatches + script "Aa" rail; left-anchored/bled on the narrow 3-column card, centered on the wide single-column card; bottom-anchored; elevation shadow. - Templates card (TemplatesPreview): a grid of live, scaled-down real page templates (TemplateThumbnail) framed as elevated tiles. Narrow desktop card: 2-up rows (middle row 3-up with login centered), uniform tile size. Wide single-column card: dissolves into a 3-per-line x 2-row grid (one template dropped to avoid an orphan). - TemplateThumbnail: add optional aspectRatio, renderWidth (full-page miniature vs zoomed slice), and borderRadius props; defaults preserve existing usage. - Components/CLI previews: mark inert + pointer-events:none (decorative). - globals.css: scope the embedded theme-showcase nav to the themed body color so the home-page nav overrides don't leak a mismatched band into the preview. Co-authored-by: Cursor <[email protected]>
rubyycheung
requested review from
cixzhang,
ejhammond,
imdreamrunner,
josephfarina,
marie-lucas,
nynexman4464 and
thedjpetersen
as code owners
June 24, 2026 20:02
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
🚀 Vercel Preview Deployment
|
Replace the hardcoded Butter hex values for the swatches + "Aa" wordmark with the theme's own CSS vars (--color-accent, --color-background-yellow, --color-background-body), resolved by wrapping the rail in a Butter <Theme> scope. Keeps the same appearance but stays in sync with the theme and follows light/dark like the rest of the preview. Co-authored-by: Cursor <[email protected]>
Fix now-stale comments (the swatch rail is theme-token-driven and wrapped in a Butter <Theme> scope, not "static"/outside-scope) and tighten a few verbose preview-replacement notes. Co-authored-by: Cursor <[email protected]>
josephfarina
approved these changes
Jun 24, 2026
3 tasks done
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.
Summary
Replaces the two baked PNGs on the home page Features bento (
/feature-brand.png,/feature-templates.png) with live, dark-mode-aware previews built from the real components/templates.ThemesPreview): renders the real/themesThemeShowcaseStore(Butter theme + content) in a<Theme>scope, fluidly scaled to a miniature cropped to the first section (nav + hero + product cards). AnAppShellMobileContextoverride forces the store's desktop grid so it doesn't collapse inside the scaled tile. Static Butter swatches + script "Aa" rail. Left-anchored/bled on the narrow 3-column card, centered on the wide single-column card, bottom-anchored, with an elevation shadow.TemplatesPreview): a grid of live, scaled-down real page templates viaTemplateThumbnail, framed as elevated tiles. Narrow desktop card → 2-up rows (the middle row is 3-up with the login template centered), uniform tile size. Wide single-column card → dissolves into a 3-per-line × 2-row grid (one template dropped to avoid an orphan).TemplateThumbnail: adds optionalaspectRatio,renderWidth(full-page miniature vs. the legacy zoomed-in slice), andborderRadiusprops. Defaults preserve existing/templatesusage.inert+pointer-events: none(decorative, non-interactive).Both previews are responsive via container queries (keyed to the card width, not the viewport), so they look right in the narrow 3-column bento and the wide single-column stack.
Test plan
/home page renders; Themes + Templates feature cards show live previews (light + dark mode)./themespage still renders correctly (sharedTemplateThumbnailchange is backward-compatible)./templatespage thumbnails unchanged.@container,aspect-ratio,calc(), grid/flex) are supported.🤖 Generated with Cursor
Made with Cursor