mirror of
https://github.com/mmahdium/portfolio.git
synced 2026-08-14 12:12:48 +03:30
style: refine language switcher width and improve PDF resume spacing
- Update LanguageSwitcher component width from 76px to 77px on small screens for better alignment - Adjust PDF generation CSS padding from 1rem to 1.2rem for improved content spacing - Increase section margin-bottom from 1.5rem to 1.85rem for better visual separation - Enhance section heading margins and padding for improved readability - Adjust work experience block spacing from 1rem to 1.15rem - Refine bullet list spacing with margin-bottom increased to 0.38rem - Improve line-height values across paragraphs (1.82rem) and list items (1.52rem) for better readability - Update CSS comments to reflect readability improvements rather than page-fitting constraints - Ensure consistent spacing between web and PDF versions while maintaining 2-page layout
This commit is contained in:
@@ -59,7 +59,7 @@ export default defineEventHandler(async (event) => {
|
||||
// Additional wait to ensure all dynamic content is rendered
|
||||
await new Promise(resolve => setTimeout(resolve, 1000))
|
||||
|
||||
// Inject critical CSS fixes for PDF generation - optimized for exactly 2 pages
|
||||
// Inject critical CSS fixes for PDF generation - balanced spacing like web version
|
||||
await page.addStyleTag({
|
||||
content: `
|
||||
@page {
|
||||
@@ -100,12 +100,12 @@ export default defineEventHandler(async (event) => {
|
||||
}
|
||||
|
||||
.resume-content {
|
||||
padding: 1rem !important;
|
||||
padding: 1.2rem !important;
|
||||
}
|
||||
|
||||
/* Balanced spacing for sections - fits exactly 2 pages */
|
||||
/* Balanced spacing for sections - fits exactly 2 pages with better readability */
|
||||
section {
|
||||
margin-bottom: 1.5rem !important;
|
||||
margin-bottom: 1.85rem !important;
|
||||
page-break-inside: auto !important;
|
||||
break-inside: auto !important;
|
||||
}
|
||||
@@ -116,38 +116,38 @@ export default defineEventHandler(async (event) => {
|
||||
|
||||
/* Section titles */
|
||||
section h2 {
|
||||
margin-bottom: 0.7rem !important;
|
||||
padding-bottom: 0.3rem !important;
|
||||
margin-bottom: 0.85rem !important;
|
||||
padding-bottom: 0.38rem !important;
|
||||
page-break-after: avoid !important;
|
||||
break-after: avoid !important;
|
||||
}
|
||||
|
||||
/* Work experience job blocks */
|
||||
section > div {
|
||||
margin-bottom: 1rem !important;
|
||||
margin-bottom: 1.15rem !important;
|
||||
}
|
||||
|
||||
section > div:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
/* Bullet lists */
|
||||
/* Bullet lists - balanced breathing room */
|
||||
ul {
|
||||
margin-top: 0.5rem !important;
|
||||
margin-top: 0.58rem !important;
|
||||
}
|
||||
|
||||
ul li {
|
||||
margin-bottom: 0.25rem !important;
|
||||
line-height: 1.45 !important;
|
||||
margin-bottom: 0.38rem !important;
|
||||
line-height: 1.52 !important;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
/* Summary paragraph - more line height */
|
||||
/* Summary paragraph - good line height for readability */
|
||||
section > p {
|
||||
line-height: 1.75 !important;
|
||||
line-height: 1.82 !important;
|
||||
}
|
||||
`,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user