From ed0760fe3fdb4e55d4453a45ae95c8f243746b44 Mon Sep 17 00:00:00 2001 From: juanatsap Date: Tue, 4 Nov 2025 19:56:40 +0000 Subject: [PATCH] feat: add company names with optional clickable links to experience section - Add companyURL field to Experience model (optional) - Update cv-content.html template to display company name with conditional link - Add company-link CSS styling for clickable company names - Add companyURL data for major companies (Olympic Broadcasting, AENA, SAP, Gigya, Everis, Indra) - Companies without URLs display as plain text, maintaining flexibility This addresses the issue where company names were missing from the experience section and ensures links are included throughout the CV as per the original React version. --- data/cv-en.json | 6 ++++++ data/cv-es.json | 6 ++++++ internal/models/cv.go | 1 + static/css/main.css | 12 ++++++++++++ templates/cv-content.html | 11 ++++++++++- 5 files changed, 35 insertions(+), 1 deletion(-) diff --git a/data/cv-en.json b/data/cv-en.json index 037117e..51b16ca 100644 --- a/data/cv-en.json +++ b/data/cv-en.json @@ -19,6 +19,7 @@ { "position": "Senior SAP Technical Consultant", "company": "Olympic Broadcasting Services", + "companyURL": "https://www.obs.tv/", "location": "Madrid, Spain", "startDate": "2021-01", "endDate": "present", @@ -42,6 +43,7 @@ { "position": "Senior Technical Consultant", "company": "AENA (via Accenture Spain)", + "companyURL": "https://www.aena.es/", "location": "Madrid, Spain", "startDate": "2021-10", "endDate": "2023-07", @@ -73,6 +75,7 @@ { "position": "Senior Technical Consultant", "company": "SAP", + "companyURL": "https://www.sap.com/", "location": "Barcelona, Spain", "startDate": "2019-10", "endDate": "2021-10", @@ -98,6 +101,7 @@ { "position": "Junior Technical Consultant", "company": "Gigya", + "companyURL": "https://www.gigya.com/", "location": "Barcelona, Spain", "startDate": "2017-10", "endDate": "2019-10", @@ -169,6 +173,7 @@ { "position": "FullStack Developer", "company": "Everis", + "companyURL": "https://www.everis.com/", "location": "Barcelona, Spain", "startDate": "2016-04", "endDate": "2016-11", @@ -189,6 +194,7 @@ { "position": "Fullstack Developer", "company": "Indra", + "companyURL": "https://www.indracompany.com/", "location": "Barcelona, Spain", "startDate": "2015-09", "endDate": "2016-02", diff --git a/data/cv-es.json b/data/cv-es.json index 29de32c..30d6b86 100644 --- a/data/cv-es.json +++ b/data/cv-es.json @@ -19,6 +19,7 @@ { "position": "Consultor Técnico Senior SAP", "company": "Olympic Broadcasting Services", + "companyURL": "https://www.obs.tv/", "location": "Madrid, España", "startDate": "2021-01", "endDate": "presente", @@ -42,6 +43,7 @@ { "position": "Consultor Técnico Senior", "company": "AENA (vía Accenture Spain)", + "companyURL": "https://www.aena.es/", "location": "Madrid, España", "startDate": "2021-10", "endDate": "2023-07", @@ -73,6 +75,7 @@ { "position": "Consultor Técnico Senior", "company": "SAP", + "companyURL": "https://www.sap.com/", "location": "Barcelona, España", "startDate": "2019-10", "endDate": "2021-10", @@ -98,6 +101,7 @@ { "position": "Consultor Técnico Junior", "company": "Gigya", + "companyURL": "https://www.gigya.com/", "location": "Barcelona, España", "startDate": "2017-10", "endDate": "2019-10", @@ -169,6 +173,7 @@ { "position": "Desarrollador FullStack", "company": "Everis", + "companyURL": "https://www.everis.com/", "location": "Barcelona, España", "startDate": "2016-04", "endDate": "2016-11", @@ -189,6 +194,7 @@ { "position": "Desarrollador Fullstack", "company": "Indra", + "companyURL": "https://www.indracompany.com/", "location": "Barcelona, España", "startDate": "2015-09", "endDate": "2016-02", diff --git a/internal/models/cv.go b/internal/models/cv.go index 43a59c6..4a5c41c 100644 --- a/internal/models/cv.go +++ b/internal/models/cv.go @@ -43,6 +43,7 @@ type Personal struct { type Experience struct { Position string `json:"position"` Company string `json:"company"` + CompanyURL string `json:"companyURL,omitempty"` // Optional URL for company website CompanyLogo string `json:"companyLogo"` Location string `json:"location"` StartDate string `json:"startDate"` diff --git a/static/css/main.css b/static/css/main.css index 08f1e2e..212ab0e 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -1026,3 +1026,15 @@ a:focus { font-size: 1em; } } + +/* Company link styling */ +.company-link { + color: var(--accent-blue); + font-weight: 500; + text-decoration: none; +} + +.company-link:hover { + text-decoration: underline; + color: #0052a3; +} diff --git a/templates/cv-content.html b/templates/cv-content.html index 67ba95e..7b0002d 100644 --- a/templates/cv-content.html +++ b/templates/cv-content.html @@ -73,7 +73,16 @@
-

{{.Position}} / {{if eq $.Lang "es"}}Analista Programador{{else}}Analyst Programmer{{end}}

+

+ {{.Position}} / {{if eq $.Lang "es"}}Analista Programador{{else}}Analyst Programmer{{end}} + {{if .Company}} + {{if .CompanyURL}} + - {{.Company}} + {{else}} + - {{.Company}} + {{end}} + {{end}} +

{{.StartDate}} / {{if .Current}}{{if eq $.Lang "es"}}presente{{else}}now{{end}}{{else}}{{.EndDate}}{{end}} - ({{.Location}})