Skip to content

Commit 89503fa

Browse files
benbalterCopilot
andcommitted
Optimize resume for print-to-PDF: include name + tighten layout
Prints of /resume/ previously rendered 'Resume' as the page title with no contact info, no name, and the on-screen spacing/font-sizes unchanged. Saving to PDF from the browser produced something that didn't look like a résumé. Print-specific changes (screen rendering unchanged): - Add a print-only header with name, location, email, site URL, and LinkedIn URL across the top - Hide the on-screen 'Resume' page H1 in print (now redundant) - Set @page margins to 0.6in / 0.65in for a standard letter layout - Drop point sizes across the board for density (11pt section heads, 10.5pt position titles, 10pt bullets, 9.5pt dates) - Tighten section and bullet spacing - Restyle the summary as italicized inline prose rather than a colored callout box - Add page-break-inside: avoid to positions, employer groups, education entries, and certifications - Suppress the decorative (url) suffix on certification and contact-strip links - Hide the on-screen 'also on LinkedIn / print to PDF' helper in print Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f55759b commit 89503fa

1 file changed

Lines changed: 172 additions & 6 deletions

File tree

src/pages/resume.astro

Lines changed: 172 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,19 @@ const resumeSchema = generateResumeSchema({
6565
---
6666

6767
<PageLayout title={title} description={description} suppressPersonSchema>
68+
<header class="print-header">
69+
<h1 class="print-name">Ben Balter</h1>
70+
<p class="print-contact">
71+
Washington, DC
72+
<span aria-hidden="true"> · </span>
73+
<a href="mailto:ben@balter.com">ben@balter.com</a>
74+
<span aria-hidden="true"> · </span>
75+
<a href="https://ben.balter.com">ben.balter.com</a>
76+
<span aria-hidden="true"> · </span>
77+
<a href="https://www.linkedin.com/in/benbalter/">linkedin.com/in/benbalter</a>
78+
</p>
79+
</header>
80+
6881
{summary && (
6982
<section class="resume-section resume-summary">
7083
<p class="summary-text">{summary}</p>
@@ -475,35 +488,188 @@ const resumeSchema = generateResumeSchema({
475488
}
476489
}
477490

491+
/* ============================================================
492+
* Print-only header (hidden on screen)
493+
* ============================================================ */
494+
.print-header {
495+
display: none;
496+
}
497+
478498
/* ============================================================
479499
* Print
480500
* ============================================================ */
481501
@media print {
502+
@page {
503+
margin: 0.6in 0.65in;
504+
}
505+
506+
/* Show the print-only header with name + contact strip */
507+
.print-header {
508+
display: block;
509+
margin: 0 0 1rem;
510+
padding-bottom: 0.75rem;
511+
border-bottom: 2px solid #000;
512+
}
513+
514+
.print-name {
515+
margin: 0 0 0.25rem;
516+
font-size: 22pt;
517+
font-weight: 700;
518+
letter-spacing: -0.01em;
519+
color: #000;
520+
}
521+
522+
.print-contact {
523+
margin: 0;
524+
font-size: 9.5pt;
525+
color: #333;
526+
}
527+
528+
.print-contact a {
529+
color: #333;
530+
text-decoration: none;
531+
}
532+
533+
/* Hide the onscreen "Resume" page H1 — redundant with the name block */
534+
:global(article > header),
535+
:global(article > header h1) {
536+
display: none !important;
537+
}
538+
539+
/* Hide the "also on LinkedIn / print to PDF" helper — already printing */
540+
.resume-aux {
541+
display: none !important;
542+
}
543+
544+
/* Tighter summary card in print */
545+
.resume-summary {
546+
background-color: transparent !important;
547+
border-left: none !important;
548+
padding: 0 !important;
549+
margin-bottom: 0.75rem;
550+
}
551+
552+
.summary-text {
553+
font-size: 10.5pt;
554+
font-style: italic;
555+
}
556+
557+
/* Density: smaller base, tighter margins */
558+
.resume-section {
559+
margin-bottom: 1rem;
560+
}
561+
482562
.resume-section h2 {
563+
font-size: 11pt;
564+
margin-top: 0.75rem;
565+
margin-bottom: 0.4rem;
566+
padding-bottom: 0.2rem;
483567
border-bottom-color: #000;
484568
}
485569

486570
.employer-group {
487-
border-left: 2px solid #ccc;
571+
border-left: 1px solid #bbb;
572+
padding-left: 1rem;
573+
margin-bottom: 0.75rem;
574+
page-break-inside: avoid;
575+
}
576+
577+
.employer-name {
578+
font-size: 12pt;
579+
margin-top: 0;
580+
margin-bottom: 0.35rem;
581+
}
582+
583+
.position {
584+
margin-bottom: 0.6rem;
585+
padding-bottom: 0.5rem;
586+
page-break-inside: avoid;
587+
border-bottom-color: #eee;
588+
}
589+
590+
.position-title {
591+
font-size: 10.5pt;
592+
font-weight: 600;
488593
}
489594

490595
.position-header::before {
596+
width: 6px;
597+
height: 6px;
491598
background-color: #333;
599+
top: 0.4rem;
492600
}
493601

494602
.date-badge {
495-
background-color: transparent;
496-
color: #333;
497-
padding: 0;
603+
background-color: transparent !important;
604+
color: #333 !important;
605+
padding: 0 !important;
606+
font-size: 9pt;
607+
font-style: italic;
498608
}
499609

500-
.position {
501-
border-bottom-color: #eee;
610+
.position-content {
611+
font-size: 10pt;
612+
}
613+
614+
.position-content :global(ul) {
615+
padding-left: 1.1rem;
616+
}
617+
618+
.position-content :global(li) {
619+
margin-bottom: 0.15rem;
620+
}
621+
622+
.skills-grid {
623+
grid-template-columns: repeat(3, 1fr);
624+
gap: 0.75rem;
625+
margin-top: 0.4rem;
626+
}
627+
628+
.skill-group-name {
629+
font-size: 9.5pt;
630+
color: #000;
631+
margin-bottom: 0.2rem;
632+
}
633+
634+
.skill-list {
635+
font-size: 9.5pt;
636+
}
637+
638+
.skill-list li {
639+
margin-bottom: 0;
502640
}
503641

504642
.education-item,
505643
.certification-item {
644+
margin-bottom: 0.4rem;
645+
padding-bottom: 0.35rem;
506646
border-bottom-color: #eee;
647+
page-break-inside: avoid;
648+
}
649+
650+
.school-name {
651+
font-size: 11pt;
652+
}
653+
654+
.cert-group-heading {
655+
font-size: 9.5pt;
656+
color: #000;
657+
margin-top: 0.5rem;
658+
margin-bottom: 0.25rem;
659+
}
660+
661+
.certification-authority {
662+
font-size: 8.5pt;
663+
}
664+
665+
.certification-name {
666+
font-size: 10pt;
667+
}
668+
669+
/* Don't suffix cert/LinkedIn links with their long URLs in print */
670+
.certification-name a::after,
671+
.print-contact a::after {
672+
content: none !important;
507673
}
508674
}
509675
</style>

0 commit comments

Comments
 (0)