From d9163af01e15b2aa720cadf56a01979248989cde Mon Sep 17 00:00:00 2001 From: Valentijn Date: Wed, 22 Apr 2026 19:32:26 +0200 Subject: [PATCH] studies section boilerplate --- src/components/Studies/Page.astro | 129 ++++++++++++++++++++++++++ src/components/Studies/StudyBox.astro | 127 +++++++++++++++++++++++++ src/data/site.ts | 6 +- src/layouts/Layout.astro | 2 +- src/pages/index.astro | 2 + 5 files changed, 263 insertions(+), 3 deletions(-) create mode 100644 src/components/Studies/Page.astro create mode 100644 src/components/Studies/StudyBox.astro diff --git a/src/components/Studies/Page.astro b/src/components/Studies/Page.astro new file mode 100644 index 0000000..1c213a5 --- /dev/null +++ b/src/components/Studies/Page.astro @@ -0,0 +1,129 @@ +--- +import { siteData } from '../../data/site'; +import StudyBox from './StudyBox.astro'; + +const studies = [...siteData.studies]; +const sortedStudies = studies.sort((a, b) => b.start.getTime() - a.start.getTime()); +--- + +
+ + +
+
+ {sortedStudies.map((study) => ( + + ))} +
+
+
+ + \ No newline at end of file diff --git a/src/components/Studies/StudyBox.astro b/src/components/Studies/StudyBox.astro new file mode 100644 index 0000000..86ae046 --- /dev/null +++ b/src/components/Studies/StudyBox.astro @@ -0,0 +1,127 @@ +--- +const { study } = Astro.props; +--- + +
+ + +
+
+
+

{study.study}

+

{study.school} ยท {study.level}

+
+ +
+

+ {study.start.toLocaleDateString('en-US', { year: 'numeric', month: 'short' })} + - + {study.end + ? study.end.toLocaleDateString('en-US', { year: 'numeric', month: 'short' }) + : 'Nu'} +

+
+
+
+
+ + \ No newline at end of file diff --git a/src/data/site.ts b/src/data/site.ts index 9c69b24..87bd2e7 100644 --- a/src/data/site.ts +++ b/src/data/site.ts @@ -6,13 +6,15 @@ export const siteData = { { school: "Hogeschool Rotterdam", study: "Technische Informatica", + level: "HBO", label: "Student Technische Informatica", start: new Date("2025-09-01"), end: null, }, { - school: "Hogeschool Rotterdam", - study: "Technische Informatica", + school: "Grafisch Lyceum Rotterdam", + study: "Software Developer", + level: "MBO", label: "Student Software Developer", start: new Date("2021-09-01"), end: new Date("2025-06-18"), diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 18596e7..57b2797 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -30,6 +30,6 @@ margin: 0; width: 100%; height: 100%; - background: #4e4e4e + background: #353535 } diff --git a/src/pages/index.astro b/src/pages/index.astro index 807b275..8242e5f 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,9 +1,11 @@ --- import Layout from '../layouts/Layout.astro'; import Hero from '../components/Hero/Page.astro'; +import Studies from "../components/Studies/Page.astro" --- +