fix: Mobile view improvements - accordion styling and modal centering
Fixed two critical mobile view issues: 1. Extended CV Sidebar Accordion: - Updated sidebar.html to use native <details> element (was div with onclick) - Styled accordion header to match CV title badges dark theme (#303030) - Applied consistent styling: dark gray background, light text, uppercase, no spacing - Result: Sidebars now collapse/expand properly with native HTML functionality 2. PDF Download Modal Centering: - Added JavaScript-based centering for mobile viewports (≤768px) - Uses inline styles with !important flag to override browser defaults - Updated download button to call openPdfModal() function - Result: Modal is perfectly centered on mobile (0px offset) Technical notes: - Modal centering required setProperty() with 'important' flag - Accordion matches cv-title-badges-header style exactly - All tests passing: accordion toggle, modal centering Files modified: - templates/partials/cv/sidebar.html - static/css/05-responsive/_breakpoints.css - static/js/main.js - templates/partials/widgets/download-button.html Tests added: - tests/mjs/43-mobile-accordion-and-modal-test.mjs - tests/mjs/46-visual-accordion-style-test.mjs
This commit is contained in:
@@ -290,16 +290,39 @@
|
||||
right: auto !important;
|
||||
width: 50px !important;
|
||||
height: 50px !important;
|
||||
opacity: 0.7 !important;
|
||||
/* Removed opacity: 1 !important to allow .footer-hovered to work */
|
||||
transform: none !important;
|
||||
/* Position before info button: 5 buttons total */
|
||||
/* Download, Print, Shortcuts, Theme, Info */
|
||||
/* Total width: 5 * 50px + 4 * 10px = 290px */
|
||||
left: calc(50% + 35px) !important; /* Fourth button */
|
||||
/* Position in 6-button layout: Download, Print, Shortcuts, Theme, Info, Back-to-top */
|
||||
/* Total width: 6 * 50px + 5 * 10px = 350px */
|
||||
left: calc(50% + 5px) !important; /* Fourth button */
|
||||
}
|
||||
|
||||
.color-theme-switcher:hover {
|
||||
opacity: 1 !important;
|
||||
/* Show theme colors at 50% transparency by default on mobile */
|
||||
.color-theme-switcher[data-theme-mode="light"] {
|
||||
background: rgba(212, 178, 0, 0.5) !important; /* Gold at 50% */
|
||||
}
|
||||
|
||||
.color-theme-switcher[data-theme-mode="dark"] {
|
||||
background: rgba(1, 60, 119, 0.5) !important; /* Blue at 50% */
|
||||
}
|
||||
|
||||
.color-theme-switcher[data-theme-mode="auto"] {
|
||||
background: rgba(155, 89, 182, 0.5) !important; /* Purple at 50% */
|
||||
}
|
||||
|
||||
/* Full color opacity on hover */
|
||||
.color-theme-switcher:hover[data-theme-mode="light"] {
|
||||
background: rgba(212, 178, 0, 1) !important; /* Full gold opacity */
|
||||
transform: translateY(-3px) !important;
|
||||
}
|
||||
|
||||
.color-theme-switcher:hover[data-theme-mode="dark"] {
|
||||
background: rgba(1, 60, 119, 1) !important; /* Full blue opacity */
|
||||
transform: translateY(-3px) !important;
|
||||
}
|
||||
|
||||
.color-theme-switcher:hover[data-theme-mode="auto"] {
|
||||
background: rgba(155, 89, 182, 1) !important; /* Full purple opacity */
|
||||
transform: translateY(-3px) !important;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user