From c77ba32780f245f9dc981244c1f7cf5092f0a68c Mon Sep 17 00:00:00 2001 From: juanatsap Date: Fri, 7 Nov 2025 18:40:02 +0000 Subject: [PATCH] feat: update References section with formatted text, bold links, and dynamic CV links --- data/cv-en.json | 43 +++++++++++++++++++++++---------------- data/cv-es.json | 41 ++++++++++++++++++++++--------------- internal/models/cv.go | 9 +++++--- templates/cv-content.html | 2 +- 4 files changed, 58 insertions(+), 37 deletions(-) diff --git a/data/cv-en.json b/data/cv-en.json index a04a92d..f2d4f89 100644 --- a/data/cv-en.json +++ b/data/cv-en.json @@ -710,42 +710,51 @@ { "title": "Recommendations Letter from TwenTIC", "url": "http://www.drolosoft.com/2010/downloads/recomendacion.pdf", - "type": "recommendation" + "type": "recommendation", + "linkText": "Recommendations Letter", + "textAfter": "from TwenTIC" }, { "title": "Presentation Letter", "url": "http://www.domestika.org/empleo/demanda/txeo", - "type": "presentation" + "type": "presentation", + "linkText": "Presentation Letter" }, { - "title": "Complete Portfolio (English)", + "title": "Complete Portfolio. English", "url": "http://www.behance.net/txeo", - "type": "portfolio" - }, - { - "title": "Complete Portfolio (Spanish)", - "url": "http://www.domestika.org/portfolios/txeo", - "type": "portfolio" + "type": "portfolio", + "textBefore": "Complete Portfolio.", + "linkText": "English" }, { "title": "LinkedIn Profile", "url": "https://www.linkedin.com/in/juan-andr%C3%A9s-moreno-rubio-3277729/", - "type": "profile" + "type": "profile", + "linkText": "LinkedIn", + "textAfter": "Profile" }, { "title": "Tecnoempleo Profile", "url": "https://www.tecnoempleo.com/juan-andres-moreno-rubio.mpt", - "type": "profile" + "type": "profile", + "linkText": "Tecnoempleo", + "textAfter": "Profile" }, { - "title": "Currículum Vitae in PDF (Spanish)", - "url": "http://www.morenoyrubio.com/cv/cv_jamr_2021_es.pdf", - "type": "cv" + "title": "Curriculum Vitae in PDF in Spanish", + "url": "/?lang=es", + "type": "cv", + "textBefore": "Curriculum Vitae in PDF in", + "linkText": "Spanish" }, { - "title": "Currículum Vitae chronological (7 pages)", - "url": "http://morenoyrubio.com/cv/cv_cronologico_jamr_2021_en.pdf", - "type": "cv" + "title": "Curriculum Vitae chronological (7 pages)", + "url": "javascript:window.print();document.getElementById('lengthToggle').checked=true;toggleCVLength();document.getElementById('themeToggle').checked=true;toggleTheme();setTimeout(()=>window.print(),100);", + "type": "cv", + "textBefore": "Curriculum Vitae", + "linkText": "chronological", + "textAfter": "(7 pages)" } ], "other": { diff --git a/data/cv-es.json b/data/cv-es.json index 5af505d..f2ee2ab 100644 --- a/data/cv-es.json +++ b/data/cv-es.json @@ -776,42 +776,51 @@ { "title": "Cartas de recomendación de TwenTiC", "url": "http://www.drolosoft.com/2010/downloads/recomendacion.pdf", - "type": "recommendation" + "type": "recommendation", + "linkText": "Cartas de recomendación", + "textAfter": "de TwenTiC" }, { "title": "Carta de presentación", "url": "http://www.domestika.org/empleo/demanda/txeo", - "type": "presentation" + "type": "presentation", + "linkText": "Carta de presentación" }, { - "title": "Portfolio Completo (Inglés)", + "title": "Portfolio Completo. Inglés", "url": "http://www.behance.net/txeo", - "type": "portfolio" - }, - { - "title": "Portfolio Completo (Castellano)", - "url": "http://www.domestika.org/portfolios/txeo", - "type": "portfolio" + "type": "portfolio", + "textBefore": "Portfolio Completo.", + "linkText": "Inglés" }, { "title": "Perfil de LinkedIn", "url": "https://www.linkedin.com/in/juan-andr%C3%A9s-moreno-rubio-3277729/", - "type": "profile" + "type": "profile", + "linkText": "LinkedIn", + "textAfter": "Perfil" }, { "title": "Perfil de Tecnoempleo", "url": "https://www.tecnoempleo.com/juan-andres-moreno-rubio.mpt", - "type": "profile" + "type": "profile", + "linkText": "Tecnoempleo", + "textAfter": "Perfil" }, { "title": "Currículum Vitae en PDF en Inglés", - "url": "http://www.morenoyrubio.com/cv/cv_jamr_2021_en.pdf", - "type": "cv" + "url": "/?lang=en", + "type": "cv", + "textBefore": "Currículum Vitae en PDF en", + "linkText": "Inglés" }, { - "title": "Currículum Vitae Cronológico", - "url": "http://morenoyrubio.com/cv/cv_cronologico_jamr_2021_es.pdf", - "type": "cv" + "title": "Currículum Vitae cronológico (7 páginas)", + "url": "javascript:window.print();document.getElementById('lengthToggle').checked=true;toggleCVLength();document.getElementById('themeToggle').checked=true;toggleTheme();setTimeout(()=>window.print(),100);", + "type": "cv", + "textBefore": "Currículum Vitae", + "linkText": "cronológico", + "textAfter": "(7 páginas)" } ], "other": { diff --git a/internal/models/cv.go b/internal/models/cv.go index 95db8cd..52d33d9 100644 --- a/internal/models/cv.go +++ b/internal/models/cv.go @@ -135,9 +135,12 @@ type Course struct { } type Reference struct { - Title string `json:"title"` - URL string `json:"url"` - Type string `json:"type"` // "recommendation", "portfolio", "profile", "cv", "presentation" + Title string `json:"title"` + URL string `json:"url"` + Type string `json:"type"` // "recommendation", "portfolio", "profile", "cv", "presentation" + TextBefore string `json:"textBefore,omitempty"` // Text before the link + LinkText string `json:"linkText,omitempty"` // Bold text inside the link + TextAfter string `json:"textAfter,omitempty"` // Text after the link } type Other struct { diff --git a/templates/cv-content.html b/templates/cv-content.html index 259f041..168cd83 100644 --- a/templates/cv-content.html +++ b/templates/cv-content.html @@ -211,7 +211,7 @@

{{if eq .Lang "es"}}Referencias{{else}}References{{end}}

{{range .CV.References}}
- {{.Title}}
+ {{if .TextBefore}}{{.TextBefore}} {{end}}{{if .LinkText}}{{.LinkText}}{{else}}{{.Title}}{{end}}{{if .TextAfter}} {{.TextAfter}}{{end}}
({{.Type}})
{{end}}