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": [
{
"title": "Recommendations Letter from TwenTIC",
"url": "http://www.drolosoft.com/2010/downloads/recomendacion.pdf",
"title": "Recommendations from Megabanner",
"url": "https://www.linkedin.com/in/juan-andres-moreno-rubio/details/recommendations/",
"type": "recommendation",
"linkText": "Recommendations Letter",
"textAfter": "from TwenTIC"
"textBefore": "Recommendations from",
"linkText": "Megabanner",
"textAfter": "(David Amorós)"
},
{
"title": "Presentation Letter",
"url": "http://www.domestika.org/empleo/demanda/txeo",
"url": "https://www.domestika.org/es/txeo",
"type": "presentation",
"linkText": "Presentation Letter"
},
@@ -901,8 +902,9 @@
},
{
"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",
"action": "downloadPDF",
"textBefore": "Curriculum Vitae",
"linkText": "chronological",
"textAfter": "(7 pages)"
+8 -6
View File
@@ -864,15 +864,16 @@
],
"references": [
{
"title": "Cartas de recomendación de TwenTiC",
"url": "http://www.drolosoft.com/2010/downloads/recomendacion.pdf",
"title": "Recomendaciones de Megabanner",
"url": "https://www.linkedin.com/in/juan-andres-moreno-rubio/details/recommendations/",
"type": "recommendation",
"linkText": "Cartas de recomendación",
"textAfter": "de TwenTiC"
"textBefore": "Recomendaciones de",
"linkText": "Megabanner",
"textAfter": "(David Amorós)"
},
{
"title": "Carta de presentación",
"url": "http://www.domestika.org/empleo/demanda/txeo",
"url": "https://www.domestika.org/es/txeo",
"type": "presentation",
"linkText": "Carta de presentación"
},
@@ -906,8 +907,9 @@
},
{
"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",
"action": "downloadPDF",
"textBefore": "Currículum Vitae",
"linkText": "cronológico",
"textAfter": "(7 páginas)"
+2 -1
View File
@@ -152,7 +152,8 @@ type Course struct {
type Reference struct {
Title string `json:"title"`
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
LinkText string `json:"linkText,omitempty"` // Bold text inside the link
TextAfter string `json:"textAfter,omitempty"` // Text after the link
+1 -6
View File
@@ -196,12 +196,7 @@
height: auto;
}
/* Hide logos in print by default */
@media print {
.company-logo {
display: none !important;
}
}
/* Company logos visible in print - styling controlled by print.css */
/* Mobile responsiveness */
@media (max-width: 768px) {
+1 -1
View File
@@ -330,7 +330,7 @@
</summary>
{{range .CV.References}}
<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>
{{end}}
</details>