Commit Graph

4 Commits

Author SHA1 Message Date
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 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 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 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