Serve every resume design as a selectable theme - #54
Merged
Merged
Conversation
Replace the one-design Worker with a theme system so alternative layouts can be previewed on the live site instead of living in open PRs. - scripts/embed.mjs bundles resume.html plus every themes/*.html into themes.embedded.json, with one copy of the fonts and photo. Each theme declares <meta name="theme-name"> / <meta name="theme-description">; the build refuses a theme without them or without exactly one literal <head>, <body> and <style>. - The Worker splices fonts and photo into a theme at request time and serves the default at / and /Aswin_Resume.pdf as before, every other theme at /themes/<id> and /themes/<id>/Aswin_Resume.pdf, and an index at /themes. PDFs are cached in KV per theme-content hash. - The top bar gains a theme picker with prev/next arrows (and left/right keys). On narrow screens non-default themes scale to fit the viewport while the bar and chat bubble stay full size; the default theme keeps its hand-tuned phone reflow. - The photo file is a PNG despite its .jpg name; the data URI now says so. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
resume | 0ac616a | Commit Preview URL Branch Preview URL |
Sep 16 2026, 08:16 AM |
Aswincloud-Bot
approved these changes
Sep 16, 2026
Aswincloud-Bot
left a comment
There was a problem hiding this comment.
Auto-approved: @Aswinmcw is a member of @Aswincloud/admins.
This was referenced Sep 16, 2026
Merged
Merged
Merged
Merged
Merged
Merged
Merged
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.
Why
Twenty alternative layouts sit in open PRs (#16–#25, #36–#47), each replacing
resume.html, and half of them have drifted into conflict. This makes every design a first-class theme on the live site so they can all be previewed from one page, and each design PR can then land as a one-file addition instead of a rewrite.What
resume.html(default, idnavy) plus everythemes/NN-<id>.html. A theme is a standalone A4 page that declares<meta name="theme-name">and<meta name="theme-description">.scripts/embed.mjsbundles them all intothemes.embedded.jsonwith one copy of the fonts and the 1.2 MB photo, and fails the build on a theme missing its metadata or lacking exactly one literal<head>,<body>,<style>./and/Aswin_Resume.pdf(existing links unchanged). Other themes at/themes/<id>and/themes/<id>/Aswin_Resume.pdf;/themeslists them all. Fonts and photo are spliced in at request time; PDFs cached in KV per theme-content hash, so editing one theme re-renders only that one.<select>, ‹ › arrows, ← → keys, PDF button for the current theme. Non-default themes zoom to fit narrow screens (bar and chat bubble counter-scaled); the default keeps its phone reflow.photo.jpgis actually a PNG, so its data URI now saysimage/png.build.shtakes an optional theme file. README documents adding a theme.This PR adds no theme files. Each design PR will be updated to add its own
themes/NN-<id>.htmlon top of this, so they merge independently and without conflicts.Test plan
npm run embedwith 0 and 20 extra themes;tsc --noEmitclean.wrangler dev:/,/index.html,/themes,/themes/<id>, trailing slashes, 404 for unknown ids and stray files; picker shows all themes with the current one selected; PDF link points at the current theme; ETag → 304.🤖 Generated with Claude Code