From ae9378b2e711559a8b805d927ca4e6ec2dec1ce9 Mon Sep 17 00:00:00 2001 From: Ferdinand Salis-Samaden Date: Thu, 17 Oct 2024 10:23:38 +0200 Subject: [PATCH] Update dates --- app/data/dates.ts | 18 +- app/routes/curriculum/route.tsx | 298 ++++++++------------------------ 2 files changed, 91 insertions(+), 225 deletions(-) diff --git a/app/data/dates.ts b/app/data/dates.ts index f4e3daf..e1e6d07 100644 --- a/app/data/dates.ts +++ b/app/data/dates.ts @@ -56,12 +56,24 @@ export const events: SchoolEvent[] = [ links: [], }, { - title: 'Präsentation Theaterwerkstatt', + title: 'Theateraufführung: MEΔEA', startDate: '2024-11-14', - startTime: null, + startTime: '19:00', endDate: null, endTime: null, - description: 'Infos folgen', + description: + 'Königstocher, Priesterin, Flüchtling, Mutter, Heilerin, Femme Fatale, Verlassene, Hexe, Zauberin, Kindsmörderin - der Mythos zeichnet viele unterschiedliche Bilder einer faszinierenden Frau. Wer ist Medea heute?', + type: 'internal', + links: [], + }, + { + title: 'Theateraufführung: MEΔEA', + startDate: '2024-11-15', + startTime: '19:00', + endDate: null, + endTime: null, + description: + 'Königstocher, Priesterin, Flüchtling, Mutter, Heilerin, Femme Fatale, Verlassene, Hexe, Zauberin, Kindsmörderin - der Mythos zeichnet viele unterschiedliche Bilder einer faszinierenden Frau. Wer ist Medea heute?', type: 'internal', links: [], }, diff --git a/app/routes/curriculum/route.tsx b/app/routes/curriculum/route.tsx index 3a801b4..6f66b2c 100644 --- a/app/routes/curriculum/route.tsx +++ b/app/routes/curriculum/route.tsx @@ -1,4 +1,5 @@ import { useLoaderData } from '@remix-run/react' +import React from 'react' import { Carousel, CarouselItem, @@ -30,231 +31,84 @@ export default function Curriculum() {
-
-
-

1. Jahr

-

- {data?.years[0].title} -

-
-
-

{data?.years[0].description}

-
-
-
-

- Projekte -

-
    - {data.years[0].projects?.map(project => { - return
  • {project.name}
  • - })} -
-
-
-

- Externe Prüfungen -

-
    - {data?.years[0]?.externalExams?.length > 0 ? ( - data?.years[0].externalExams.map(exam => ( -
  • {exam}
  • - )) - ) : ( -
  • keine
  • - )} -
-
-
-
- p.photos)} - /> -
-
- - - -
-
-

2. Jahr

-

- {data?.years[1].title} -

-
-
-

{data?.years[1].description}

-
-
-
-

- Projekte -

-
    - {data.years[1].projects?.map(project => { - return
  • {project.name}
  • - })} -
-
-
-

- Externe Prüfungen -

-
    - {data?.years[1]?.externalExams?.length > 0 ? ( - data?.years[1].externalExams.map(exam => ( -
  • {exam}
  • - )) - ) : ( -
  • keine
  • - )} -
-
-
-
- p.photos)} - /> -
-
- - - -
-
-

3. Jahr

-

- {data?.years[2].title} -

-
-
-

{data?.years[2].description}

-
-
-
-

- Projekte -

-
    - {data.years[2].projects?.map(project => { - return
  • {project.name}
  • - })} -
-
-
-

- Externe Prüfungen -

-
    - {data?.years[2]?.externalExams?.length > 0 ? ( - data?.years[2].externalExams.map(exam => ( -
  • {exam}
  • - )) - ) : ( -
  • keine
  • - )} -
-
-
-
- p.photos)} - /> -
-
- - - -
-
-

4. Jahr

-

- {data?.years[3].title} -

-
-
-

{data?.years[3].description}

-
-
-
-

- Projekte -

-
    - {data.years[3].projects?.map(project => { - return
  • {project.name}
  • - })} -
-
-
-

- Externe Prüfungen -

-
    - {data?.years[3]?.externalExams?.length > 0 ? ( - data?.years[3].externalExams.map(exam => ( -
  • {exam}
  • - )) - ) : ( -
  • keine
  • - )} -
-
-
-
- p.photos)} - /> -
-
+ {data.years.map((year, index) => ( + + + {index < data.years.length - 1 && } + + ))} + +
+ + ) +} - +function YearSection({ + year, + yearNumber, +}: { + year: { + title: string + description: string + projects: any[] + externalExams: string[] + } + yearNumber: number +}) { + return ( +
+
+

+ {yearNumber}. Jahr +

+

+ {year.title} +

+
+
+

{year.description}

+
+
+ + +
+
+ p.photos)} /> +
+
+ ) +} -
-
-

5. Jahr

-

- {data?.years[4].title} -

-
-
-

{data?.years[4].description}

-
-
-
-

- Projekte -

-
    - {data.years[4].projects?.map(project => { - return
  • {project.name}
  • - })} -
-
-
-

- Externe Prüfungen -

-
    - {data?.years[4]?.externalExams?.length > 0 ? ( - data?.years[4].externalExams.map(exam => ( -
  • {exam}
  • - )) - ) : ( -
  • keine
  • - )} -
-
-
-
- p.photos)} - /> -
-
+function ProjectsList({ + projects, +}: { + projects: { _id: string; name: string }[] +}) { + return ( +
+

+ Projekte +

+
    + {projects?.map(project =>
  • {project.name}
  • )} +
+
+ ) +} - - +function ExternalExamsList({ exams }: { exams: string[] }) { + return ( +
+

+ Externe Prüfungen +

+
    + {exams?.length > 0 ? ( + exams.map(exam =>
  • {exam}
  • ) + ) : ( +
  • keine
  • + )} +
) }