refactor: separate UI translations from CV data

- Created separate ui-en.json and ui-es.json files for UI strings
- Removed 'ui' section from cv-en.json and cv-es.json
- Added LoadUI() function to load UI translations separately
- Updated handlers to load UI data independently from CV data
- Updated template to use .UI instead of .CV.UI

This separation follows proper concerns:
- CV JSON files contain only professional CV content
- UI JSON files contain only application interface strings
- Each can be updated independently without affecting the other
This commit is contained in:
juanatsap
2025-11-09 21:03:39 +00:00
parent de0c443764
commit 13c59c3699
9 changed files with 74 additions and 34 deletions
+7 -7
View File
@@ -297,37 +297,37 @@
</button>
<div class="info-modal-header">
<h2>{{.CV.UI.InfoModal.Title}}</h2>
<h2>{{.UI.InfoModal.Title}}</h2>
<div class="info-modal-cv-title">CV {{.CurrentYear}} - {JAMR}</div>
</div>
<div class="info-modal-body">
<p class="info-modal-description">
{{.CV.UI.InfoModal.Description}}
{{.UI.InfoModal.Description}}
</p>
<div class="info-modal-tech">
<div class="info-tech-item">
<iconify-icon icon="mdi:language-go" width="32" height="32"></iconify-icon>
<span>{{.CV.UI.InfoModal.TechStack.GoHono}}</span>
<span>{{.UI.InfoModal.TechStack.GoHono}}</span>
</div>
<div class="info-tech-item">
<iconify-icon icon="mdi:lightning-bolt" width="32" height="32"></iconify-icon>
<span>{{.CV.UI.InfoModal.TechStack.HTMX}}</span>
<span>{{.UI.InfoModal.TechStack.HTMX}}</span>
</div>
<div class="info-tech-item">
<iconify-icon icon="mdi:language-html5" width="32" height="32"></iconify-icon>
<span>{{.CV.UI.InfoModal.TechStack.HTML5}}</span>
<span>{{.UI.InfoModal.TechStack.HTML5}}</span>
</div>
<div class="info-tech-item">
<iconify-icon icon="mdi:language-css3" width="32" height="32"></iconify-icon>
<span>{{.CV.UI.InfoModal.TechStack.CSS3}}</span>
<span>{{.UI.InfoModal.TechStack.CSS3}}</span>
</div>
</div>
<a href="https://github.com/juanatsap/cv-site" target="_blank" rel="noopener noreferrer" class="info-modal-github">
<iconify-icon icon="mdi:github" width="24" height="24"></iconify-icon>
<span>{{.CV.UI.InfoModal.ViewSource}}</span>
<span>{{.UI.InfoModal.ViewSource}}</span>
<iconify-icon icon="mdi:arrow-right" width="20" height="20"></iconify-icon>
</a>
</div>