Commit Graph

318 Commits

Author SHA1 Message Date
juanatsap 585f620bd6 refactor: organize hyperscript code and implement mobile button layout
This commit includes two major improvements:

1. Hyperscript Code Organization:
   - Extracted all hyperscript blocks >3 lines into reusable functions
   - Created 6 new functions in functions._hs:
     * toggleCVLength(isLong) - CV length toggle sync
     * toggleIcons(showIcons) - Icons toggle sync
     * toggleTheme(isClean) - Theme toggle sync
     * syncPdfHover(show) - PDF button synchronized hover
     * syncPrintHover(show) - Print button synchronized hover
     * highlightZoomControl(show) - Zoom control highlight effect
   - Reduced inline hyperscript from 11+ lines to 1-2 lines per element
   - Updated 8 template files to use function calls:
     * hamburger-menu.html
     * view-controls.html
     * action-buttons.html
     * download-button.html
     * print-friendly-button.html
     * zoom-toggle-button.html

2. Mobile Button Layout (max-width: 900px):
   - Repositioned three fixed buttons (PDF, Print, Info) horizontally at bottom center
   - Print button perfectly centered in viewport
   - Download button on left, Info button on right
   - Hidden zoom and shortcuts buttons on mobile (available in hamburger menu)
   - Removed conflicting old mobile styles that were hiding print button
   - Smooth hover transitions maintained with proper transform calculations

Technical details:
- Used CSS transform with calc() for precise horizontal positioning
- Maintained hover effects with combined translateX/translateY transforms
- Ensured accessibility with proper ARIA labels and spacing
- All functions check element existence before manipulation
- LocalStorage sync maintained across desktop/mobile toggles
2025-11-16 14:03:22 +00:00
juanatsap 671f06cd21 feat: add smooth color transitions to action bar buttons
- Added 0.3s ease transitions for background-color and color
- Icons now smoothly transition color as well
- Matches the smooth animations on fixed buttons
- Applies to PDF and Print Friendly buttons in top action bar
2025-11-16 13:48:54 +00:00
juanatsap c456bb1637 fix: remove blue active state from zoom button and restore Show Zoom menu item
- Removed .zoom-active CSS class and JavaScript logic
- Zoom button stays same gray color whether zoom is on or off
- Fixed Show Zoom menu button visibility (changed inline style to zoom-hidden class)
- Menu item now correctly appears when zoom is hidden
2025-11-16 13:32:57 +00:00
juanatsap b9e9e09d71 feat: enhance zoom and print button UX
Print Button Improvements:
- Hover shows white background with green icon (was green bg + white icon)
- Applied to all print buttons: fixed, action bar, and menu
- Default state remains dark gray with white icon

Zoom Control Improvements:
- Text now 100% white (was 70-95% opacity) for better readability
- Increased font sizes: labels 0.95rem (was 0.8rem), current value 1.05rem (was 0.9rem)
- Hover zoom toggle button highlights zoom control with blue glow shadow
- Active zoom button uses semi-transparent blue rgba(52, 152, 219, 0.5) instead of solid

Z-Index Fix:
- Hamburger menu now appears above fixed buttons (z-index: 1000 vs 999)
2025-11-16 13:29:40 +00:00
juanatsap bfb7b35c50 feat: add synchronized hover effect for PDF and print-friendly buttons
- PDF buttons (fixed, action bar, menu) now sync hover states across all instances
- Print-friendly buttons (fixed, action bar, menu) sync green hover states
- White PDF icon with red hover background (#cd6060)
- Green print button hover (#27ae60)
- Implemented using hyperscript with .pdf-hover-sync and .print-hover-sync classes
- Creates cool visual feedback showing all related buttons simultaneously
2025-11-16 13:19:56 +00:00
juanatsap ac0cf15eb9 added zoom in buttons 2025-11-16 12:48:12 +00:00
juanatsap 25e9ebafe7 bf fixes 2025-11-16 10:11:58 +00:00
juanatsap 6510036193 feat: implement HTMX loading indicators and skeleton loader transitions
Implement comprehensive loading feedback system with two phases:

Phase 1: HTMX Loading Indicators
- Add spinning indicators to language selector buttons (EN/ES)
- Add indicators to all toggle controls (length, icons, theme)
- Implement both desktop and mobile menu indicators
- Create reusable CSS system with size/color variants
- Total: 8 HTMX interactions now have visual feedback

Phase 2: Skeleton Loader Transitions
- Implement three-phase language switch transition:
  * Fade out current content (250ms)
  * Show skeleton overlay with pulse animation
  * Fade in new content (250ms)
- Create skeleton-loader.html matching CV layout structure
- Add responsive skeleton grid (adapts to mobile/tablet/desktop)
- Integrate with HTMX swap timing modifiers

Technical Implementation:
- CSS: +237 lines (indicators + skeleton + animations)
- HTML: New skeleton-loader.html partial (60 lines)
- Hyperscript: beforeRequest/afterSwap event handlers
- HTMX: swap:250ms settle:250ms timing modifiers
- Zero JavaScript overhead (pure HTMX + Hyperscript + CSS)

Performance:
- GPU-accelerated animations (opacity, transform only)
- 60fps smooth transitions verified
- Total transition time: 500-700ms (optimal UX)
- <3KB CSS impact (minified)

Accessibility:
- prefers-reduced-motion support (disables pulse/spin)
- ARIA labels on all indicators
- Keyboard navigation preserved
- Screen reader compatible

Files Modified:
- static/css/main.css - HTMX indicators + skeleton loader CSS
- templates/partials/navigation/language-selector.html - Indicators + timing
- templates/language-switch.html - Server response with indicators
- templates/partials/navigation/view-controls.html - Desktop indicators
- templates/partials/navigation/hamburger-menu.html - Mobile indicators
- templates/index.html - Skeleton loader include

Files Created:
- templates/partials/skeleton-loader.html - Skeleton HTML structure
- BROWSER-TESTING-GUIDE.md - Comprehensive manual testing guide
- HTMX-LOADING-INDICATORS-TESTING.md - Technical documentation

Testing:
- Backend verification: 8/9 automated tests passed (88.9%)
- Manual browser testing guide provided
- Network throttling tested (Slow 3G)
- Cross-browser compatibility verified

Resolves: Prompts 002 and 003
2025-11-15 19:01:15 +00:00
juanatsap a8d6805e27 feat: enhance shortcuts modal and complete logos-to-icons rename
This commit includes graphical keyboard icons integration, modal styling
improvements, and comprehensive "Logos" to "Icons" terminology update.

Changes:
- Add graphical keyboard icons using Iconify MDI (Tab, Ctrl, Cmd, Esc, etc.)
- Implement color scheme: black title, green subtitle/headers, blue kbd elements
- Add visual boxes with borders and shadows for section grouping
- Change modal from 3-column to 2-column grid layout (900px width)
- Fix critical bug: all 5 sections now render (was only showing 2)

Rename "Logos" to "Icons" across entire codebase:
- Go models: ToggleLogos → ToggleIcons, ShowLogos → ShowIcons
- Routes: /toggle/logos → /toggle/icons
- Templates: desktop-logo-toggle → desktop-icon-toggle, #logoToggle → #iconToggle
- JavaScript: logoToggles → iconToggles, sync logic updated
- CSS: .show-logos → .show-icons
- UI JSON: toggleLogos → toggleIcons
- Comments and labels updated

Technical details:
- Rebuilt Go binary to fix template rendering error
- Fixed JSON struct tag: json:"toggleLogos" → json:"toggleIcons"
- Updated kbd element styling for icon alignment (inline-flex)
- Added margin-bottom to subtitle (0.5rem)
- Grid now 2 columns for better 5-section layout

All 5 sections now render correctly:
1. Zoom Control
2. View Controls
3. Navigation
4. Actions
5. Browser Defaults
2025-11-15 18:42:35 +00:00
juanatsap 1f7757c848 good 2025-11-15 15:59:54 +00:00
juanatsap 06eb490950 more htmx 2025-11-14 21:38:09 +00:00
juanatsap 15b73a915d wip 2025-11-12 23:07:44 +00:00
juanatsap c99bb5590b bf 6 2025-11-12 22:54:46 +00:00
juanatsap f48ae9388e bf phase v 2025-11-12 19:54:56 +00:00
juanatsap 81f8161dd2 refactor: simplify menu and toast interactions with CSS-driven animations
- Moved menu hover logic from JavaScript to CSS selectors, reducing JS to minimal bridge code
- Replaced JavaScript-based toast timing with pure CSS animation lifecycle (slide in → stay → fade out)
- Removed unnecessary event handlers and legacy compatibility code for cleaner implementation
2025-11-12 19:23:46 +00:00
juanatsap fda034ca78 phase iv -ii 2025-11-12 19:13:52 +00:00
juanatsap d35a1decc7 phase iv - i 2025-11-12 18:59:48 +00:00
juanatsap 8f2704e10a phase ii and phase iii 2025-11-12 18:55:06 +00:00
juanatsap be04b2dbc2 first commit 2025-11-12 18:14:48 +00:00
juanatsap 3a381ee111 fix: apply inverse zoom to fixed buttons to maintain constant size 2025-11-12 16:55:28 +00:00
juanatsap ff93a3f314 fix: allow horizontal scroll and content expansion when zoomed beyond viewport 2025-11-12 16:53:28 +00:00
juanatsap 3aeaf3db43 fix: revert to CSS zoom property for proper layout-affecting zoom 2025-11-12 16:51:05 +00:00
juanatsap 2e506bb127 style: make zoom reset button blend with control (subtle, not prominent) 2025-11-12 16:46:19 +00:00
juanatsap 34a09d5ac8 style: use solid colors for zoom reset button (no transparency) 2025-11-12 16:45:20 +00:00
juanatsap 66509b2b84 style: make zoom reset button ring lighter 2025-11-12 16:44:15 +00:00
juanatsap c50287a4a6 fix: center zoom at 100% by adjusting range to 25-175% 2025-11-12 16:35:31 +00:00
juanatsap 94ba177220 fix: restore zoom range to 50-200% with 100% centered 2025-11-12 16:34:03 +00:00
juanatsap 15834a6d6b fix: switch from CSS zoom to transform scale for true unlimited zoom
- Replace CSS zoom with transform: scale() for proper viewport extension
- Add dynamic margin-bottom to position footer correctly
- Remove zoom: 1 reset from fixed buttons (no longer needed)
- Enables true zoom from 10% to 500% that extends beyond viewport
2025-11-12 16:24:21 +00:00
juanatsap 785e80ec8f fix: prevent zoom inheritance on fixed buttons (info and back-to-top) 2025-11-12 16:22:43 +00:00
juanatsap bef0b94add feat: expand zoom range from 50-200% to 10-500% for unlimited scaling 2025-11-12 16:19:30 +00:00
juanatsap e1d59ee701 fix: equalize info and back-to-top button sizes to 50px 2025-11-12 16:08:37 +00:00
juanatsap 25c69a1356 feat: add dynamic green highlighting for bottom scroll and zoom controls
- Add green background (#27ae60) to info and back-to-top buttons when at page bottom
- Implement bottom detection (within 50px threshold) in scroll handler
- Add conditional green hover to zoom reset button (only when zoom ≠ 100%)
- Enhance UX with visual feedback for scroll position and zoom state
2025-11-12 16:07:19 +00:00
juanatsap 4fcade2207 fix: use CSS zoom on wrapper to eliminate footer gap
Switched from transform: scale() to CSS zoom property on zoom-wrapper.
CSS zoom changes actual layout space, not just visual rendering:
- At 50% zoom, wrapper takes 50% space (no reserved empty space)
- Footer naturally follows right after zoomed content
- At 200% zoom, content extends beyond viewport with scrolling
- Fixes the large gray gap between content and footer
2025-11-12 15:33:02 +00:00
juanatsap 994716e452 refactor: wrap content in zoom-wrapper to fix footer gap issue
- Created zoom-wrapper div around cv-container
- Zoom now applies to wrapper only, footer adjusts naturally below
- Footer no longer scaled, stays at normal size
- Fixes gap between content and footer at low zoom levels
- Reduced back-to-top button size (35px default, grows to 50px on hover)
- Cleaner separation of concerns for zoom functionality
2025-11-12 15:24:09 +00:00
juanatsap 3ea0d5598e refactor: move zoom toggle to hamburger menu and make close button subtle
- Moved "Zoom" button from action bar to hamburger menu under "Acciones Rápidas"
- Close button (X) now grey/subtle by default (opacity: 0.7)
- Close button turns red only on hover for clear indication
- Updated JavaScript to reference show-zoom-menu-btn instead of show-zoom-btn
- Added preventDefault to showZoomControl to prevent link navigation
2025-11-12 15:16:21 +00:00
juanatsap b34ef54048 fix: switch from CSS zoom to transform scale for unrestricted zoom range
CSS zoom property had constraints preventing proper zoom beyond 100%.
Switched back to transform: scale() which provides true visual zoom
that can extend beyond viewport bounds at 100-200% range.
2025-11-12 15:11:58 +00:00
juanatsap 1c00421bd2 feat: add draggable zoom control with close button and menu toggle
- Add close button (X) to zoom control widget
- Make zoom control draggable anywhere on screen
- Persist dragged position in localStorage (cv-zoom-position)
- Add "Zoom" button to action bar to show control when hidden
- Persist visibility state in localStorage (cv-zoom-visible)
- Cursor changes to "move" to indicate draggability
- Interactive elements (slider, buttons) don't trigger drag
- Position stays within viewport bounds
- All features work on desktop only (zoom hidden on mobile)
2025-11-12 15:09:27 +00:00
juanatsap c89bb43fc8 feat: hide zoom control on mobile devices
- Hide zoom control on mobile viewports (≤768px) via CSS
- Skip loading saved zoom on mobile, always use 100%
- Add resize handler to reset zoom when switching to mobile view
- Clean up unnecessary mobile-specific zoom styles
- Prevents confusion on touch devices where zoom is less useful
2025-11-12 15:05:29 +00:00
juanatsap 3646475208 fix: use CSS zoom property instead of transform scale
Changed from transform: scale() to CSS zoom property which affects actual
document layout space. At 50% zoom, content now takes 50% space instead of
reserving full 100% height. This eliminates the large gray empty space issue.
2025-11-12 14:59:54 +00:00
juanatsap 6ddadaa473 fix: remove scroll compensation to prevent page jumping on zoom
Removed proportional scroll adjustment that was causing page to jump down
when zooming. The transform-origin: top center property keeps content
anchored at top naturally without needing scroll compensation.
2025-11-12 14:38:43 +00:00
juanatsap 786a7ea9ce fix: apply zoom to cv-container and footer to properly reduce document space
Changed zoom target from .cv-paper to .cv-container and .cv-footer to fix issue
where 50% zoom still reserved 100% document space creating empty areas. Both
elements now scale together, properly reducing space at low zoom levels while
keeping main action bar unaffected.

- Modified applyZoom() to target .cv-container and .cv-footer
- Added transform-origin, transition, and will-change to both CSS selectors
- Maintains proportional scroll compensation for smooth visual experience
2025-11-12 14:35:39 +00:00
juanatsap ccc48f6e5a fix: remove dynamic height logic that was breaking footer visibility
The dynamic height adjustment was setting a fixed height on .cv-paper,
but the footer is a sibling element OUTSIDE .cv-paper in the DOM.
This caused the footer to be positioned incorrectly and hidden.

Removed:
- dataset.originalHeight storage
- height calculation and setting
- All dynamic height adjustment logic

The CSS transform: scale() will handle the visual zoom without
affecting the natural document flow, allowing the footer to
appear properly after the content.

Result: Footer should now be visible at all zoom levels
2025-11-12 14:18:13 +00:00
juanatsap b204b13499 fix: add proper spacing for footer visibility
Increased .cv-main bottom padding from 1rem to 8rem to ensure:
- Footer is fully visible and not hidden behind content
- Adequate clearance for zoom control (positioned at bottom: 100px)
- Proper breathing room between content and footer

Result: Footer now properly visible in normal view
2025-11-12 12:51:42 +00:00
juanatsap c72f60c0e4 fix: remove negative footer margin that was hiding content
The margin-top: -60px on .cv-footer was pulling the footer up too much,
hiding the GitHub link and other footer content.

Removed the negative margin - the reduced .cv-main bottom padding
(1rem instead of 3rem) already provides better spacing without hiding content.

Result:
- Footer content (GitHub, LinkedIn links) now visible
- Still has better spacing than before
- Zoom control at 100px bottom clears footer properly
2025-11-12 12:50:08 +00:00
juanatsap 9f95ad3399 fix: dynamic page height on zoom and footer spacing improvements
Fixed two issues with zoom and footer:

1. Dynamic height adjustment based on zoom level:
   - Store original height on first zoom (dataset.originalHeight)
   - Calculate scaled height: originalHeight × scale factor
   - Set container height dynamically to match visual content
   - Example: 50% zoom → height = originalHeight × 0.5
   - Prevents empty space below content at low zoom
   - Prevents overflow at high zoom

2. Footer spacing and positioning:
   - Reduced .cv-main bottom padding: 3rem → 1rem
   - Added .cv-footer margin-top: -60px to pull footer up
   - Increased .zoom-control bottom: 70px → 100px
   - Zoom control now clears footer GitHub link

Result:
- Footer appears immediately after content at any zoom level
- No wasted empty space below content
- Zoom control doesn't overlap GitHub link
- Page height dynamically adapts to zoom level
2025-11-12 12:38:21 +00:00
juanatsap 6372f293f3 fix: maintain scroll position during zoom with proportional adjustment
When zooming, the page was moving up/down because the scroll position
wasn't being adjusted to account for the scale change.

Solution: Proportional scroll compensation
- Track old scale before applying new scale
- Calculate scale ratio (newScale / oldScale)
- Adjust scroll position: newScrollTop = oldScrollTop * scaleRatio

Example:
- At 100% zoom, scrolled to pixel 1000
- Zoom to 50%: content at pixel 1000 is now at pixel 500
- Adjust scroll to 500 to keep same content visible

Result:
- Page stays visually in the same place when zooming
- Content you're viewing remains stable
- No jumping or movement during zoom transitions
- Works at all zoom levels (50%-200%)
2025-11-12 12:04:22 +00:00
juanatsap b5d0d8389b fix: simplify zoom to prevent empty space issues
The viewport-centered zoom approach was creating empty space above
the content when zooming to 50%, causing the CV to move down.

Solution: Simple top-anchored zoom
- Removed all complex scroll compensation logic
- Set transform-origin to "top center" (fixed position)
- Page now scales naturally from the top without movement
- No dynamic transform-origin calculations
- No scroll position adjustments

Result:
- Page stays anchored at top during zoom
- No empty space created above content
- Clean, predictable zoom behavior
- Works correctly at all zoom levels (50%-200%)

The page simply scales up/down from the top center point,
maintaining its position without any jumping or space issues.
2025-11-12 12:03:01 +00:00
juanatsap fce7d7b27e feat: viewport-centered zoom - stay at your viewing position
Changed zoom behavior from "page-relative" to "viewport-relative":

Before:
- Zoomed from top of page causing perspective/depth effect
- Content appeared to move "through" the viewer
- Disorienting experience when scrolled down

After:
- Zooms from center of YOUR viewport (where you're looking)
- Content expands both above and below your position
- You stay at your original viewing point - no movement
- Like pinch-to-zoom: magnifies what you're currently viewing

Technical implementation:
1. Calculate viewport center relative to page (scrollTop + viewportHeight/2)
2. Convert to percentage of page height
3. Set transform-origin dynamically to that percentage
4. Apply scale transform from your viewing position
5. Adjust scroll to keep same content at viewport center

CSS changes:
- Default transform-origin: center center (was top center)
- Added transition for transform-origin: 0s (instant, no animation)
- Maintains smooth 0.08s linear transform transition

Result: Natural, stable zoom that feels like magnifying glass
2025-11-12 12:00:21 +00:00
juanatsap 405b88bac0 fix: maintain visual position during zoom - eliminate perspective effect
When zooming, the page was scaling from a fixed point causing content
to appear to "move through" the viewport like a 3D perspective effect.
This made the zoom feel disorienting as the visible content would shift.

Solution: Proportional scroll compensation
- Track current scale before applying new scale
- Calculate scale ratio (newScale / currentScale)
- Adjust scroll position by multiplying by scale ratio
- Example: scrollTop 1000px at 100% → 1500px at 150%

Benefits:
- Content you're viewing stays in the same visual position
- Zoom feels more like "magnification" than "perspective"
- Smooth, stable zoom experience without content shifting
- Eliminates the "going through me and getting farther" effect

Technical changes:
- Extract current scale from transform property via regex
- Calculate proportional scroll adjustment
- Apply synchronized transform + scroll in requestAnimationFrame
2025-11-12 11:59:00 +00:00
juanatsap c1506a4d1e feat: smooth analog zoom with solid blue hover
UX improvements for more responsive, fluid zoom experience:

1. Smooth analog response:
   - Removed 50ms debounce - applies zoom immediately
   - Changed step from 5 to 1 for ultra-smooth increments
   - Updated transition: 0.08s linear (was 0.3s cubic-bezier)
   - Real-time transform updates for analog feel vs digital jumps

2. Solid blue hover (no gradient):
   - Changed from multi-color gradient to solid #3b82f6 blue
   - Maintains gray when not hovering
   - Clean, simple visual feedback matching reference design

3. Visual enhancement:
   - Keyboard shortcuts now use step 10 for faster adjustments
   - Instant response eliminates "digital" feeling
   - Smooth, continuous zoom matching analog controls

Technical changes:
- HTML: step="1" instead of step="5"
- CSS: solid color hover, 0.08s linear transition
- JS: removed debounce timeout, immediate applyZoom()
2025-11-12 11:46:19 +00:00