feat: implement dynamic date calculation for projects

- Remove hardcoded startDate from La Porra project
- Add gitRepoUrl field to Project struct for dynamic date fetching
- Implement backend logic to fetch first commit date from git repositories
- Add processProjectDates function to calculate dates dynamically
- Update template to display computed dates and dynamic "Present/Presente"
- Add support for both static and git-based project start dates

When a project has a gitRepoUrl, the system automatically fetches the first
commit date from the repository. For current projects, it displays
"Present" (English) or "Presente" (Spanish) dynamically from the backend.

The La Porra project now uses git repository path for date calculation
instead of hardcoded JSON values.
This commit is contained in:
juanatsap
2025-11-09 02:43:40 +00:00
parent a6783da1f6
commit e572af0771
7 changed files with 267 additions and 97 deletions
+11 -2
View File
@@ -197,7 +197,7 @@
<section id="projects" class="cv-section">
<h3 class="section-title">
<iconify-icon icon="mdi:web" width="24" height="24" class="section-icon"></iconify-icon>
{{if eq .Lang "es"}}Proyectos Personales{{else}}Personal Projects{{end}}
{{if eq .Lang "es"}}Proyectos Personales / Freelance{{else}}Personal / Freelance Projects{{end}}
</h3>
{{range .CV.Projects}}
<div class="project-item">
@@ -227,7 +227,16 @@
<span class="maintained-badge">{{if eq $.Lang "es"}}MANTENIDO POR{{else}}MAINTAINED BY{{end}} {{.MaintainedBy}}</span>
{{end}}
</h4>
<span class="project-period">{{.StartDate}} {{if .Current}}/ {{if eq $.Lang "es"}}presente{{else}}now{{end}}{{end}}</span>
<span class="project-period">
{{if .StartDate}}{{.StartDate}}{{end}}
{{if .Current}}
{{if .DynamicDate}}
/ {{.DynamicDate}}
{{else}}
/ {{if eq $.Lang "es"}}presente{{else}}now{{end}}
{{end}}
{{end}}
</span>
<span class="project-separator">&nbsp;-&nbsp;</span>
<span class="project-location">({{.Location}})</span>
</div>