From 55f05280bf066a616629b2a5a571559d5a777624 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 27 Jul 2026 18:18:15 +0000 Subject: [PATCH] Scale published resumes to the viewport width The published resume page rendered the sheet at its natural 8.5in width, so on a desktop viewport the CV sat small in the middle of the page and readers had to zoom in. Wrap the desktop sheet in a stage that measures the width available to it and scales the page up to fill it, capped at twice the page width so the type stays sane on ultrawide displays. A CSS breakpoint ladder supplies a close approximation before hydration (and when JavaScript is unavailable), and the measured value takes over once the stage is observed. The footer actions now share the same column as the sheet instead of a fixed 816px, so the PDF link stays aligned with the page edge at every width. Print output is unchanged: the print stylesheet already resets the sheet transform and the paper frame back to natural size. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01M7fKRZGJ2XH6E4AXktKRzN --- .../public-resume-footer-actions.tsx | 9 +-- .../_components/public-resume-renderer.tsx | 10 ++- src/app/_components/public-resume-stage.tsx | 80 +++++++++++++++++++ src/app/globals.css | 63 +++++++++++++++ 4 files changed, 153 insertions(+), 9 deletions(-) create mode 100644 src/app/_components/public-resume-stage.tsx diff --git a/src/app/_components/public-resume-footer-actions.tsx b/src/app/_components/public-resume-footer-actions.tsx index 27db508..dbdb956 100644 --- a/src/app/_components/public-resume-footer-actions.tsx +++ b/src/app/_components/public-resume-footer-actions.tsx @@ -1,15 +1,14 @@ "use client"; import { DownloadIcon } from "@/app/_components/cv-studio-ui"; +import { publicResumeColumnClass } from "@/app/_components/public-resume-stage"; import { downloadPdfFromUrl } from "@/app/_lib/pdf-download-client"; import { buildResumePdfDownloadUrl } from "@/app/_lib/resume-print-url"; import Link from "next/link"; export function PublicResumeFooterActions({ - pageWidth, showBranding, }: { - pageWidth: number; showBranding: boolean; }) { const handleDownloadPdf = async () => { @@ -28,8 +27,7 @@ export function PublicResumeFooterActions({ if (!showBranding) { return (