27c2f4b44f594bb4398d3d4f4864c9c73ab0bdd2
Experience Section Improvements: - Increased company logo size from 48px to 64px - Added default office building icon for companies without logos - Increased spacing between entries (2.5rem margin, 2rem padding) - Added visible separator lines (2px solid #ddd) - Made dates bold (weight: 600) and larger (1.05rem) - Changed date color to #555 for better contrast Dynamic Duration Calculation: - Added automatic years/months calculation for each position - Format: "(4 years 10 months)", "(2 years)", "(6 months)" - Smart pluralization in English and Spanish - Handles current positions (calculates to today) - Added Duration field to Experience model Iconify Integration: - Added Iconify library (v3.1.1) for icon management - Replaced EN/ES text with round flag icons (circle-flags:us, circle-flags:es) - Updated CV site icon to mdi:file-account - Replaced toggle text with intuitive icons: * Short/Long: mdi:file-document-outline / mdi:file-document-multiple-outline * Logos: mdi:image-off-outline / mdi:image-multiple-outline - Default company icon: mdi:office-building (64x64px, light gray background) Logo Display: - Logos now show by default (toggle checked on page load) - Toggle controls icon visibility - Consistent spacing with default icon placeholder Files modified: - internal/handlers/cv.go: Added calculateDuration() function - internal/models/cv.go: Added Duration field to Experience struct - templates/index.html: Iconify integration, flag icons, toggle icons - templates/cv-content.html: Duration display, default icon logic - static/css/main.css: Bold dates, larger font sizes - static/css/logo-toggle.css: Icon styling, separator lines, spacing
CV Site - Go + HTMX
Modern, minimal curriculum vitae website for Juan Andrés Moreno Rubio built with Go and HTMX.
🚀 Features
- ✅ Bilingual Support - Spanish and English with instant switching (no page reload)
- ✅ Server-Side PDF Export - Professional PDF generation using chromedp (headless Chrome)
- ✅ Browser Print - Alternative print-friendly layout for manual PDF creation
- ✅ HTMX Dynamic Updates - Smooth UX without heavy JavaScript
- ✅ Paper Design - Professional CV on elegant white paper with gray background
- ✅ Responsive - Mobile, tablet, and desktop friendly
- ✅ JSON-Based Content - Easy to update without touching code
- ✅ AI Development Section - Showcases modern AI-assisted development skills
- ✅ Fast & Lightweight - Go backend with chromedp for PDF generation
📋 Quick Start
Prerequisites
- Go 1.21+ installed
Run
```bash
Build and run
go build -o cv-server && ./cv-server ```
- 🇬🇧 English: http://localhost:1999/?lang=en
- 🇪🇸 Spanish: http://localhost:1999/?lang=es
📄 Updating Your CV
Edit JSON files in data/:
- English:
data/cv-en.json - Spanish:
data/cv-es.json
No code changes needed - just refresh browser!
🖨️ Export to PDF
Server-Side PDF Generation (Recommended)
- Click "Download as PDF" button in the action bar
- PDF is generated server-side using headless Chrome
- File downloads automatically:
CV-Juan-Andres-Moreno-Rubio-{lang}.pdf
Advantages:
- Consistent rendering across all platforms
- Perfect font rendering
- No browser compatibility issues
- Professional quality output
Browser Print (Alternative)
- Click "Print Friendly" button
- Use browser print dialog (Cmd/Ctrl + P)
- Select "Save as PDF"
Endpoints:
- English PDF:
http://localhost:1999/export/pdf?lang=en - Spanish PDF:
http://localhost:1999/export/pdf?lang=es
🎯 Key Technologies
- Backend: Go (stdlib net/http)
- PDF Generation: chromedp (headless Chrome automation)
- Frontend: HTMX 1.9.10
- Styling: Custom CSS with Quicksand font
- Data: JSON files
Built with ❤️ using Go, HTMX, and AI assistance
Languages
JavaScript
45.8%
Go
29%
CSS
14.6%
HTML
8.9%
Shell
1.5%
Other
0.2%