feat(cms): redesign article thumbnail generator for new corporate design#35
Conversation
Replaces the old gradient/blob/preset thumbnail with the new design language from web/design.md: flat surface, hairline frame, tertiary corner registration marks, mono \ EYEBROW thread, Geist Sans title + subtitle, JHB primary square mark in the bottom-left. Endpoint shape narrows to title/subtitle/eyebrow/theme — the obsolete background.preset/colors/accents/pattern/noise options are dropped since the new system has no gradients or accent fills.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Code Review — PR #35: Redesign thumbnail generator with corporate design systemOverviewClean, well-scoped redesign. Removing the multi-preset gradient/blob system in favour of two opinionated theme palettes is a clear simplification, and the new frame/eyebrow layout aligns with the site's visual identity. The diff is easy to follow and the deleted code (noise tile, blob SVG filters, preset resolver) is straightforwardly removed without loose ends. Potential Bugs1. Font family name resolved from TTF metadata, not cache filename resvg resolves font-family="Geist Mono"Geist Mono TTFs from Google Fonts typically report 2. Stale rejected promise in
fontPathsPromise = (async () => {
// ... fetch can throw or return !res.ok
})()
return fontPathsPromiseIf a font fetch fails (transient network error), the rejected promise is permanently cached for the lifetime of the function instance. All subsequent requests will hit the same rejection without retrying. The previous code had the same issue — but since this endpoint is being touched, it's worth fixing: fontPathsPromise = (async () => { ... })().catch((err) => {
fontPathsPromise = null
throw err
})3.
Performance Considerations
Security Considerations
Minor Style Notes
Summary
🤖 Generated with Claude Code |
Overhauls the article thumbnail generator to align with the JHB corporate design system, replacing the previous gradient/blob background system with a clean, frame-based layout using the design tokens.
Summary
The thumbnail endpoint has been completely redesigned to match the corporate visual identity. Instead of customizable gradient backgrounds with optional blob overlays, thumbnails now feature a consistent hairline frame with corner registration marks, a mono eyebrow label, and the JHB mark anchored in the bottom-left. The design supports two themes (light/dark) that map to the design system's color tokens.
Key Changes
BackgroundInputtype with its preset/pattern/colors/accents/noise options. Replaced with simplethemeparameter ('light'|'dark')ThemePalettetype mapping design tokens (background, border, cornerMark, eyebrow, subtitle, title, etc.) to specific colors per themeLOGO_INNER)backgroundobject parameter; now acceptseyebrow(string, defaults to 'ARTICLE') andtheme(enum)Implementation Details
/tmppersists across function invocations for performancehttps://claude.ai/code/session_01TYfRa7SiLgA62om3QamM4h