diff --git a/src/components/Certifications.astro b/src/components/Certifications.astro index 4123601..d780f02 100755 --- a/src/components/Certifications.astro +++ b/src/components/Certifications.astro @@ -3,6 +3,8 @@ import certificationsData from '../data/certifications.json'; type CertType = 'certification' | 'professional-development' | 'in-progress'; +const certTypes = new Set(certificationsData.map((cert) => cert.type ?? 'certification')); + // Returns the CSS class for the status badge chip (green / amber / blue). function badgeClass(type: CertType) { if (type === 'professional-development') return 'badge-pro-dev'; @@ -31,15 +33,30 @@ function cardModClass(type: CertType) {

Training

Courses & Development

- - Certification - - - Professional Development - - - In Progress - + { + certTypes.has('certification') && ( + + + Certification + + ) + } + { + certTypes.has('professional-development') && ( + + + Professional Development + + ) + } + { + certTypes.has('in-progress') && ( + + + In Progress + + ) + }
@@ -74,7 +91,7 @@ function cardModClass(type: CertType) {

{cert.description}

-
+
{cert.date} {type === 'in-progress' ? ( @@ -82,32 +99,59 @@ function cardModClass(type: CertType) { Actively Studying - ) : cert.credentialUrl ? ( - - - {type === 'professional-development' - ? 'View Certificate' - : 'View Credential'} - - - - - + ) : cert.credentialUrl || cert.courseUrl ? ( + + {cert.credentialUrl && ( + + + {type === 'professional-development' + ? 'View Certificate' + : 'View Credential'} + + + + + + )} + {cert.courseUrl && ( + + Course + + + + + )} + ) : ( No link available )} diff --git a/src/components/Header.astro b/src/components/Header.astro index d7cecde..0509d4d 100755 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -4,6 +4,11 @@ import menu from '../data/menu.json'; import siteData from '../data/site.json'; const { sections } = menu; +const localSections = sections.map((item) => ({ + ...item, + targetId: item.href.startsWith('#') ? item.href.slice(1) : '', + href: item.href.startsWith('#') ? `/${item.href}` : item.href, +})); // Build external nav links from site.json definitions, skipping any whose personal.json key is empty. // This lets site authors add potential platforms to navExternal without requiring all fields be filled. @@ -23,14 +28,14 @@ const external = siteData.navExternal