From 6fd09eaa7b596c7d76b8d6a912076aa60b91f0d3 Mon Sep 17 00:00:00 2001 From: Ferdinand Salis-Samaden Date: Fri, 22 Nov 2024 11:05:26 +0100 Subject: [PATCH] Update dates --- app/data/dates.ts | 7 ++++--- app/routes/aktuelles/route.tsx | 4 ++-- app/routes/aktuelles_.beitraege+/$slug.query.ts | 1 - app/routes/curriculum/route.tsx | 1 - app/routes/jahrgaenge+/$year.query.tsx | 3 +-- app/routes/jahrgaenge+/$year.tsx | 11 ++++++++--- app/routes/ueber-uns+/philosophie+/_layout.tsx | 6 +++--- 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/app/data/dates.ts b/app/data/dates.ts index e1e6d07..67a6f7f 100644 --- a/app/data/dates.ts +++ b/app/data/dates.ts @@ -91,7 +91,7 @@ export const events: SchoolEvent[] = [ { title: 'Infoabend', startDate: '2024-11-21', - startTime: null, + startTime: '19:00', endDate: null, endTime: null, description: @@ -102,10 +102,11 @@ export const events: SchoolEvent[] = [ { title: 'Schattentheater', startDate: '2024-12-18', - startTime: null, + startTime: '18:00', endDate: null, endTime: null, - description: null, + description: + 'Menschen-Schattentheater vor und hinter der Leinwand, in seiner Schlichtheit magisch und zauberhaft - gleich einem riesigen, lebendig gewordenen Bilderbuch aus Scherenschnitten. Der Jahrgang Gamma inszeniert “Die Schneekönigin” : Wenn nach einer kalten Winternacht Eisblumen die Fenster schmücken, war die Schneekönigin unterwegs - erzählt die Großmutter Gerda und Kai. Da wissen die beiden Freunde noch nicht, dass die Schneekönigin ihr Leben schon bald verändern wird. Sie entführt Kai in ihr Schloss im hohen Norden Gerda macht sich auf den Weg ihren Freund zu retten und besteht dabei viele Abenteuer!\n\nDas Stück ist für Kinder ab 6 Jahren geeignet', type: 'internal', links: [], }, diff --git a/app/routes/aktuelles/route.tsx b/app/routes/aktuelles/route.tsx index da09bd7..e6da6ca 100644 --- a/app/routes/aktuelles/route.tsx +++ b/app/routes/aktuelles/route.tsx @@ -318,7 +318,7 @@ function YearCard({ letter, startedAt, mentor, photos, plan }: Year) { className="flex flex-wrap rounded-md bg-card shadow-md" >
-
+
{alphabetMap[letter]}
@@ -358,7 +358,7 @@ function YearCard({ letter, startedAt, mentor, photos, plan }: Year) { )}
{photos ? ( diff --git a/app/routes/aktuelles_.beitraege+/$slug.query.ts b/app/routes/aktuelles_.beitraege+/$slug.query.ts index e0c9c71..591d9aa 100644 --- a/app/routes/aktuelles_.beitraege+/$slug.query.ts +++ b/app/routes/aktuelles_.beitraege+/$slug.query.ts @@ -1,6 +1,5 @@ import { defineQuery } from 'groq' -// @ts-ignore export const beitraegeSlugQuery = defineQuery(` *[_type == "post" && slug.current == $slug][0] { _id, diff --git a/app/routes/curriculum/route.tsx b/app/routes/curriculum/route.tsx index e2f8057..cf13ae6 100644 --- a/app/routes/curriculum/route.tsx +++ b/app/routes/curriculum/route.tsx @@ -1,5 +1,4 @@ import { useLoaderData } from '@remix-run/react' -import { InfoIcon } from 'lucide-react' import React from 'react' import { Carousel, diff --git a/app/routes/jahrgaenge+/$year.query.tsx b/app/routes/jahrgaenge+/$year.query.tsx index 0e2ef30..9c5d438 100644 --- a/app/routes/jahrgaenge+/$year.query.tsx +++ b/app/routes/jahrgaenge+/$year.query.tsx @@ -3,9 +3,8 @@ import { z } from 'zod' import { PhotoSchema } from '#app/sanity/schema/year.ts' import { PersonSchema } from '../ueber-uns+/_index.query.ts' -// @ts-ignore export const yearQuery = defineQuery(` - *[_type == "year" && letter == $year][0] { + *[_type == "year" && letter == $letter && startedAt match $startedAt + "*"][0] { _id, _type, startedAt, diff --git a/app/routes/jahrgaenge+/$year.tsx b/app/routes/jahrgaenge+/$year.tsx index 44fd4d4..fb6ed7c 100644 --- a/app/routes/jahrgaenge+/$year.tsx +++ b/app/routes/jahrgaenge+/$year.tsx @@ -12,9 +12,14 @@ export function meta({ data }: MetaArgs) { } export async function loader({ params }: LoaderFunctionArgs) { - const queryResult = await loadQuery(yearQuery, params, { - perspective: 'published', - }) + const [letter, startedAt] = params?.year?.split('-') ?? [] + const queryResult = await loadQuery( + yearQuery, + { letter, startedAt }, + { + perspective: 'published', + }, + ) return { query: yearQuery, diff --git a/app/routes/ueber-uns+/philosophie+/_layout.tsx b/app/routes/ueber-uns+/philosophie+/_layout.tsx index 83e951a..41dd62c 100644 --- a/app/routes/ueber-uns+/philosophie+/_layout.tsx +++ b/app/routes/ueber-uns+/philosophie+/_layout.tsx @@ -13,10 +13,10 @@ export function meta() { export default function Philosophie() { const matches = useMatches() - const current = matches.at(-1) + const current = matches?.at(-1)?.handle return ( -
+

Über uns

@@ -34,7 +34,7 @@ export default function Philosophie() {
{pillars - .filter(pillar => pillar !== current?.handle) + .filter(pillar => pillar !== current) .map(pillar => (