feat: add course logo support with servoy, forem, and camaracomercio logos

- Add courseLogo field to Course struct in Go
- Update template to display course logos with fallback to school icon
- Add CSS styling for course logo images (80x80px, contained, bordered)
- Add logos to three courses in both English and Spanish:
  * Servoy World 2011 (servoy.png)
  * Train the Trainers / Formador de Formadores (forem.png)
  * Windows 2003 Server (camaracomercio.png)
- Course logos stored in /static/images/courses/ folder
- Similar implementation to project logos with error handling
This commit is contained in:
juanatsap
2025-11-09 03:21:48 +00:00
parent e9b11cb946
commit 740c435d1e
9 changed files with 23 additions and 0 deletions
+3
View File
@@ -667,6 +667,7 @@
{
"title": "Servoy World 2011",
"institution": "Servoy",
"courseLogo": "servoy.png",
"location": "Amsterdam",
"date": "2011-02",
"duration": "3 days",
@@ -680,6 +681,7 @@
{
"title": "Train the Trainers",
"institution": "FOREM Extremadura",
"courseLogo": "forem.png",
"location": "Cáceres",
"date": "2009-06",
"duration": "150 hours",
@@ -693,6 +695,7 @@
{
"title": "Windows 2003 Server",
"institution": "Cáceres Chamber of Commerce",
"courseLogo": "camaracomercio.png",
"location": "Cáceres",
"date": "2006-01",
"duration": "80 hours",
+3
View File
@@ -672,6 +672,7 @@
{
"title": "Servoy World 2011",
"institution": "Servoy",
"courseLogo": "servoy.png",
"location": "Amsterdam",
"date": "2011-02",
"duration": "3 días",
@@ -685,6 +686,7 @@
{
"title": "Formador de Formadores",
"institution": "FOREM Extremadura",
"courseLogo": "forem.png",
"location": "Cáceres",
"date": "2009-06",
"duration": "150 horas",
@@ -698,6 +700,7 @@
{
"title": "Windows 2003 Server",
"institution": "Cámara de Comercio de Cáceres",
"courseLogo": "camaracomercio.png",
"location": "Cáceres",
"date": "2006-01",
"duration": "80 horas",
+1
View File
@@ -137,6 +137,7 @@ type Certification struct {
type Course struct {
Title string `json:"title"`
Institution string `json:"institution"`
CourseLogo string `json:"courseLogo,omitempty"` // Optional logo filename
Location string `json:"location"`
Date string `json:"date"`
Duration string `json:"duration"`
+10
View File
@@ -894,6 +894,16 @@ iconify-icon {
justify-content: center;
}
.course-icon img {
width: 80px;
height: 80px;
object-fit: contain;
border-radius: 4px;
border: 1px solid #ddd;
background: #f5f5f5;
padding: 4px;
}
.default-course-icon {
width: 80px;
height: 80px;
Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

+6
View File
@@ -280,9 +280,15 @@
</h3>
{{range .CV.Courses}}
<div class="course-item">
{{if .CourseLogo}}
<div class="course-icon">
<img src="/static/images/courses/{{.CourseLogo}}" alt="{{.Title}} logo" onerror="this.parentElement.innerHTML='<iconify-icon icon=\'mdi:school\' width=\'80\' height=\'80\' class=\'default-course-icon\'></iconify-icon>'">
</div>
{{else}}
<div class="course-icon">
<iconify-icon icon="mdi:school" width="80" height="80" class="default-course-icon"></iconify-icon>
</div>
{{end}}
<div class="course-content">
<div class="course-header">
<h4 class="course-title">