Skip to content

Commit 3e24834

Browse files
committed
Add calendar to open spaces
1 parent fdcfa5c commit 3e24834

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

src/components/GoogleCalendar.astro

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface Props {
1212
showTz?: boolean;
1313
mode?: 'WEEK' | 'MONTH' | 'AGENDA';
1414
backgroundColor?: string;
15+
dates?: string;
1516
}
1617
1718
const {
@@ -25,14 +26,15 @@ const {
2526
showCalendars = true,
2627
showTz = false,
2728
mode = "MONTH",
28-
backgroundColor = "%23ffffff"
29+
backgroundColor = "%23000000",
30+
dates = "20250714/20250720"
2931
} = Astro.props;
3032
3133
// Construct the embed URL
32-
const embedUrl = `https://calendar.google.com/calendar/embed?src=${encodeURIComponent(calendarId)}&ctz=Europe%2FPrague&mode=${mode}&height=${height}&wkst=2&bgcolor=${backgroundColor}&showTitle=${showTitle ? 1 : 0}&showPrint=${showPrint ? 1 : 0}&showTabs=${showTabs ? 1 : 0}&showCalendars=${showCalendars ? 1 : 0}&showTz=${showTz ? 1 : 0}`;
34+
const embedUrl = `https://calendar.google.com/calendar/embed?src=${encodeURIComponent(calendarId)}&dates=${dates}&ctz=Europe%2FPrague&mode=${mode}&height=${height}&wkst=2&bgcolor=${backgroundColor}&showTitle=${showTitle ? 1 : 0}&showPrint=${showPrint ? 1 : 0}&showTabs=${showTabs ? 1 : 0}&showCalendars=${showCalendars ? 1 : 0}&showTz=${showTz ? 1 : 0}`;
3335
3436
// Mobile-specific embed URL for agenda view
35-
const mobileEmbedUrl = `https://calendar.google.com/calendar/embed?src=${encodeURIComponent(calendarId)}&ctz=Europe%2FPrague&mode=AGENDA&height=400&wkst=2&bgcolor=${backgroundColor}&showTitle=0&showPrint=0&showTabs=0&showCalendars=0&showTz=0`;
37+
const mobileEmbedUrl = `https://calendar.google.com/calendar/embed?src=${encodeURIComponent(calendarId)}&dates=${dates}&ctz=Europe%2FPrague&mode=AGENDA&height=400&wkst=2&bgcolor=${backgroundColor}&showTitle=0&showPrint=0&showTabs=0&showCalendars=0&showTz=0`;
3638
---
3739

3840
<div class="flex justify-center items-center my-4 max-w-full overflow-hidden">

src/content/pages/open-spaces.md renamed to src/content/pages/open-spaces.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ serves to attract potential participants interested in joining.
2424
Check the
2525
[Open Spaces schedule ↗️!](https://calendar.google.com/calendar/u/0?cid=Y19iODcwNzViMjljZjRhOWRkNGRhM2ZlNzI0ZmNiYTkyYTRiNDA2YWEzZjkxY2I3ZTdjZTUwZmVkZTQzMjE1YjE3QGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20)
2626

27+
<GoogleCalendar
28+
height="800"
29+
width="1000"
30+
mode="WEEK"
31+
showTitle={false}
32+
showPrint={false}
33+
/>
34+
2735
## How to Organise an Open Space
2836

2937
To organise your own Open Space session, simply book a free time slot and room

src/pages/[...slug].astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Center from "@components/markdown/Center.astro";
1616
import EPSLogo from "@components/markdown/EPSLogo.astro";
1717
import ProfileCard from "@components/profile/ProfileCard.astro";
1818
import SpeakerCard from "@components/profile/SpeakerCard.astro";
19+
import GoogleCalendar from '@components/GoogleCalendar.astro';
1920
2021
import Prose from "@ui/Prose.astro";
2122
@@ -67,7 +68,8 @@ const description = post.data.subtitle;
6768
hr: Separator,
6869
Accordion,
6970
ProfileCard,
70-
SpeakerCard
71+
SpeakerCard,
72+
GoogleCalendar
7173
}}
7274
/>
7375
</Prose>

src/pages/calendar.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@ import GoogleCalendar from '@components/GoogleCalendar.astro';
2626
mode="WEEK"
2727
showTitle={false}
2828
showPrint={false}
29-
backgroundColor="%23f0f0f0"
3029
/>
3130
</Layout>

0 commit comments

Comments
 (0)