Initial commit: Go + HTMX CV Site

- Minimal, professional CV design with paper-on-gray layout
- Bilingual support (Spanish/English) with HTMX language switching
- JSON-based content management (cv-en.json, cv-es.json)
- Print-optimized CSS for PDF export
- Responsive design for all devices
- Go backend with stdlib net/http
- Clean, maintainable codebase

Features:
- 18+ years professional experience
- SAP CDC expertise
- Complete project history
- Education, certifications, awards
- Multi-language support

Tech stack: Go, HTMX, vanilla CSS
This commit is contained in:
juanatsap
2025-10-20 08:54:21 +01:00
commit dab68f34f2
28 changed files with 5862 additions and 0 deletions
+151
View File
@@ -0,0 +1,151 @@
package models
import (
"encoding/json"
"fmt"
"os"
)
// CV represents the complete curriculum vitae structure
type CV struct {
Personal Personal `json:"personal"`
Summary string `json:"summary"`
Experience []Experience `json:"experience"`
AIDevelopment AIDevelopment `json:"ai_development"`
Education []Education `json:"education"`
Skills Skills `json:"skills"`
Languages []Language `json:"languages"`
Projects []Project `json:"projects"`
Awards []Award `json:"awards"`
Certifications []Certification `json:"certifications"`
Other Other `json:"other"`
Meta Meta `json:"meta"`
}
type Personal struct {
Name string `json:"name"`
Title string `json:"title"`
Location string `json:"location"`
Email string `json:"email"`
Phone string `json:"phone"`
DateOfBirth string `json:"dateOfBirth"`
PlaceOfBirth string `json:"placeOfBirth"`
Citizenship string `json:"citizenship"`
LinkedIn string `json:"linkedin"`
GitHub string `json:"github"`
Behance string `json:"behance"`
Website string `json:"website"`
Photo string `json:"photo"`
}
type Experience struct {
Position string `json:"position"`
Company string `json:"company"`
Location string `json:"location"`
StartDate string `json:"startDate"`
EndDate string `json:"endDate"`
Current bool `json:"current"`
Responsibilities []string `json:"responsibilities"`
Technologies []string `json:"technologies"`
Highlights []string `json:"highlights"`
}
type AIDevelopment struct {
Title string `json:"title"`
Period string `json:"period"`
Description string `json:"description"`
Skills []AISkill `json:"skills"`
Achievements []string `json:"achievements"`
}
type AISkill struct {
Category string `json:"category"`
Proficiency string `json:"proficiency"`
Items []string `json:"items"`
}
type Education struct {
Degree string `json:"degree"`
Institution string `json:"institution"`
Location string `json:"location"`
StartDate string `json:"startDate"`
EndDate string `json:"endDate"`
Field string `json:"field"`
}
type Skills struct {
Technical []SkillCategory `json:"technical"`
SoftSkills []string `json:"soft_skills"`
}
type SkillCategory struct {
Category string `json:"category"`
Proficiency int `json:"proficiency"`
Items []string `json:"items"`
}
type Language struct {
Language string `json:"language"`
Proficiency string `json:"proficiency"`
Level int `json:"level"`
}
type Project struct {
Name string `json:"name"`
Role string `json:"role"`
URL string `json:"url"`
Period string `json:"period"`
Description string `json:"description"`
Technologies []string `json:"technologies"`
Highlights []string `json:"highlights"`
}
type Award struct {
Title string `json:"title"`
Issuer string `json:"issuer"`
Date string `json:"date"`
Description string `json:"description"`
}
type Certification struct {
Name string `json:"name"`
Issuer string `json:"issuer"`
Date string `json:"date"`
Description string `json:"description"`
}
type Other struct {
DriverLicense string `json:"driverLicense"`
}
type Meta struct {
Version string `json:"version"`
LastUpdated string `json:"lastUpdated"`
Format string `json:"format"`
Language string `json:"language"`
}
// LoadCV loads CV data from a JSON file for the specified language
func LoadCV(lang string) (*CV, error) {
// Validate language
if lang != "en" && lang != "es" {
return nil, fmt.Errorf("unsupported language: %s", lang)
}
// Determine which JSON file to load
filename := fmt.Sprintf("data/cv-%s.json", lang)
// Read the JSON file
data, err := os.ReadFile(filename)
if err != nil {
return nil, fmt.Errorf("error reading file %s: %w", filename, err)
}
// Parse JSON
var cv CV
if err := json.Unmarshal(data, &cv); err != nil {
return nil, fmt.Errorf("error parsing JSON: %w", err)
}
return &cv, nil
}