d220546d02
**Bug 1: Bidirectional Hover Sync** - Fixed hover sync to work in BOTH directions - Hovering left buttons → highlights menu buttons (was working) - Hovering menu buttons → highlights left buttons (NOW WORKING) - Added .download-btn and .print-friendly-btn to syncPdfHover/syncPrintHover selectors **Bug 2: Theme-Aware CV Text Colors** - CV content text now adapts to light/dark themes - Light theme: Dark text (#1a1a1a, #333333) for readability - Dark theme: Light text (#e0e0e0, #d0d0d0) for readability - Added theme-specific overrides for --text-dark and --text-gray variables - Solution uses CSS variables (not hardcoded) for future flexibility Changes: - static/hyperscript/hover-sync._hs: Added left-side button selectors - static/css/color-theme.css: Added legacy variable overrides for all themes
58 lines
1.7 KiB
Plaintext
58 lines
1.7 KiB
Plaintext
-- ==============================================================================
|
|
-- CV Site - Hover Synchronization Functions
|
|
-- ==============================================================================
|
|
-- Synchronize hover states between action bar and hamburger menu buttons
|
|
-- Migrated from JavaScript (cv-functions.js) after confirming no def limit
|
|
|
|
-- ==============================================================================
|
|
-- PDF BUTTON HOVER SYNC
|
|
-- ==============================================================================
|
|
|
|
def syncPdfHover(show)
|
|
-- Select all PDF buttons (left side + action bar + menu)
|
|
set pdfButtons to <.download-btn, .pdf-btn, .menu-pdf-btn/>
|
|
|
|
if show is true
|
|
for btn in pdfButtons
|
|
add .pdf-hover-sync to btn
|
|
end
|
|
else
|
|
for btn in pdfButtons
|
|
remove .pdf-hover-sync from btn
|
|
end
|
|
end
|
|
end
|
|
|
|
-- ==============================================================================
|
|
-- PRINT BUTTON HOVER SYNC
|
|
-- ==============================================================================
|
|
|
|
def syncPrintHover(show)
|
|
-- Select all Print buttons (left side + action bar + menu)
|
|
set printButtons to <.print-friendly-btn, .print-btn, .menu-print-btn/>
|
|
|
|
if show is true
|
|
for btn in printButtons
|
|
add .print-hover-sync to btn
|
|
end
|
|
else
|
|
for btn in printButtons
|
|
remove .print-hover-sync from btn
|
|
end
|
|
end
|
|
end
|
|
|
|
-- ==============================================================================
|
|
-- ZOOM CONTROL HIGHLIGHT
|
|
-- ==============================================================================
|
|
|
|
def highlightZoomControl(show)
|
|
set zoomWrapper to #zoom-wrapper
|
|
|
|
if show is true
|
|
add .highlight to zoomWrapper
|
|
else
|
|
remove .highlight from zoomWrapper
|
|
end
|
|
end
|