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:
@@ -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"> - </span>
|
||||
<span class="project-location">({{.Location}})</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user