feat: comprehensive print optimization for professional PDF output

Print CSS overhaul:
- Fixed photo aspect ratio (60x80, 3:4 portrait) with contain fit
- Unified font sizes across all sections (10pt titles, 9pt content, 8pt metadata)
- Removed excessive spacing (reduced by 50-70%)
- Applied clean theme automatically (no sidebars, icons, logos, badges)
- Force short version for concise 5-page output
- Natural page breaks (removed forced breaks causing blank spaces)
- Consistent section title spacing with proper breathing room
- Match Training/Skills spacing pattern across all sections
- Fixed Languages and References spacing
- Equalized Experience, Courses, Projects, and Awards formatting
- Single separator for "See all projects" link

UI improvements:
- Enhanced icon toggle visibility with better contrast
- Reorganized navigation menu structure
This commit is contained in:
juanatsap
2025-11-10 14:00:32 +00:00
parent eda746407e
commit 18db4011f8
3 changed files with 852 additions and 190 deletions
+183 -85
View File
@@ -224,7 +224,8 @@ iconify-icon {
justify-content: space-between;
width: 75px;
height: 30px;
background: rgba(255,255,255,0.1);
background: #e0e0e0;
border: 2px solid #d0d0d0;
border-radius: 15px;
padding: 0 6px;
transition: all 0.3s ease;
@@ -250,6 +251,7 @@ iconify-icon {
.icon-toggle input:checked + .icon-toggle-slider {
background: #27ae60;
border-color: #229954;
}
.icon-toggle-slider .icon-left,
@@ -271,18 +273,22 @@ iconify-icon {
.icon-toggle input:not(:checked) + .icon-toggle-slider .icon-left {
color: #333;
font-weight: bold;
}
.icon-toggle input:not(:checked) + .icon-toggle-slider .icon-right {
color: rgba(255,255,255,0.3);
color: #999;
opacity: 0.5;
}
.icon-toggle input:checked + .icon-toggle-slider .icon-left {
color: rgba(255,255,255,0.3);
color: rgba(255,255,255,0.4);
opacity: 0.5;
}
.icon-toggle input:checked + .icon-toggle-slider .icon-right {
color: #333;
color: #fff;
font-weight: bold;
}
.icon-toggle input:focus + .icon-toggle-slider {
@@ -1424,7 +1430,7 @@ footer {
.action-bar-content {
grid-template-columns: 1fr;
gap: 1rem;
padding: 1rem;
padding: 0rem;
}
.language-toggle,
@@ -1445,6 +1451,22 @@ footer {
font-size: 0.9em;
margin-top: 15px;
}
/* ========== Hide header controls, show in menu ========== */
/* Keep language selector visible in header */
.view-controls-center {
display: none !important;
}
.action-buttons-right {
display: none !important;
}
/* Show controls and actions in hamburger menu */
.menu-controls-section,
.menu-actions-section {
display: block !important;
}
}
.no-print {}
@@ -1666,67 +1688,9 @@ a:focus {
}
/* ===============================================
PRINT STYLES - TWO-PAGE LAYOUT
PRINT STYLES - Handled by print.css
=============================================== */
@media print {
body {
background: white;
margin: 0;
padding: 0;
}
.action-bar {
display: none !important;
}
.cv-page {
box-shadow: none;
border: none;
margin: 0 auto;
transform: scale(1);
max-width: 100%;
page-break-after: always;
page-break-inside: avoid;
}
.cv-page.page-2 {
page-break-after: auto;
}
.page-content {
page-break-inside: avoid;
}
.cv-section {
page-break-inside: avoid;
}
/* Ensure footer only on page 2 */
.page-1 .cv-footer {
display: none !important;
}
.cv-footer {
page-break-inside: avoid;
background: #ddd !important;
color: #333 !important;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
a {
text-decoration: none;
font-weight: 800;
color: inherit;
}
/* Set up proper A4 page dimensions */
@page {
size: A4 portrait;
margin: 0.5in;
}
}
/* All print styles consolidated in /static/css/print.css */
/* ===============================================
SECTION STYLES FOR PAGE 2
@@ -2043,14 +2007,14 @@ a:focus {
/* Show menu when hovering menu itself OR when it has the hover class */
.navigation-menu:hover,
.navigation-menu.menu-hover {
max-height: 800px; /* Fixed height for consistent animation timing */
max-height: calc(100vh - 60px); /* Viewport height minus header + some spacing */
pointer-events: auto; /* Enable pointer events when visible */
opacity: 1;
}
/* Legacy class for JS compatibility - keep for backward compatibility */
.navigation-menu.menu-open {
max-height: 800px;
max-height: calc(100vh - 60px);
pointer-events: auto;
opacity: 1;
}
@@ -2090,16 +2054,15 @@ a:focus {
}
/* Menu item action controls (Expand All, Collapse All) */
.menu-item-action span {
width: calc(100% - 65px);
text-align: center;
}
/* Removed centered text styling - action items now behave like regular menu items */
/* Remove extra padding - all menu items should align consistently */
/* Submenu styles - hover triggered */
/* Submenu styles - hover triggered, opens to the right */
.menu-item-submenu {
position: relative;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
padding: 0 0 1rem 0;
}
.menu-item.has-submenu {
@@ -2109,41 +2072,176 @@ a:focus {
.submenu-arrow {
transition: transform 0.2s ease;
margin-left: auto;
}
/* Show submenu on hover */
/* Rotate arrow slightly on hover */
.menu-item-submenu:hover .submenu-arrow {
transform: rotate(180deg);
transform: translateX(3px);
}
.submenu-content {
background-color: rgba(0, 0, 0, 0.02);
max-height: 0;
overflow: hidden;
position: fixed; /* Changed from absolute to fixed to break out of parent overflow */
left: 278px; /* Slight overlap with menu to eliminate any gap */
background: #ffffff;
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
border-radius: 8px;
min-width: 250px;
max-width: 300px;
opacity: 0;
transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
visibility: hidden;
transform: translateX(-3px);
transition: all 0.3s ease;
z-index: 1000; /* Higher z-index to appear above everything */
padding: 0.5rem 0;
max-height: calc(100vh - 100px); /* Ensure it fits viewport */
overflow-y: auto; /* Scroll if content is too long */
}
/* Show submenu when hovering the submenu container */
.menu-item-submenu:hover .submenu-content {
max-height: 600px;
/* Show submenu when hovering the submenu container OR the submenu itself */
.menu-item-submenu:hover .submenu-content,
.submenu-content:hover {
opacity: 1;
visibility: visible;
transform: translateX(0);
}
/* Legacy class for JS compatibility */
.menu-item-submenu.submenu-open .submenu-arrow {
transform: rotate(180deg);
transform: translateX(3px);
}
.menu-item-submenu.submenu-open .submenu-content {
max-height: 600px;
opacity: 1;
visibility: visible;
transform: translateX(0);
}
.submenu-content .menu-item {
padding-left: 3rem;
padding: 0.875rem 1.5rem;
font-size: 0.9rem;
border-left-width: 2px;
border-left: 3px solid transparent;
border-radius: 0;
}
.submenu-content .menu-item:first-child {
border-top-left-radius: 8px;
border-top-right-radius: 8px;
}
.submenu-content .menu-item:last-child {
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}
/* ========== Menu Sections with Separators ========== */
/* Quick Actions section - always visible */
.menu-section-wrapper {
padding: 0.5rem 1.5rem 1rem;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
/* Remove border from last visible section */
.menu-content > *:last-child,
.menu-content > div:last-child {
border-bottom: none !important;
}
/* ========== Menu Controls & Actions (Mobile) ========== */
/* Hidden by default, shown only on mobile (< 900px) */
.menu-controls-section,
.menu-actions-section {
display: none;
padding: 0.5rem 1.5rem 1rem;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.menu-item-header {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.875rem 0 0.875rem 0;
color: var(--text-dark);
font-size: 0.85rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
cursor: default;
}
/* Disable hover effect for headers */
.menu-item-header:hover {
background-color: transparent !important;
color: var(--text-dark) !important;
border-left-color: transparent !important;
}
.menu-item-header iconify-icon {
color: var(--text-gray);
flex-shrink: 0;
}
.menu-item-header:hover iconify-icon {
color: var(--text-gray) !important;
}
.menu-item-header span {
flex: 1;
}
.menu-control-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.75rem 0;
}
.menu-control-label {
display: flex;
align-items: center;
gap: 0.75rem;
color: var(--text-dark);
font-size: 0.9rem;
font-weight: 500;
}
.menu-control-label iconify-icon {
color: var(--text-gray);
}
.menu-action-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
padding: 0.875rem 1rem;
margin: 0.25rem 0;
background: rgba(0, 0, 0, 0.03);
border: none;
border-radius: 8px;
color: var(--text-dark);
text-decoration: none;
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
width: 100%;
}
.menu-action-btn:hover {
background: rgba(0, 102, 204, 0.08);
color: var(--accent-blue);
text-decoration: none;
}
.menu-action-btn iconify-icon {
color: var(--text-gray);
flex-shrink: 0;
transition: color 0.2s ease;
}
.menu-action-btn:hover iconify-icon {
color: var(--accent-blue);
}
/* Section icons in titles */