Repository navigation
Add print / save-as-PDF button (v1.2.0) - #12
Merged
Merged
Conversation
Add a floating printer-icon button to the CV layout that opens the browser's native print dialog via window.print(). It is pinned to the bottom-right corner on screen and hidden from the printed output itself through the existing @media print block, so it never shows up in the PDF/printout. The button carries the same data-ym-goal / data-goatcounter-click hooks as the other contact and social actions so the click is tracked, and exposes an aria-label/title for accessibility. Bump VERSION to 1.2.0 (additive feature) and document it in the changelog and README. https://claude.ai/code/session_01HiSz9TstL29dWNBT1xB5wA
Captures the floating print/save-as-PDF button in context (full-page viewport) and its default + hover/focus (color-inverted) states, so the README feature line for the print button has a visual reference.
Member
Author
|
Verified locally:
Full page — printer-icon button pinned to the bottom-right: Default vs. hover/focus — color-inverted on interaction, matching the CSS: I also pushed these PNGs to docs/screenshots/ and embedded them in the README feature line for the print button — see commit 037c695. Happy to drop that commit if you'd rather keep the screenshots out of the repo. |
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.


What
Adds a floating printer-icon button to the CV layout that opens the browser's native print / save-as-PDF dialog via
window.print().[printer button] — a round icon button pinned to the bottom-right corner on screen.
Why
The theme is already "Print/PDF friendly", but there was no in-page affordance to actually trigger printing — users had to know the
Ctrl/Cmd+Pshortcut. This adds a one-click control while keeping the printed output itself unchanged.How
_layouts/cv.html— a<button class="cv-print-button" onclick="window.print()">with a stroke-based printer SVG, placed at the top of the<article class="cv">. It carriesaria-label/titlefor accessibility and the samedata-ym-goal/data-goatcounter-clickhooks as the other contact/social actions, so the click is tracked consistently.assets/css/main.scss—.cv-print-buttonstyles (round, fixed bottom-right, hover/focus color invert, simple CSS transition) and adisplay: none !importantrule inside the existing@media printblock so the button never appears in the PDF/printout.VERSION1.1.4 → 1.2.0 (additive feature → MINOR), plusCHANGELOG.mdand the README feature list.It's a progressive enhancement: the native dialog is the only way to trigger print programmatically, and
Ctrl/Cmd+Pstill works if JavaScript is disabled.Verification
Built the bundled demo site exactly as CI does (
jekyll build --config _config.demo.yml,JEKYLL_ENV=production) — build succeeds, and the rendered output confirms:index.htmlcontains the button withonclick="window.print()",main.csscontains the.cv-print-buttonrules, and@media printblock hides it.Rollout note
alex-cvconsumes this theme as a gem pinned to a release tag, so it won't pick up the button until a v1.2.0 tag is cut and itsGemfileis bumped. Happy to open that follow-up PR onalex-cvonce the tag exists.https://claude.ai/code/session_01HiSz9TstL29dWNBT1xB5wA
Generated by Claude Code