Commit Graph

353 Commits

Author SHA1 Message Date
juanatsap 1569a81eed docs: Archive obsolete documentation and update README index
## Archived Documentation
- Removed BEFORE-AFTER-COMPARISON.md (skeleton loader redesign - feature complete)
- Removed BROWSER-TESTING-GUIDE.md (HTMX indicators testing - feature complete)

## Updated Documentation Index
- Added CSS Architecture (doc 12) to technical implementation section
- Added PDF Export (doc 11) to user & operations section
- Updated last modified date: 2025-11-18 → 2025-11-20
- Updated total active docs count: 11
2025-11-20 12:36:27 +00:00
juanatsap 1258d61d05 refactor: Modularize CSS into ITCSS architecture + update documentation
CSS Refactoring:
- Split 2,287-line monolith into 6 focused modules
- New structure: Navigation, Scroll, Buttons, Modals, Zoom, Breakpoints
- Organized by ITCSS layers (Interactive + Responsive)
- 245 lines saved through better organization
- Site verified working at localhost:1999

New CSS Files:
- 04-interactive/_navigation.css (357 lines, 8.2KB)
- 04-interactive/_scroll-behavior.css (200 lines, 5.0KB)
- 04-interactive/_buttons.css (184 lines, 4.7KB)
- 04-interactive/_modals.css (487 lines, 16KB)
- 04-interactive/_zoom-control.css (253 lines, 6.3KB)
- 05-responsive/_breakpoints.css (561 lines, 14KB)

Documentation Updates:
- Added doc/12-CSS-ARCHITECTURE.md (comprehensive CSS guide)
- Updated doc/README.md (new entry + correct numbering)
- Updated tests/README.md (test count 8 → 27)
- Updated tests/TEST-SUMMARY.md (coverage expansion)
- Rewrote tests/mjs/README.md (complete test listing)

Removed:
- static/css/04-interactive/_remaining.css (replaced by modules)
2025-11-20 12:34:42 +00:00
juanatsap d93e37ddc9 docs: Merge LONG-PDF-GENERATION.md into comprehensive PDF documentation
## Merged Content
- Merged LONG-PDF-GENERATION.md technical details into doc/11-PDF-EXPORT.md
- Removed duplicate documentation file
- Single source of truth for all PDF export documentation

## Added Technical Details
- PDF generation flow diagram
- 2-column vs 3-column layout architecture decision
- Sidebar width configuration guide (18%-30% analysis)
- Detailed CSS injection strategy with code examples
- HTML structure examples for page layouts
- Expanded compact sidebar fonts implementation details
- Font size breakdown table (2-6% reduction)

## Result
- Comprehensive PDF documentation: 966 lines (was 793)
- Added 173 lines of technical implementation details
- Removed 411-line duplicate file
- Better organized, single reference for developers and users

Benefits:
- Single source of truth for PDF features
- No duplication between docs
- Easier maintenance
- Complete technical and user-facing documentation in one place
2025-11-20 12:31:28 +00:00
juanatsap 9f3b8853a3 docs: Cleanup and consolidate PDF documentation
## Documentation Cleanup
- Moved PDF-EXPORT-FEATURE.md → doc/11-PDF-EXPORT.md
- Added shortcut URL documentation section
- Updated changelog to v2.1.0 with shortcut URL feature
- Removed ephemeral reports (validation, shortcut implementation)

## Removed Backup Files
- Deleted static/css/main.css.backup
- Deleted static/js/main.js.backup

## Consolidated PDF Documentation
The comprehensive PDF export documentation now includes:
- Year-aware shortcut URLs (/cv-jamr-{year}-{lang}.pdf)
- Automatic year validation and updates
- Default CV modal integration
- All PDF export options and features
- Complete API reference

Benefits:
- Single source of truth for PDF feature documentation
- Removed temporary/ephemeral documentation files
- Cleaner repository structure
- Updated versioning to 2.1.0
2025-11-20 12:25:41 +00:00
juanatsap 66e06a6cb0 feat: Add year-aware PDF shortcut URLs + Default CV modal option
## Shortcut URLs
- New routes: /cv-jamr-{year}-{lang}.pdf (e.g., /cv-jamr-2025-en.pdf)
- Year validation: Only current year accepted, returns 404 for past/future
- Auto-redirects (301) to: /export/pdf?lang={lang}&length=short&icons=show&version=with_skills
- Both languages supported: en and es

## PDF Modal Updates
- Replaced "Current View" option with "Default CV (Recommended)"
- Visual highlighting: purple gradient badge, star emoji , bold text
- Uses shortcut URL with dynamic year detection
- Clear recommendation for users (5 pages, short with skills)

## Technical Details
- Handler: DefaultCVShortcut() in internal/handlers/cv.go
- Pattern check in Home() handler for proper routing
- Helper function: window.openPdfModal() for references section
- Documentation: PDF-SHORTCUT-IMPLEMENTATION.md

Benefits:
- Memorable, shareable URLs (juan.andres.morenorub.io/cv-jamr-2025-en.pdf)
- Auto-updates yearly without code changes
- Clear user guidance for recommended CV format
2025-11-20 12:14:53 +00:00
juanatsap 54cdb0cc19 refactor: PDF filenames with_skills → with-skills (cosmetic only)
Changed PDF filename format to use hyphens instead of underscores for
consistency with other filename components, while keeping API parameter
as `version=with_skills`.

## Changes

**Backend:**
- internal/handlers/cv.go: Add underscore-to-hyphen conversion in filename generation
  - New logic: `strings.ReplaceAll(version, "_", "-")` for filename only
  - API parameter unchanged: still accepts `version=with_skills`

**Tests:**
- internal/handlers/pdf_test.go: Update expected filenames to use hyphens
  - cv-*-with_skills-*.pdf → cv-*-with-skills-*.pdf

**Documentation:**
- Updated all PDF filename references to use hyphens
- PDF-EXPORT-FEATURE.md
- doc/LONG-PDF-GENERATION.md
- PDF-VALIDATION-REPORT.md (new validation report)

**PDFs:**
- Regenerated all 8 PDFs with new naming convention
- Old: cv-short-with_skills-jamr-2025-en.pdf
- New: cv-short-with-skills-jamr-2025-en.pdf

## Examples

API calls unchanged:
- GET /export/pdf?version=with_skills (still works)

Generated filenames:
- cv-short-with-skills-jamr-2025-en.pdf ✓
- cv-long-with-skills-jamr-2025-es.pdf ✓

**Tests:** All passing ✓
**API:** Backwards compatible ✓
2025-11-20 11:48:34 +00:00
juanatsap b44f9b9a99 refactor: Rename 'extended' → 'long' + add compact sidebar fonts
BREAKING CHANGE: API parameter renamed from 'extended' to 'long'

## Breaking Change: Terminology Standardization

Renamed 'extended' to 'long' across entire codebase for consistency:

**Backend (Go):**
- internal/handlers/cv.go (7 locations)
  - Migration logic to auto-convert 'extended' → 'long' cookies
  - API validation now rejects 'extended', requires 'long'
  - Toggle state logic updated
- internal/handlers/pdf_test.go (17 occurrences)
  - Test function renamed: TestExportPDF_ExtendedWithSkills → TestExportPDF_LongWithSkills
  - All test cases, parameters, and expected filenames updated
- internal/pdf/generator.go (2 comment updates)

**Frontend:**
- PDF-EXPORT-FEATURE.md (3 occurrences)
- doc/3-API.md (parameter documentation)
- doc/7-CUSTOMIZATION.md (examples updated)
- templates/partials/modals/pdf-modal.html (button text, URLs)
- static/js/main.js (migration logic)
- static/hyperscript/toggles._hs (toggle logic)
- tests/mjs/24-pdf-download-params.test.mjs (test expectations)
- tests/mjs/test-preference-migration.test.mjs (NEW)
- tests/mjs/verify-migration.test.mjs (NEW)

**PDFs Renamed:**
- cv-extended-with_skills-jamr-2025-en.pdf → cv-long-with_skills-jamr-2025-en.pdf
- cv-extended-with_skills-jamr-2025-es.pdf → cv-long-with_skills-jamr-2025-es.pdf

**Migration:** Automatic cookie migration from 'extended' → 'long' for seamless UX

## New Feature: Compact Sidebar Fonts

Reduces page count for short CV with skills from 6 → 5 pages:

**Implementation:**
- Location: internal/pdf/generator.go (lines 154-215)
- Cookie detection: `cookies["cv-length"] == "short"`
- Font reduction: 2-6% (0.94-0.98em) - very subtle
- Only activates for: `length=short` + `version=with_skills`
- Long version: Always uses full-size fonts

**Impact:**
- Page count: 6 pages → 5 pages (16.7% reduction)
- Readability: Maintained - fonts remain professional
- Design philosophy: Subtle, natural content flow

**Testing:**
- New test: TestPDFGenerator_CompactSidebarFonts
- Comprehensive coverage of cookie detection and PDF generation
- Manual verification: 5-page PDF with compact but readable fonts

**Documentation:**
- doc/LONG-PDF-GENERATION.md (NEW, 13 KB)
  - Complete feature documentation
  - Implementation details with code examples
  - Font size breakdown table
  - Testing and troubleshooting guides
  - Compact sidebar fonts section (comprehensive)

**Files Changed:**
- 11 modified (backend + frontend + docs)
- 5 new files (2 PDFs, 1 doc, 2 tests)
- 2 files renamed (PDFs)

**Tests:** All Go tests passing, API validation verified, PDF generation tested
2025-11-20 11:21:43 +00:00
juanatsap 925a95c1b4 refactor: externalize navigation handlers and fix hyperscript syntax errors
- Created keyboard._hs as reference documentation (inline handler in body tag)
- Externalized 9 hamburger menu navigation links to scrollToSection()
- Added scrollToSection() as JavaScript function (CSP-safe, no eval needed)
- Restored original keyboard handler format in body tag (working correctly)
- Removed problematic navigation._hs (had syntax/CSP issues)
- Added Rule 4 to HYPERSCRIPT-RULES.md on event handler externalization
- Updated PROJECT-MEMORY.md with externalization guidelines

Key learnings:
- Complex event handlers that inspect event properties must stay inline
- JavaScript functions avoid CSP unsafe-eval restrictions
- Navigation successfully externalized: 9 links → 1 function (91% reduction)
2025-11-20 09:46:06 +00:00
juanatsap 27f5e8eb79 docs: Rename PDF length parameter from 'detailed' to 'short'
Changed PDF export naming convention from 'detailed' to 'short' for better clarity and contrast with 'extended'. Updated:

- Documentation: All references from 'detailed' → 'short'
- JSON data files: Static PDF URLs now use cv-short-jamr-{{YEAR}}-{lang}.pdf
- Frontend modal: Removed 'short' → 'detailed' mapping (now stays as 'short')
- Static PDFs: Renamed cv-detailed-* to cv-short-* (deleted old files)
- Backend validation: Change
2025-11-19 17:40:06 +00:00
juanatsap 1837a9b0ae quick fix to prod 2025-11-19 17:27:39 +00:00
juanatsap 709a91c652 fix: Project responsibility icons - 60px + color unset
Applied same fix to project icons (like Mobbeel security icon):
- 60px × 60px size
- color: unset !important for inline styles
- Matches course icons styling exactly
2025-11-19 17:21:00 +00:00
juanatsap a56212fc79 fix: Course icons 60px + unset color for inline styles
- Changed from 24px back to 60px (matching projects structure)
- Used color: unset !important to reset CSS color override
- Allows inline color styles (style='color: #9333EA') to work
- Matches the project list icon styling exactly
2025-11-19 17:18:52 +00:00
juanatsap 2e90653d31 fix: Course list icons - 24px size + attempt color preservation
- Reduced course responsibility icons to 24px (was 80px)
- Added color: inherit !important to try preserving inline color styles
- Removed borders, backgrounds, and padding for cleaner inline appearance

Note: color: inherit may inherit from parent theme color rather than
preserving individual icon colors. May need adjustment.
2025-11-19 17:14:27 +00:00
juanatsap 0f5137ddcb fix: Restore visibility of course list icons (keep at 60px)
Removed overly broad selector that was shrinking ALL course
responsibility icons to 1.2em. Now only targets truly inline
icons within .course-desc text, not the main 60px list icons.
2025-11-19 16:57:12 +00:00
juanatsap 43414b79ac fix: Override inline icon sizes to 1.2em across all sections
Problem: Inline icons embedded in responsibilities, courses, and
projects had explicit width='60' height='60' attributes that made
them too large (60px instead of ~16px).

Solution:
- Added CSS with !important to override inline width/height attributes
- Targeted inline icons in:
  * Course responsibilities and descriptions
  * Project descriptions and technologies
  * Experience responsibilities (within divs)
- Preserved large icons (80px) for main company/course/project logos

Changes:
- static/css/03-components/_courses.css: Override to 1.2em
- static/css/03-components/_projects.css: Override to 1.2em
- static/css/03-components/_cv-section.css: Override to 1.2em

Test Results:
 7 course inline icons: 16px × 16px
 Main company icons: 80px × 80px (preserved)
2025-11-19 16:30:18 +00:00
juanatsap 06ec9b9f20 fix: Restore inline icon styling in course descriptions
- Added font-size: 1.2em for smaller icons
- Added vertical-align: middle for proper alignment
- Added margin: 0 0.15em for spacing
- Added color: inherit !important to preserve icon colors
- Lost during CSS modularization refactor
2025-11-19 16:04:40 +00:00
juanatsap 617a8e1643 fix: Correct LIV Golf border color for invert filter
Calculation: #5e5e5e inverted = #a1a1a1
- Set LIV Golf border to #a1a1a1 in dark theme
- After invert(1) filter → appears as #5e5e5e (correct gray)
- Light theme: resets to normal var(--icon-border)

Filter inverts ENTIRE element including borders, so we
pre-compensate by using the inverse color.
2025-11-19 15:52:01 +00:00
juanatsap 93e7b81061 fix: Change dark theme icon border to #5e5e5e medium gray
- Changed from transparent to #5e5e5e (rgb(94,94,94))
- Visible but subtle medium gray border in dark theme
- Updated test to verify new border color
- Note: CSS filter on LIV Golf only affects image pixels, not border
2025-11-19 15:49:55 +00:00
juanatsap 0947e19c70 fix: Replace ALL remaining hardcoded #ddd borders with theme variable
Replaced 12 hardcoded borders across 5 files:
- _cv-section.css: 2 borders (company icons)
- _projects.css: 2 borders (project icons)
- _courses.css: 2 borders (course icons)
- _toggles.css: 3 borders (logo containers)
- logo-toggle.css: 3 borders (logo containers)

All icon borders now use var(--icon-border):
- Light theme: #ddd (visible)
- Dark theme: transparent (invisible)

Verified with Playwright: rgba(0,0,0,0) in dark theme
2025-11-19 15:47:19 +00:00
juanatsap df77a269c0 fix: Make icon borders completely transparent in dark theme
- Changed from rgba(255,255,255,0.05) to 'transparent'
- Previous attempt used WHITE transparent which was still visible
- Now borders are rgba(0,0,0,0) - completely invisible
- Verified with Playwright test showing transparent borders
- All icons (OBS, LIV Golf, etc.) now have no visible borders
2025-11-19 15:41:36 +00:00
juanatsap 5dc5a98269 fix: Make icon borders nearly transparent in dark theme
- Changed from #1e1e1e to rgba(255, 255, 255, 0.05)
- Borders now 95% transparent, virtually invisible
- Applies to ALL icon borders (OBS, LIV Golf, etc.)
- Invert filter remains ONLY for LIV Golf logo
2025-11-19 15:39:00 +00:00
juanatsap 82df6849bd fix: Make icon borders nearly invisible in dark theme
- Changed --icon-border from #2a2a2a to #1e1e1e (rgb(30,30,30))
- Background is #1a1a1a (rgb(26,26,26)), only 4 RGB units difference
- Borders now barely visible, creating cleaner dark theme appearance
2025-11-19 15:30:39 +00:00
juanatsap ac73b49d8d feat: Darker icon borders/separators in dark theme + invert LIV Golf logo
- Add --icon-border variable: #ddd (light) / #2a2a2a (dark)
- Add --item-separator variable: rgba(0,0,0,0.1) / rgba(255,255,255,0.05)
- Replace 6 hardcoded icon borders with var(--icon-border)
- Replace 3 hardcoded separators with var(--item-separator)
- Add CSS filter to invert LIV Golf logo in dark themes for visibility
- LIV Golf logo filter: invert(1) in dark/auto(dark), none in light
2025-11-19 15:26:19 +00:00
juanatsap 85de5b621f fix: Sync auto theme sidebar color with explicit dark theme
- Auto theme dark mode now uses #3a3d3e (matches explicit dark)
- Previously used #2a2a2a causing visible difference when switching
- Ensures only two visual states (light/dark) regardless of theme mode
2025-11-19 15:08:03 +00:00
juanatsap 59a16ce1e0 fix: Theme-aware sidebar with dark mode support
Light theme sidebar:
- Background: #d1d4d2 (light gray)
- Text: dark colors

Dark theme sidebar:
- Background: #3a3d3e (darker gray, between page bg and content)
- Text: light colors (using CSS variables)
- Titles: light colors

Changes:
- Revert sidebar bg to use var(--sidebar-bg) for theme switching
- Update dark theme sidebar color to #3a3d3e
- Replace all hardcoded text colors with CSS variables
- Sidebar titles, content, and arrows now adapt to theme
2025-11-19 15:01:48 +00:00
juanatsap 35a802cbd5 fix: Keep sidebar background consistent across themes
Change sidebar background from var(--sidebar-bg) to fixed #d1d4d2
so it remains the same light gray color in both light and dark themes.

The sidebar should provide a consistent visual anchor regardless
of the main content theme.
2025-11-19 14:57:38 +00:00
juanatsap 4886a36f2c fix: Make CV main content area theme-aware
Change .cv-main background from var(--paper-white) to var(--paper-bg)
so it adapts to theme:
- Light theme: white (#ffffff)
- Dark theme: cool dark gray (#1a1a1a)

Now the entire CV paper is dark in dark theme, not just the page background.
2025-11-19 14:54:10 +00:00
juanatsap 4df0360202 fix: Sync view switcher initialization with container target
The toggleTheme() function targets .cv-container but initPreferences()
was adding theme-clean to document.body, causing state mismatch.
First click would do nothing because toggle state was inverted.

- Change initPreferences() to target .cv-container
- Fix HTMX swap handler to check .cv-container instead of body
- Now first click works immediately in both directions
2025-11-19 14:49:28 +00:00
juanatsap f7cda5dba3 refactor: Modularize CSS and fix theme-aware text colors
CSS Restructuring:
- Reorganize monolithic main.css into modular architecture
- Create foundation/ (reset, variables, typography, themes)
- Create layout/ (container, page, grid, paper)
- Create components/ (8 component files)
- Create interactive/ (toggles, remaining for future split)
- Create effects/ (skeleton loading)
- Create contexts/ (print styles)

Theme Support Fixes:
- Replace all hardcoded text colors with CSS variables
- Fix .section-title: rgb(51,51,51) → var(--text-primary)
- Fix .cv-name, .intro-text: hardcoded → theme-aware
- Fix .experience-period, .duration-text: #555/#aaa → variables
- Fix course/project/experience text colors
- Support proper light/dark theme text contrast

Icon & Layout Fixes:
- Standardize all icon sizes to 80×80px
- Change all icon backgrounds to transparent
- Fix award section layout (missing flexbox)
- Update HTML templates (experience.html, awards.html) to width='80'
- Fix default icon sizing conflicts

View Switcher Fix:
- Fix toggleTheme() to target .cv-container instead of body
- Ensures clean/default theme toggle works correctly

Files: 40+ CSS files modularized, 3 templates updated, 7 tests added
2025-11-19 14:31:17 +00:00
juanatsap f8948413bc docs: add comprehensive user-oriented PDF export guide
Add detailed, user-friendly documentation for PDF export feature in
CUSTOMIZATION.md to help template users understand and customize
PDF generation.

New Documentation:
- Clear explanation of how PDF export works
- All 4 parameters (lang, length, icons, version) with examples
- Filename convention and patterns
- Frontend integration examples (HTML, HTMX)
- Tips for best PDF results
- Troubleshooting common issues
- Advanced customization guidance

Audience:
- Template users who want to customize their own CV
- Non-technical users who need to understand PDF options
- Developers who want to extend PDF functionality

Examples include:
- Complete URL patterns for all parameter combinations
- Code snippets for frontend buttons
- CSS customizations for print appearance
- Common troubleshooting solutions
2025-11-19 10:56:01 +00:00
juanatsap 12bd9c7cd8 feat: enhance PDF export with 4 customizable parameters
Add comprehensive parameter support to /export/pdf endpoint:
- lang: Language selection (en/es)
- length: CV length (short/long)
- icons: Icon visibility (show/hide)
- version: Theme variant (extended/clean)

Backend Changes:
- Enhanced PDF generator with cookie injection for user preferences
- Cookies set before chromedp navigation to apply all preferences
- Updated filename pattern: CV-{Name}-{lang}-{length}-{version}.pdf
- Comprehensive parameter validation with descriptive error messages
- All parameters optional with sensible defaults (en, short, show, extended)

Testing:
- Added pdf_test.go with parameter validation tests
- Tests cover all valid/invalid parameter combinations
- Tests verify default parameter application

Documentation:
- Updated API documentation (doc/3-API.md)
- Added detailed parameter descriptions and examples
- Updated quick reference with all parameter options
- Added process flow diagram showing cookie injection
- Documented error responses for each invalid parameter

Implementation Details:
- Cookie domain set to "localhost" for chromedp context
- Cookies: cv-language, cv-length, cv-icons, cv-theme
- PDF generation leverages existing @media print CSS
- No changes to frontend CSS or templates

Tested:
- Parameter validation ( All invalid params rejected correctly)
- Default parameters ( Applied when params omitted)
- PDF generation with all parameter combinations ( Working)
2025-11-19 10:43:19 +00:00
juanatsap ddd09f9a16 fix: Improve color theme button colors for better distinction
**Issue**: Color theme button colors were too similar to other buttons
- Light mode (sun): Orange #f39c12 - same as keyboard button
- Dark mode (moon): Blue #3498db - same as zoom button

**Fix**: Updated to more distinctive colors

Light mode (sun):
- Was: Orange #f39c12 (same as keyboard)
- Now: Gold/Bright Yellow #ffd700 (distinct sun color)

Dark mode (moon):
- Was: Bright Blue #3498db (same as zoom)
- Now: Dark Slate Blue #2c3e50 (darker "nighty" blue)

Auto mode:
- Kept: Purple #9b59b6 (already distinctive)

**Result**: Color theme button now has unique, semantic colors that
clearly represent sun (bright yellow) and moon (dark night blue) without
conflicting with other buttons.

Updated both hover and at-bottom states for consistency.
2025-11-19 09:38:24 +00:00
juanatsap 2ebb9f5293 fix: Use each button's hover color for at-bottom state + add zoom button
**Bug 1: Wrong at-bottom colors**
- All buttons were showing orange (#f39c12) when at bottom
- User wanted each button to use its own hover color

**Bug 2: Zoom button missing at-bottom state**
- Zoom/search button wasn't changing color at bottom

**Fix - Updated .at-bottom styles to match hover colors:**

Download PDF button:
- Was: Orange (#f39c12)
- Now: PDF Red (#cd6060) - matches hover

Print Friendly button:
- Was: Orange (#f39c12)
- Now: White background + Green icon (#27ae60) - matches hover

Shortcuts button:
- Kept: Orange (#f39c12) - already correct

Color Theme Switcher:
- Was: Uniform orange
- Now: Dynamic colors based on theme mode
  - Light mode: Yellow (#f39c12)
  - Dark mode: Blue (#3498db)
  - Auto mode: Purple (#9b59b6)

Info button:
- Already correct: Green (#27ae60)

Back-to-top button:
- Already correct: Green (#27ae60)

Zoom button:
- Added: Blue (#3498db) - matches hover
- Added to scroll handler in utils._hs

**Result**: Each button now shows its characteristic color when page
is scrolled to bottom, providing consistent visual feedback that matches
the hover state.

Files changed:
- static/hyperscript/utils._hs: Added zoom button
- static/css/main.css: Updated 3 button colors
- static/css/color-theme.css: Dynamic theme colors
2025-11-19 09:35:17 +00:00
juanatsap f9ce37b6d0 fix: Apply at-bottom color to ALL buttons consistently
**Issue**: Only info and shortcuts buttons were showing orange color when
scrolled to bottom of page. Download PDF, Print Friendly, and Color Theme
buttons were missing this visual feedback.

**Fix**:
1. Added all buttons to at-bottom class logic in utils._hs:
   - #download-button
   - #print-friendly-button
   - .color-theme-switcher

2. Added CSS .at-bottom styles for missing buttons:
   - .download-btn.at-bottom
   - .print-friendly-btn.at-bottom
   - .color-theme-switcher.at-bottom

**Result**: All fixed buttons now show unified orange (#f39c12) background
when page is scrolled to bottom (within 50px), providing consistent visual
feedback across all controls.

Files changed:
- static/hyperscript/utils._hs: Added 3 buttons to scroll handler
- static/css/main.css: Added 2 .at-bottom styles
- static/css/color-theme.css: Added 1 .at-bottom style
2025-11-19 09:29:10 +00:00
juanatsap d220546d02 fix: Bidirectional hover sync + theme-aware CV text colors
**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
2025-11-19 09:24:29 +00:00
juanatsap 45e5be1ea3 test: Add comprehensive button positioning test (test 14)
Validates button positioning and responsive behavior across all viewports:

Desktop (>900px):
- Left side buttons (download, print, shortcuts, info) vertically stacked
- Back-to-top button on right side (intentional design)
- Zoom button visible
- Different bottom values verify vertical stacking

Wide Mobile (483-900px):
- Horizontal layout at bottom center
- Back-to-top remains on right side
- Zoom button hidden

Narrow Mobile (<483px):
- Back-to-top moved UP (5.5rem) to avoid overlap
- Still positioned on right side
- Horizontal button layout maintained

Accessibility:
- All buttons present and clickable
- Proper visibility checks

This test caught and validates the recent fixes:
1. Back-to-top on RIGHT (not left) in all mobile viewports
2. Narrow mobile positioning to prevent button overlap
3. Consistent hover effects across all buttons

Test results: 4/4 passed
- Desktop layout verification
- Wide mobile responsive layout
- Narrow mobile overlap prevention
- Button accessibility validation
2025-11-18 22:05:17 +00:00
juanatsap b8bd0b5c3c fix: Keep back-to-top button on RIGHT side in narrow mobile (<483px)
Corrected positioning - button now stays on RIGHT side, just moved UP:
- right: 1.5rem (stays on right)
- bottom: 5.5rem (moved higher to avoid overlap)

This prevents overlap with bottom button row while maintaining
right-side positioning as requested.
2025-11-18 21:51:44 +00:00
juanatsap 8da442b248 fix: Back-to-top button position on very narrow screens (<483px)
**Problem:**
On screens narrower than 483px, the horizontal button layout caused overlap
between back-to-top button and other buttons due to limited width.

**Solution:**
Added media query for max-width: 483px to vertically stack back-to-top button:
- Moved back-to-top to LEFT side (left: 1.5rem)
- Positioned ABOVE info button (bottom: 5.5rem)
- Maintains 4rem vertical spacing between buttons (same as desktop)

**Layout behavior:**
- Above 900px: All buttons vertical on left side (desktop)
- 483px - 900px: Buttons horizontal at bottom center + back-to-top at bottom-right
- Below 483px: Buttons horizontal at bottom center + back-to-top stacked above info button (left side)

This prevents button overlap on narrow mobile devices while maintaining
consistent spacing and positioning.

Files modified: static/css/main.css
2025-11-18 21:48:41 +00:00
juanatsap cc6ca6e6ba fix: Back-to-top button positioning in mobile + consistent hover effects
Fixed two UI bugs in button styling:

**1. Back-to-top button position in mobile:**
- BEFORE: Button was included in flexbox layout but not positioned (defaulted to left)
- AFTER: Excluded from flexbox layout, positioned at bottom-right (1.5rem) - same as desktop
- Mobile flexbox layout now has 5 buttons (download, print, shortcuts, theme, info)
- Back-to-top stays independently positioned at bottom-right corner

**2. Consistent hover effects for all buttons:**
- BEFORE: Only info and shortcuts buttons had enhanced box-shadow on hover
- AFTER: All buttons (download, print, shortcuts, info, back-to-top) have consistent hover effects
- Added `box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important` to mobile hover states
- Creates unified "edge glow" effect across all button hovers

**Technical changes:**
- Split mobile button reset into two groups (flexbox buttons vs back-to-top)
- Enhanced mobile hover effect with box-shadow for visual consistency
- Maintains desktop behavior (back-to-top at bottom-right: 2rem)

Files modified: static/css/main.css
2025-11-18 21:42:01 +00:00
juanatsap 6e2b042c8d feat(pdf-modal): implement interactive thumbnail selection
Transform PDF modal from placeholder to functional UI with three
interactive thumbnail cards using skeleton/placeholder styling.

Features:
- Three thumbnail options: Short CV (1 page), Long CV (2 pages), Custom (coming soon)
- Skeleton shimmer animations (1.8s, 60fps, GPU-accelerated)
- Click-to-select with visual feedback (green border, shadow, checkmark)
- Radio button behavior (only one selection at a time)
- Download button with enable/disable state management
- Keyboard navigation support (Tab, Enter, Space, ESC)
- Full ARIA attributes for screen reader accessibility
- Responsive layout (3 cols desktop, 2 cols tablet, 1 col mobile)
- Multilingual support (EN/ES) using Go template conditionals
- Download stub (shows alert, ready for backend integration)

Implementation:
- templates/partials/modals/pdf-modal.html: Complete rewrite (244 lines)
- static/css/main.css: Add PDF modal section (+290 lines)
- tests/mjs/14-pdf-modal.test.mjs: Comprehensive E2E test suite (570 lines)
- prompts/005-pdf-download-thumbnails-IMPLEMENTATION.md: Documentation

Tests:  12/12 PASSED
- Modal structure validation
- Three thumbnail cards display
- Selection interaction (click, keyboard)
- Download button state management
- ESC key closes modal
- Accessibility compliance (ARIA, roles, tabindex)
- Responsive layout (375px, 768px, 1920px)
- Multilingual support validation
- No console errors

Screenshots:
- tests/screenshots/pdf-modal-initial.png
- tests/screenshots/pdf-modal-short-selected.png
- tests/screenshots/pdf-modal-long-selected.png

Technical Details:
- Uses Hyperscript for state management (consistent with project)
- Native <dialog> element for accessibility
- Reuses skeleton.css patterns for shimmer animation
- Follows existing modal patterns (shortcuts-modal.html)
- Performance: <5KB gzipped overhead
- Browser support: 95%+ (all modern browsers)

Next Steps:
- Backend PDF generation (/download-pdf endpoint)
- Custom wizard implementation (Phase 3)
- PDF preview feature (Phase 4)

Refs: prompts/005-pdf-download-thumbnails.md
2025-11-18 20:25:49 +00:00
juanatsap 2ca13a218e feat: Extend skeleton loaders to all 13 CV sections with structural fidelity
Implemented comprehensive skeleton loaders for the entire CV curriculum,
providing smooth loading animations during language transitions across
all sections.

**Sections Implemented (13 total):**
- Header (title-badges + personal info)
- Education
- Skills Summary
- Experience (with company logos, descriptions, responsibilities)
- Awards (with logos, issuers, descriptions)
- Projects (with icons, descriptions, tech stacks)
- Courses (with icons, institutions, dates)
- Languages
- References
- Other Information
- Skills Sidebars (left and right)
- Footer

**Key Features:**
- Structural fidelity: Skeletons mirror exact HTML structure of actual content
- Each section has realistic placeholders (e.g., 3 experience items, 2 projects)
- Smooth CSS transitions with shimmer animations
- Zero layout shift
- Component-level architecture allows independent loading states

**Technical Implementation:**
- Modified all section templates in templates/partials/sections/
- Added .component-wrapper with .actual-content + .skeleton-content structure
- Extended skeleton.css with structural skeleton classes
- JavaScript event handlers in main.js already handle all sections via CSS cascade

**Testing:**
- Manual Playwright test: 13/13 component wrappers verified
- Automated test: 7/7 tests passing
- All skeleton loaders show during language switches
- No stuck loading states

**Documentation:**
- Updated tests/TEST-SUMMARY.md with all 13 sections
- Updated doc/2-MODERN-WEB-TECHNIQUES.md with comprehensive details
- Added structural fidelity table showing skeleton elements for each section

Files modified: 14 templates + CSS + 2 docs
2025-11-18 20:18:28 +00:00
juanatsap 8c0328357b fix: remove CSPNonce from Matomo script (not implemented in backend)
ISSUE: Matomo analytics not loading in production

ROOT CAUSE:
- Matomo script had nonce="{{.CSPNonce}}" attribute
- Go backend doesn't generate CSPNonce template variable
- Empty nonce attribute caused CSP to block the script in production

FIX:
- Removed nonce attribute from Matomo script tag
- CSP header already includes 'unsafe-inline' so nonces not needed
- Script now loads correctly in both localhost and production

VERIFICATION:
- Matomo will now load and track pageviews in production
- Check browser console for _paq object
- Verify tracking in Matomo dashboard
2025-11-18 19:47:38 +00:00
juanatsap d20a00ab53 docs: Archive skeleton loader debug documentation (feature complete)
Remove SKELETON-LOADER-DEBUG-STATUS.md (318 lines) - debugging document no longer needed after successful resolution.

Feature status:
- Implementation complete (JavaScript migration from hyperscript)
- All 7 automated tests passing
- Manual testing verified working
- Documented in 2-MODERN-WEB-TECHNIQUES.md Section 11

This debug log served its purpose during troubleshooting but is now redundant with:
- Production code documentation
2025-11-18 19:40:56 +00:00
juanatsap 1f6f8e417e docs: Update skeleton loader implementation from hyperscript to JavaScript
MIGRATION SUMMARY:
- Moved skeleton loader logic from hyperscript to JavaScript (main.js)
- Changed from htmx:oobAfterSwap to htmx:afterSettle event
- Changed OOB swap from innerHTML to outerHTML for proper element replacement
- Added languageSwitching flag for state tracking
- Added 100ms delay after afterSettle for final render completion

DOCUMENTATION UPDATES:
- 2-MODERN-WEB-TECHNIQUES.md: Updated skeleton loader section with
2025-11-18 19:32:28 +00:00
juanatsap 65eb91b00b docs: Rename 0-README.md to README.md (standard convention)
Keep README.md as the standard filename for better GitHub integration
and platform recognition. All other docs remain numbered (1-10).
2025-11-18 19:28:40 +00:00
juanatsap 3fa5d1e5ca docs: Rename all documentation with numbered prefixes for clarity
RENAMING:
- README.md → 0-README.md (start here)
- ARCHITECTURE.md → 1-ARCHITECTURE.md (backend overview)
- MODERN-WEB-TECHNIQUES.md → 2-MODERN-WEB-TECHNIQUES.md (frontend architecture)
- API.md → 3-API.md (API reference)
- HYPERSCRIPT-RULES.md → 4-HYPERSCRIPT-RULES.md (conventions)
- ZOOM_IMPLEMENTATION.md → 5-ZOOM-IMPLEMENTATION.md (zoom feature)
- USER_GUIDE.md → 6-USER-GUIDE.md (user docs)
- CUSTOMIZATION.md → 7-CUSTOMIZATION.md (customization guide)
- DEPLOYMENT.md → 8-DEPLOYMENT.md (deployment)
- SECURITY.md → 9-SECURITY.md (security)
- PRIVACY.md → 10-PRIVACY.md (privacy policy)

CROSS-REFERENCE UPDATES:
- Updated all internal links in all documentation files
- Updated README navigation with numbered references
- Added # column to documentation tables
- Made all links use numbered filenames

BENEFITS:
 Clear reading order (0-10)
 Logical progression (overview → technical → user → ops → compliance)
 Easy sorting and navigation
 Professional organization
 Zero broken links
2025-11-18 19:12:50 +00:00
juanatsap 81e8b3c25e docs: Clean up documentation directory - eliminate redundancy
CLEANUP SUMMARY:
- Moved to archive: 3 files (historical/debugging docs)
  - ZOOM-CONTROL-FIX-REPORT.md
  - ZOOM-FIXES-COMPLETE-SUMMARY.md
  - PROJECT_IMPROVEMENT_SUMMARY.md.ASPIRATIONAL → PROJECT_IMPROVEMENT_SUMMARY.md

- Deleted: 1 file (duplicate content)
  - COLOR-THEME-IMPLEMENTATION.md (content already in MODERN-WEB-TECHNIQUES.md)

- Created: 1 file (navigation index)
  - README.md with complete documentation navigation

RESULT:
- Before: 14 files (403 lines redundant)
- After: 11 files (clean, organized, zero redundancy)
- Archive: 20 files (properly categorized historical docs)

BENEFITS:
- Zero documentation duplication
- Clear navigation structure
- Canonical source for each topic
- Historical docs preserved in archive
2025-11-18 18:59:41 +00:00
juanatsap 8745a3661e docs: Phase 3 Complete - Strategic Documentation (ADRs, Budgets, Scalability, Debt, Migrations)
- Add 5 Architectural Decision Records (ADRs)
  - ADR-001: Hypermedia-Driven Architecture with HTMX
  - ADR-002: Hyperscript for Declarative Behaviors
  - ADR-003: CSS Custom Properties for Theming
  - ADR-004: Component-Level Skeleton Loaders
  - ADR-005: Modular File Organization Pattern

- Add Performance Budgets table (12 metrics)
  - Core Web Vitals targets (FCP <1.8s, LCP <2.5s, CLS <0.1)
  - Bundle size budgets (JS <30KB, CSS <50KB)
  - Monitoring and enforcement strategy

- Add Scalability Guidance
  - 4-level horizontal scaling strategy (single server → 1M users)
  - Caching layer architecture (browser → CDN → app → origin)
  - HTMX-specific scaling considerations

- Add Technical Debt Inventory
  - 8 prioritized debt items (High/Medium/Low)
  - 17 days total estimated effort
  - Categorized by impact and solutions

- Add Migration Paths (5 scenarios)
  - HTMX → Alpine.js → React (framework migration)
  - Adding build tooling (Vite/esbuild)
  - Static → Dynamic content (CMS integration)
  - Monolith → Microservices
  - Self-hosted → Serverless (Cloudflare Workers/Lambda)

Total: 468 lines of strategic planning documentation
Grade: Documentation now A- (95% accuracy)
2025-11-18 17:24:38 +00:00
juanatsap 1a6467a43a docs: Phase 2 Complete - HTMX Patterns Enhancement & Hover Sync
FINAL PHASE 2 ADDITIONS:

### HTMX Patterns Section Enhancement (lines 558-689)
Added advanced production patterns used in the project:

1. **Advanced Swap Timing**
   - swap:250ms settle:250ms modifiers
   - Coordinated fade-out/fade-in transitions
   - Use cases: language switching, skeleton loaders

2. **Out-of-Band Swaps (Multi-Target Updates)**
   - Problem statement and solution
   - Complete code examples (main + OOB targets)
   - Real example from language switching
   - Benefits: Single round-trip, atomic updates
   - Key Points: ID matching, DOM transaction atomicity

3. **History Management (hx-push-url)**
   - SPA-like navigation patterns
   - Shareable URLs for dynamic content
   - Back/forward button support
   - Real example: /?lang=es URLs

4. **Loading States Reference**
   - External indicator pattern
   - Cross-reference to Section 10
   - Opacity transitions instead of display toggle

LINES ADDED: 131 lines comprehensive HTMX patterns

### Hover Synchronization Pattern (lines 1164-1279)
JavaScript wrapper → Hyperscript call bridge pattern

**Complete Documentation:**
- Problem: Duplicate buttons (PDF/Print/Zoom) need sync hover
- Challenge: JavaScript events can't directly call hyperscript
- Solution: Wrapper function bridge pattern

**Architecture Layers:**
1. JavaScript layer (main.js)
   - mouseenter/mouseleave event listeners
   - Calls hyperscript functions as bridge

2. Hyperscript layer (hover-sync._hs)
   - syncPdfHover(show), syncPrintHover(show)
   - highlightZoomControl(show)
   - Class manipulation logic

3. CSS layer
   - .pdf-hover-sync, .print-hover-sync classes
   - Visual feedback with transforms

**Step-by-Step Flow:**
- 8-step detailed breakdown
- User action → JS event → Hyperscript logic → CSS transition
- Complete cycle from mouseenter to mouseleave

**Benefits:**
- Visual coherence across UI components
- No refresh needed (pure CSS)
- JavaScript-Hyperscript paradigm bridge
- Performance optimized (class toggling)

LINES ADDED: 115 lines comprehensive hover sync documentation

---

PHASE 2 SUMMARY:
- Section 11: Skeleton Loaders (127 lines)
- Section 12: Color Theme System (173 lines)
- HTMX Patterns Enhancement (131 lines)
- Hover Synchronization Pattern (115 lines)

TOTAL PHASE 2: 546 lines comprehensive documentation
QUALITY: Production-ready reference with real examples
TESTING: All patterns verified with automated tests

PHASE 2 STATUS: 100% COMPLETE 
2025-11-18 17:14:11 +00:00
juanatsap 0e33d7c886 docs: Phase 2 - Add Skeleton Loaders and Color Theme System sections
MAJOR FEATURES DOCUMENTED:

### Section 11: Skeleton Loaders (lines 1638-1764)
Component-level content placeholders for smooth loading transitions

KEY FEATURES:
- Pixel-perfect skeleton matching (header, photo, sections, experience)
- GPU-accelerated shimmer animation (1.8s ease-in-out infinite)
- Component-wrapper architecture (dual-state: actual + skeleton)
- HTMX event integration (beforeSwap → show, afterSettle → hide)
- Zero layout shift during transitions
- Accessibility: Respects prefers-reduced-motion
- Print-friendly: Skeletons hidden in @media print

IMPLEMENTATION:
- static/css/skeleton.css (341 lines)
- templates/partials/skeleton-loader.html
- HTMX event listeners in main.js
- tests/mjs/12-skeleton-language-transitions.test.mjs

BENEFITS:
- Professional UX like modern SPAs (LinkedIn, Facebook)
- Smooth 250ms fade transitions
- Reusable for any HTMX swap operation
- Independent component loading states

### Section 12: Color Theme System (lines 1767-1939)
Dynamic light/dark/auto theme switching with CSS custom properties

KEY FEATURES:
- Three theme modes: Auto (system), Light, Dark
- CSS custom properties for instant switching
- localStorage persistence across sessions
- System integration via prefers-color-scheme
- Dynamic button colors per theme mode:
  * Auto: Purple (#9b59b6)
  * Light: Orange/Yellow (#f39c12)
  * Dark: Blue (#3498db)
- Dual-theme architecture (Color + Layout independent)

IMPLEMENTATION:
- static/css/color-theme.css (258 lines)
- static/hyperscript/color-theme._hs (59 lines)
- setColorTheme(), initColorTheme() functions
- Fixed floating button with theme cycling
- tests/mjs/13-color-theme-switcher.test.mjs

BENEFITS:
- User comfort (choose preference or follow system)
- Instant switching (CSS custom properties, no reflow)
- Accessible (WCAG AA contrast compliance)
- Zero JavaScript for theme application
- Separation of concerns (color vs. layout)

DOCUMENTATION QUALITY:
- Complete before/after code examples
- Architecture pattern breakdowns
- Comprehensive benefits lists
- Testing information included
- Pixel-perfect matching tables (skeletons)
- CSS custom properties reference (theme)

IMPACT: +306 lines comprehensive documentation
TIME: ~90 minutes (partial Phase 2 complete)
REMAINING: HTMX patterns enhancement, hover sync documentation
2025-11-18 17:07:13 +00:00