Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions src/components/Ui/Content/AddEventCalendar.astro

This file was deleted.

20 changes: 20 additions & 0 deletions src/components/Ui/Content/GoogleCalendarEmbed.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
export interface Props {
calendarId: string;
timeZone?: string;
title?: string;
}

const { calendarId, timeZone = 'UTC', title = 'Google Calendar' } = Astro.props;
const color = 'ffff00';
const src = `https://calendar.google.com/calendar/embed?color=%23${color}&src=${encodeURIComponent(calendarId)}&ctz=${encodeURIComponent(timeZone)}`;
---

<div style={{ position: 'relative', paddingBottom: '75%', height: 0, overflow: 'hidden', marginBottom: '2rem' }}>
<iframe
src={src}
style={{ border: 0, position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }}
title={title}
allowfullscreen
></iframe>
</div>
2 changes: 1 addition & 1 deletion src/components/Ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ export const QuestionAnswer = {
Question: QuestionAnswerQuestion,
Answer: QuestionAnswerAnswer,
};
export { default as AddEventCalendar } from './Content/AddEventCalendar.astro';
export { default as GoogleCalendarEmbed } from './Content/GoogleCalendarEmbed.astro';
5 changes: 3 additions & 2 deletions src/pages/community/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
PageIntro,
SolidHeading,
ReducedWidth,
AddEventCalendar,
SocialLink,
ButtonLink,
GoogleCalendarEmbed,
} from '~/components/Ui';
import Events from '~/components/Pages/Events/Events.astro';

Expand All @@ -20,7 +20,8 @@ Want to keep up to date with all the cool stuff the Unitary Foundation community

</PageIntro>

<AddEventCalendar id="kn360162" />
<GoogleCalendarEmbed calendarId="c_mgqdq6hj2isi4d6h467kfqvg60@group.calendar.google.com" timeZone="UTC" title="Unitary Foundation Community Calendar" />


<ReducedWidth>
Interested in hosting a community call for your project on our
Expand Down