feat: update references section and fix experience logos in print

References section improvements:
- Remove TwenTIC recommendation letter
- Add Megabanner recommendations with author attribution (David Amorós)
- Update Presentation Letter URL to Domestika profile
- Update Chronological CV link to trigger PDF download modal
- Add 'action' field to Reference struct for custom behaviors

Print layout fixes:
- Show experience company logos in print view (40×40px)
- Remove print media query that was hiding .company-logo elements
- Maintain consistency with other logo types (courses, projects, awards)

Technical changes:
- Add Action field to Reference model with omitempty JSON tag
- Implement conditional rendering for downloadPDF action in template
- Links with action="downloadPDF" now call openPdfModal() function
This commit is contained in:
juanatsap
2025-11-10 16:34:30 +00:00
parent 7e2d31f441
commit fc0eb8443a
5 changed files with 20 additions and 20 deletions
+8 -6
View File
@@ -859,15 +859,16 @@
], ],
"references": [ "references": [
{ {
"title": "Recommendations Letter from TwenTIC", "title": "Recommendations from Megabanner",
"url": "http://www.drolosoft.com/2010/downloads/recomendacion.pdf", "url": "https://www.linkedin.com/in/juan-andres-moreno-rubio/details/recommendations/",
"type": "recommendation", "type": "recommendation",
"linkText": "Recommendations Letter", "textBefore": "Recommendations from",
"textAfter": "from TwenTIC" "linkText": "Megabanner",
"textAfter": "(David Amorós)"
}, },
{ {
"title": "Presentation Letter", "title": "Presentation Letter",
"url": "http://www.domestika.org/empleo/demanda/txeo", "url": "https://www.domestika.org/es/txeo",
"type": "presentation", "type": "presentation",
"linkText": "Presentation Letter" "linkText": "Presentation Letter"
}, },
@@ -901,8 +902,9 @@
}, },
{ {
"title": "Curriculum Vitae chronological (7 pages)", "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);", "url": "#",
"type": "cv", "type": "cv",
"action": "downloadPDF",
"textBefore": "Curriculum Vitae", "textBefore": "Curriculum Vitae",
"linkText": "chronological", "linkText": "chronological",
"textAfter": "(7 pages)" "textAfter": "(7 pages)"
+8 -6
View File
@@ -864,15 +864,16 @@
], ],
"references": [ "references": [
{ {
"title": "Cartas de recomendación de TwenTiC", "title": "Recomendaciones de Megabanner",
"url": "http://www.drolosoft.com/2010/downloads/recomendacion.pdf", "url": "https://www.linkedin.com/in/juan-andres-moreno-rubio/details/recommendations/",
"type": "recommendation", "type": "recommendation",
"linkText": "Cartas de recomendación", "textBefore": "Recomendaciones de",
"textAfter": "de TwenTiC" "linkText": "Megabanner",
"textAfter": "(David Amorós)"
}, },
{ {
"title": "Carta de presentación", "title": "Carta de presentación",
"url": "http://www.domestika.org/empleo/demanda/txeo", "url": "https://www.domestika.org/es/txeo",
"type": "presentation", "type": "presentation",
"linkText": "Carta de presentación" "linkText": "Carta de presentación"
}, },
@@ -906,8 +907,9 @@
}, },
{ {
"title": "Currículum Vitae cronológico (7 páginas)", "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);", "url": "#",
"type": "cv", "type": "cv",
"action": "downloadPDF",
"textBefore": "Currículum Vitae", "textBefore": "Currículum Vitae",
"linkText": "cronológico", "linkText": "cronológico",
"textAfter": "(7 páginas)" "textAfter": "(7 páginas)"
+2 -1
View File
@@ -152,7 +152,8 @@ type Course struct {
type Reference struct { type Reference struct {
Title string `json:"title"` Title string `json:"title"`
URL string `json:"url"` URL string `json:"url"`
Type string `json:"type"` // "recommendation", "portfolio", "profile", "cv", "presentation" Type string `json:"type"` // "recommendation", "portfolio", "profile", "cv", "presentation"
Action string `json:"action,omitempty"` // Optional action like "downloadPDF"
TextBefore string `json:"textBefore,omitempty"` // Text before the link TextBefore string `json:"textBefore,omitempty"` // Text before the link
LinkText string `json:"linkText,omitempty"` // Bold text inside the link LinkText string `json:"linkText,omitempty"` // Bold text inside the link
TextAfter string `json:"textAfter,omitempty"` // Text after the link TextAfter string `json:"textAfter,omitempty"` // Text after the link
+1 -6
View File
@@ -196,12 +196,7 @@
height: auto; height: auto;
} }
/* Hide logos in print by default */ /* Company logos visible in print - styling controlled by print.css */
@media print {
.company-logo {
display: none !important;
}
}
/* Mobile responsiveness */ /* Mobile responsiveness */
@media (max-width: 768px) { @media (max-width: 768px) {
+1 -1
View File
@@ -330,7 +330,7 @@
</summary> </summary>
{{range .CV.References}} {{range .CV.References}}
<div class="reference-item"> <div class="reference-item">
{{if .TextBefore}}{{.TextBefore}} {{end}}<a href="{{.URL}}" target="_blank" rel="noopener noreferrer"><strong>{{if .LinkText}}{{.LinkText}}{{else}}{{.Title}}{{end}}</strong></a>{{if .TextAfter}} {{.TextAfter}}{{end}} {{if .TextBefore}}{{.TextBefore}} {{end}}{{if eq .Action "downloadPDF"}}<a href="{{.URL}}" onclick="event.preventDefault(); openPdfModal(); return false;"><strong>{{if .LinkText}}{{.LinkText}}{{else}}{{.Title}}{{end}}</strong></a>{{else}}<a href="{{.URL}}" target="_blank" rel="noopener noreferrer"><strong>{{if .LinkText}}{{.LinkText}}{{else}}{{.Title}}{{end}}</strong></a>{{end}}{{if .TextAfter}} {{.TextAfter}}{{end}}
</div> </div>
{{end}} {{end}}
</details> </details>