Skip to content

CV Download as PDF button + print stylesheet#9

Merged
lebedevilya merged 9 commits into
mainfrom
cv-pdf-download
May 26, 2026
Merged

CV Download as PDF button + print stylesheet#9
lebedevilya merged 9 commits into
mainfrom
cv-pdf-download

Conversation

@lebedevilya

Copy link
Copy Markdown
Owner

Adds a 'Download PDF' button to every CV variant (/cv, /cv_fullstack, /cv_backend, /cv_pm). Click triggers window.print(); the user chooses 'Save as PDF' in the system dialog.

Implementation

  • src/components/cv/DownloadPdfButton.astro: a small outline button with a download icon. Hidden in print output via Tailwind's print:hidden variant.
  • src/styles/global.css: print stylesheet that strips site chrome (sidebar, theme toggle, mobile header, site footer), forces light theme for print regardless of user preference, collapses the drawer/main to full page width, tightens CV typography to 10pt body / 18pt h1 / 13pt h2, and pulls the on-screen mb-10/mb-5 section spacings down to pt-scale values.
  • TimeLineElement entries (jobs) are tagged with break-inside: avoid so individual jobs don't split across pages.
  • @page A4 with 14mm margins.

How to test

  1. Pull this branch and npm run build && npm run preview
  2. Visit any CV variant, eg http://localhost:4321/cv
  3. Click 'Download PDF'
  4. In the print dialog: 'Save as PDF', A4 paper size, default margins
  5. Confirm the output is two pages

Iteration plan

The .print-hide class is reserved as a marker for any sections we want to trim from print output if the first preview still spills onto a third page. Likely candidates if needed:

  • 'Earlier Experience' (2019-2021 contractor stints) and 'Internships & Early Career' on the experience section
  • Some Core Skills bullets

After your first 'Save as PDF' attempt, tell me how many pages and which sections look loose; I'll add print-hide to specific blocks.

Each CV (cv, cv_fullstack, cv_backend, cv_pm) gets a Download PDF
button at the top of the content area. Click triggers window.print();
the user picks 'Save as PDF' in the system print dialog.

Print stylesheet in src/styles/global.css:
- Hides site chrome on print (sidebar, theme toggle, mobile header,
  site footer, and the Download button itself via print:hidden)
- Forces light theme for print regardless of user preference
- Collapses the drawer/main to full page width and removes screen
  margins so the page fills the printable area
- Tightens CV typography (10pt body / 18pt h1 / 13pt h2) and shrinks
  the on-screen mb-10/mb-5 section spacings to pt-scale values
- TimeLineElement entries are flagged with break-inside: avoid so
  individual jobs don't split across pages
- @page A4 with 14mm margins

The .print-hide class is reserved as a marker for any individual
sections we want to trim from the print output if the live CV still
doesn't fit two pages on first preview. Iteration based on user
report once they've actually tested 'Save as PDF'.
@netlify

netlify Bot commented May 25, 2026

Copy link
Copy Markdown

Deploy Preview for grand-croquembouche-1d568d ready!

Name Link
🔨 Latest commit 5107050
🔍 Latest deploy log https://app.netlify.com/projects/grand-croquembouche-1d568d/deploys/6a155ecc7b9c1700084948f5
😎 Deploy Preview https://deploy-preview-9--grand-croquembouche-1d568d.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44c89fa9fa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/styles/global.css
… page-break rules

Three issues from the first PDF preview:

1. Codex P2: ThemeToggle button (fixed top-4 right-4 directly under
   <body>) was still rendering in print, overlaying every page.
   Added print:hidden to its class.

2. Browser-injected page title 'Resume | Ilya Lebedev' showed as a
   header on every printed page. CSS can't suppress that header
   (it's a browser-level affordance from the print dialog), but
   blanking document.title via beforeprint / afterprint events
   takes the visible string away. Title is restored as soon as the
   print dialog closes.

3. 25% blank space at the bottom of each page + 3 pages instead of
   2 was caused by 'break-inside: avoid' on every TimeLineElement
   entry: long job blocks jumped to the next page whole rather than
   splitting, leaving slack. Replaced with 'break-after: avoid' on
   h1/h2 only (keeps section headings glued to their first content)
   and tightened paragraph internals.
…toggle

The theme toggle floats top-right at fixed top-4 right-4. The Download PDF
button was right-aligned in the document flow at the same edge, so they
overlapped on screen. Switching to justify-start puts the button on the
opposite side from the toggle. They now split the top bar cleanly: button
top-left in the content area, toggle top-right of the viewport.
…r + internships

Layout:
- Download PDF button is now fixed top-20 right-4 (just below the
  size-12 theme toggle at top-4 right-4). Matches the toggle's
  translucent backdrop + border + shadow so they read as a small
  stacked pair of page-actions at the top-right. No more collision
  with content, no left-aligned 'floating in the page' feel.

Print fixes:
- Header.astro is a <div class="sticky lg:hidden"> not a real
  <header>, so my print CSS rule 'header { display: none }' didn't
  catch it. Added print:hidden to that wrapper so the mobile navbar
  ('Ilya Lebedev ⚡️') no longer appears at the top of every printed
  page.
- Wrapped the 'Internships & Early Career' TimeLineElement in
  <div class="print-hide"> across all four CV variants so the
  printed PDF skips it. Internships from 2017-2019 add little to a
  recruiter's read for an 8+ year senior engineer; on screen they
  stay visible for the full career story.
…v + cv_backend

Profile sections no longer repeat the Arbitrum grant + Node NFT story
(still present as a bullet under nodes.garden in Experience and as the
project description in Selected Projects, so the info is not lost).

Also:
- cv.astro Profile collapsed from 4 sentences to a clean 4-sentence
  paragraph that no longer says 'Senior Backend Engineer' and then
  'Backend engineer with a Ruby/Rails background...' back to back.
- cv_backend.astro Profile merged 'Strong experience with PostgreSQL...'
  and 'Experienced in owning backend systems...' into one ownership
  sentence (architecture, PostgreSQL data modeling, background processing,
  integrations, performance, deployment, monitoring).
- cv_fullstack.astro and cv_pm.astro Profile sections just have the
  Arbitrum/NFT clause clipped from the Ex-founder sentence; the rest is
  already non-repeating.
For applications to non-Rails roles, the Profile shouldn't lead with
a specific stack. Stack details still live in Experience bullets and
the Tech: line under each job, plus the Core Skills section.

Replaces 'Ruby on Rails systems' / 'Ruby on Rails applications' /
'Rails apps end-to-end' with the role-appropriate SaaS framing across
cv, cv_backend, and cv_fullstack. cv_pm already opened with the
generic 'infrastructure-heavy software products', unchanged.
Reads more naturally as first-person-implied (matches the cv.astro
Profile's 'Comfortable ramping into new stacks quickly and owning...').
Past-tense 'Owned X' bullets under specific past jobs are unchanged.
Replaces the 'Production experience across X / Comfortable ramping into
new stacks' template prose with copy that mirrors the voice from the
job-application letters (concrete tech list, hands-on AI/LLM tooling,
casual 'happy to pick up any tech stack' instead of apologetic 'comfortable
ramping'). Final cv.astro Profile reads:

  Senior backend engineer with 8+ years building and scaling production
  SaaS systems and distributed infrastructure. Ex-founder (Techstars
  Web3 '25): built and scaled an infrastructure-heavy platform to 18,000+
  users and 25,000+ deployed nodes. Fluent across Ruby, Python and
  JavaScript on APIs (REST/GraphQL), background workers, data pipelines
  and integrations. Hands-on with LLM orchestration, RAG and AI coding
  tools; happy to pick up any tech stack.
…ullstack/PM

cv_backend: appends 'Hands-on with LLM orchestration, RAG and AI coding
tools; happy to pick up Go or any other stack the role needs' after the
ownership sentence.

cv_fullstack: drops the Rails-specific 'Strong focus on Ruby on Rails...'
in favour of 'Fluent across Ruby, Python and JavaScript end-to-end
(UI through APIs and infrastructure); ship features without
overcomplicating the stack. Hands-on with LLM orchestration, RAG and
AI coding tools; happy to pick up any tech stack.'

cv_pm: prepends the AI/stack-fluency clause before the 'looking for X
roles' pitch: 'Hands-on with LLM orchestration, RAG and AI tooling;
fluent in the engineering language across Ruby, Python and JavaScript.'
This makes the PM profile read as someone who can speak engineering
fluently, which matters for technical-PM roles in AI-heavy products.

All four CVs now lead with role + scale + ex-founder, then close with
the AI/stack-range tail in the same voice as the job-application
letters.
@lebedevilya lebedevilya merged commit ed5d954 into main May 26, 2026
6 checks passed
@lebedevilya lebedevilya deleted the cv-pdf-download branch May 26, 2026 09:00
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.

1 participant