-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9fa89fa
commit 95f78ce
Showing
12 changed files
with
257 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
slug: datasteward-circle | ||
title: DataSteward Circle | ||
category: Meeting | ||
audience: [DataStewards] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
import Layout from "./Layout.astro"; | ||
const { title } = Astro.props; | ||
--- | ||
|
||
<Layout title={title}> | ||
<div class="flex items-center justify-center w-full"> | ||
<div class="flex flex-col gap-4 p-2 lg:p-5 lg:py-10 xl:py-20"> | ||
<slot /> | ||
</div> | ||
</div> | ||
</Layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
import { getCollection } from 'astro:content'; | ||
import { reducePeriodicEvents, formatDateToHref, type ReducedEvent } from '~/util/EventUtil.ts'; | ||
import EventLayout from '~/layouts/EventLayout.astro'; | ||
export async function getStaticPaths() { | ||
const eventsCollection = await getCollection('events') | ||
const reducedEvents = reducePeriodicEvents(eventsCollection); | ||
return reducedEvents.map((entry) => { | ||
const dateString = formatDateToHref(entry.data.when.start); | ||
return { | ||
params: { event: entry.slug, date: dateString}, | ||
props: { event: entry } | ||
} | ||
}); | ||
} | ||
interface Props { | ||
event: ReducedEvent | ||
} | ||
const { event } = Astro.props; | ||
--- | ||
|
||
|
||
<EventLayout event={event}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
import { getCollection } from 'astro:content'; | ||
import { reducePeriodicEvent } from '~/util/EventUtil.ts'; | ||
import type { CollectionEntry } from 'astro:content'; | ||
import CenteredLayout from '~/layouts/CenteredLayout.astro'; | ||
import EventList from '~/components/events/EventList.tsx'; | ||
import EventLayout from '~/layouts/EventLayout.astro'; | ||
export async function getStaticPaths() { | ||
const eventsCollection = await getCollection('events') | ||
return eventsCollection.map((entry) => { | ||
return { | ||
params: { event: entry.slug }, | ||
props: { event: entry } | ||
} | ||
}); | ||
} | ||
interface Props { | ||
event: CollectionEntry<'events'> | ||
} | ||
const { event } = Astro.props; | ||
// ⚠️ at this point we do not know if we should show a single event or a list of events (in case of a repeating event) | ||
// Therefore, we reduce the event. This will create a list of multiple events if the event is repeating. | ||
const reducedEvents = reducePeriodicEvent(event); | ||
--- | ||
{reducedEvents.length > 1 | ||
? <CenteredLayout title="Events"> | ||
<div class="prose lg:prose-lg"> | ||
<h1 class="!mb-0">{event.data.title}</h1> | ||
<h2 class="!mt-0 text-opacity-20 text-base-content">Periodic event with the following dates!</h2> | ||
</div> | ||
<EventList | ||
client:load | ||
events={reducedEvents} | ||
showFilter={false} | ||
showPastFutureLimit={true} /> | ||
</CenteredLayout> | ||
: <EventLayout event={reducedEvents[0]} /> | ||
} |
Oops, something went wrong.