diff --git a/src/components/svelte/EducationItem.svelte b/src/components/svelte/EducationItem.svelte index fd924bd..7ccfa3f 100644 --- a/src/components/svelte/EducationItem.svelte +++ b/src/components/svelte/EducationItem.svelte @@ -29,9 +29,10 @@ interface Props { entry: EducationEntry + isLast?: boolean } - let { entry }: Props = $props() + let { entry, isLast = false }: Props = $props() const dateDisplay = $derived(() => { const start = entry.startMonth ? `${entry.startMonth} ${entry.startYear}` : `${entry.startYear}` @@ -40,6 +41,18 @@ const end = entry.endMonth ? `${entry.endMonth} ${entry.endYear}` : `${entry.endYear}` return `${start} - ${end}` } + + // Check if start date is in the future + const now = new Date() + const currentYear = now.getFullYear() + const isFutureYear = entry.startYear > currentYear + const isFutureMonth = entry.startYear === currentYear && entry.startMonth && + new Date(`${entry.startMonth} 1, ${entry.startYear}`).getTime() > now.getTime() + + if (isFutureYear || isFutureMonth) { + return `Starting ${start}` + } + if (entry.expected) { return `${start} - Present (Expected)` } @@ -47,9 +60,9 @@ }) -
+
-
+
@@ -85,10 +98,10 @@
-
- +
+ {#if entry.courses && entry.courses.length > 0} -
+

Core Courses

{#each entry.courses as course} @@ -101,9 +114,9 @@
{/if} - + {#if entry.awards && entry.awards.length > 0} -
+

Awards & Scholarships

    {#each entry.awards as award} diff --git a/src/components/svelte/Timeline.svelte b/src/components/svelte/Timeline.svelte index 75cea72..4866d85 100644 --- a/src/components/svelte/Timeline.svelte +++ b/src/components/svelte/Timeline.svelte @@ -8,6 +8,6 @@ let { children }: Props = $props() -
    +
    {@render children()}
    diff --git a/src/pages/index.astro b/src/pages/index.astro index cfa3cfc..4956338 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -172,8 +172,8 @@ const turnstileSitekey = import.meta.env.PUBLIC_TURNSTILE_SITEKEY
    - {education.map(entry => ( - + {education.map((entry, i) => ( + ))}