refactor: Extract all hardcoded content to JSON files
- Move all bilingual text from templates to UI JSON (labels, buttons, modals) - Move skills summary paragraph to CV JSON with HTML support - Add new UI sections: navigation, viewControls, sections, footer, portfolio, pdfModal, shortcutsModal, infoModal, widgets - Update Go structs to match expanded JSON structure - Add template.HTML type for CV.SkillsSummary field - Add JSON content validation test (70-json-content-validation.test.mjs) Templates now contain only structural logic (CSS classes, HTML attributes) while all user-visible text loads from JSON files for proper i18n support.
This commit is contained in:
+123
-10
@@ -1,19 +1,78 @@
|
||||
{
|
||||
"infoModal": {
|
||||
"title": "About this CV",
|
||||
"description": "This interactive CV was built by myself with <strong>Go + HTMX</strong>, showcasing modern hypermedia architecture without heavy JavaScript frameworks.",
|
||||
"techStack": {
|
||||
"goHono": "Go + Hono",
|
||||
"htmx": "HTMX",
|
||||
"html5": "Semantic HTML5",
|
||||
"css3": "Pure CSS3"
|
||||
"navigation": {
|
||||
"cvSections": "CV Sections",
|
||||
"training": "Training",
|
||||
"skills": "Skills",
|
||||
"experience": "Experience",
|
||||
"awards": "Awards",
|
||||
"projects": "Personal / Freelance Projects",
|
||||
"courses": "Courses",
|
||||
"languages": "Languages",
|
||||
"references": "References",
|
||||
"other": "Other",
|
||||
"quickActions": "Quick Actions",
|
||||
"collapseAll": "Collapse All",
|
||||
"expandAll": "Expand All",
|
||||
"zoom": "Zoom",
|
||||
"viewControls": "View Controls",
|
||||
"actions": "Actions"
|
||||
},
|
||||
"viewControls": {
|
||||
"length": "Length",
|
||||
"icons": "Icons",
|
||||
"view": "View"
|
||||
},
|
||||
"sections": {
|
||||
"technicalSkills": "Technical Skills",
|
||||
"moreSkills": "More Skills",
|
||||
"yearsOfExperience": "years of experience",
|
||||
"drivingLicense": "Driving License type",
|
||||
"obtainedFrom": "obtained from the",
|
||||
"currentBadge": "CURRENT",
|
||||
"expiredBadge": "EXPIRED",
|
||||
"present": "now",
|
||||
"technologies": "Technologies:",
|
||||
"maintainedBy": "MAINTAINED BY"
|
||||
},
|
||||
"footer": {
|
||||
"viewOnGithub": "View this project on GitHub",
|
||||
"lastUpdated": "Last updated"
|
||||
},
|
||||
"portfolio": {
|
||||
"seeAllProjects": "See all projects on my",
|
||||
"domestikaPortfolio": "Domestika portfolio"
|
||||
},
|
||||
"pdfModal": {
|
||||
"title": "Download PDF",
|
||||
"subtitle": "Choose your preferred format",
|
||||
"preparingPdf": "Preparing PDF...",
|
||||
"pleaseWait": "Please wait while we generate your CV",
|
||||
"close": "Close",
|
||||
"downloadButton": "Download PDF",
|
||||
"shortCv": {
|
||||
"title": "Short CV (4 pages)",
|
||||
"pages": "4 Pages",
|
||||
"description": "Essential info",
|
||||
"ariaLabel": "Short CV - 4 pages, essential information"
|
||||
},
|
||||
"viewSource": "View Project in Github",
|
||||
"viewSourceSubtext": "Want to know how it's built?"
|
||||
"defaultCv": {
|
||||
"title": "Default CV (5 pages)",
|
||||
"pages": "5 Pages",
|
||||
"description": "Short with skills - Recommended",
|
||||
"ariaLabel": "Default CV - 5 pages with skills (Recommended)"
|
||||
},
|
||||
"extendedCv": {
|
||||
"title": "Extended CV (9 pages)",
|
||||
"pages": "9 Pages",
|
||||
"description": "All details",
|
||||
"ariaLabel": "Extended CV - 9 pages, full version"
|
||||
}
|
||||
},
|
||||
"shortcutsModal": {
|
||||
"title": "Keyboard Shortcuts",
|
||||
"subtitle": "Learn the Shortcuts",
|
||||
"description": "Use these keyboard shortcuts to navigate and control the CV more efficiently.",
|
||||
"close": "Close",
|
||||
"sections": {
|
||||
"zoom": {
|
||||
"title": "Zoom Control",
|
||||
@@ -87,5 +146,59 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"infoModal": {
|
||||
"title": "About this CV",
|
||||
"description": "This interactive CV was built by myself with <strong>Go + HTMX</strong>, showcasing modern hypermedia architecture without heavy JavaScript frameworks.",
|
||||
"techStack": {
|
||||
"goHono": "Go + Hono",
|
||||
"htmx": "HTMX",
|
||||
"html5": "Semantic HTML5",
|
||||
"css3": "Pure CSS3"
|
||||
},
|
||||
"viewSource": "View Project in Github",
|
||||
"viewSourceSubtext": "Want to know how it's built?"
|
||||
},
|
||||
"widgets": {
|
||||
"backToTop": {
|
||||
"ariaLabel": "Back to top",
|
||||
"tooltip": "Back to top"
|
||||
},
|
||||
"info": {
|
||||
"ariaLabel": "Information",
|
||||
"tooltip": "Information"
|
||||
},
|
||||
"download": {
|
||||
"ariaLabel": "Download as PDF",
|
||||
"tooltip": "Download as PDF"
|
||||
},
|
||||
"print": {
|
||||
"ariaLabel": "Print Friendly",
|
||||
"tooltip": "Print Friendly"
|
||||
},
|
||||
"shortcuts": {
|
||||
"ariaLabel": "Keyboard shortcuts",
|
||||
"tooltip": "Keyboard shortcuts (?)"
|
||||
},
|
||||
"zoomToggle": {
|
||||
"ariaLabel": "Toggle zoom control",
|
||||
"tooltip": "Zoom control"
|
||||
},
|
||||
"zoomControl": {
|
||||
"groupLabel": "Zoom control",
|
||||
"closeLabel": "Close zoom control",
|
||||
"closeTitle": "Close",
|
||||
"sliderLabel": "Adjust CV zoom level",
|
||||
"resetLabel": "Reset zoom to 100%",
|
||||
"resetTitle": "Reset"
|
||||
},
|
||||
"pdfToast": {
|
||||
"title": "Preparing PDF",
|
||||
"closeLabel": "Close notification"
|
||||
},
|
||||
"actionButtons": {
|
||||
"downloadPdf": "Download as PDF",
|
||||
"printFriendly": "Print Friendly"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user