d2330f5d48
BREAKING: Removed JavaScript toggle functions in favor of organized Hyperscript architecture Changes: - Created organized Hyperscript file structure (no def limit with latest version): • static/hyperscript/utils._hs (utility functions) • static/hyperscript/toggles._hs (CV length, icons, theme toggles) • static/hyperscript/hover-sync._hs (PDF/Print hover sync + zoom highlight) - Removed functions._hs (renamed to utils._hs for better organization) - Emptied static/js/cv-functions.js (kept file with migration notice) • toggleCVLength, toggleIcons, toggleTheme → toggles._hs • syncPdfHover, syncPrintHover, highlightZoomControl → hover-sync._hs - Updated templates/index.html to load all 3 new hyperscript files - Updated tests/mjs/1-toggles.test.mjs for responsive design • Added viewport detection for desktop vs mobile toggles • Tests now adapt to screen size Rationale: - Test 9 confirmed NO def limit with latest hyperscript (tested up to 5 defs) - Better separation of concerns with category-based file organization - Aligns with server-side hypermedia pattern (HTMX + Hyperscript) - Eliminates workaround JavaScript duplication - 9 total def statements across 3 files (proving no limit) Verified: ✅ All hyperscript files load successfully (HTTP 200) ✅ Hyperscript library loads without errors ✅ Functions work correctly in browser ✅ No console errors ✅ Test 9 (def limit) passes with 5 def statements Related: Test 9 verification (tests/mjs/9-hyperscript-def-limit.test.mjs)
25 lines
937 B
JavaScript
25 lines
937 B
JavaScript
/**
|
|
* CV Site - Core Functions
|
|
* =========================
|
|
*
|
|
* MIGRATION NOTICE (2025-11-17):
|
|
* ==============================
|
|
* Toggle and hover sync functions have been migrated to Hyperscript.
|
|
*
|
|
* Previous functions (now in hyperscript files):
|
|
* - toggleCVLength() → static/hyperscript/toggles._hs
|
|
* - toggleIcons() → static/hyperscript/toggles._hs
|
|
* - toggleTheme() → static/hyperscript/toggles._hs
|
|
* - syncPdfHover() → static/hyperscript/hover-sync._hs
|
|
* - syncPrintHover() → static/hyperscript/hover-sync._hs
|
|
* - highlightZoomControl() → static/hyperscript/hover-sync._hs
|
|
*
|
|
* Reason for migration:
|
|
* - Latest hyperscript version has NO def statement limit
|
|
* - Test verified: 5 def statements work perfectly
|
|
* - Better separation of concerns with organized hyperscript files
|
|
* - Server-side hypermedia pattern alignment
|
|
*
|
|
* This file is kept for future JavaScript-only functionality if needed.
|
|
*/
|