diff --git a/src/components/Ui/Content/AddEventCalendar.astro b/src/components/Ui/Content/AddEventCalendar.astro deleted file mode 100644 index 89b49d9e5..000000000 --- a/src/components/Ui/Content/AddEventCalendar.astro +++ /dev/null @@ -1,41 +0,0 @@ ---- -export interface Props { - id: string; -} - -const { id } = Astro.props; ---- - -
-
- diff --git a/src/components/Ui/Content/GoogleCalendarEmbed.astro b/src/components/Ui/Content/GoogleCalendarEmbed.astro new file mode 100644 index 000000000..73dbfe2e1 --- /dev/null +++ b/src/components/Ui/Content/GoogleCalendarEmbed.astro @@ -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)}`; +--- + +
+ +
diff --git a/src/components/Ui/index.ts b/src/components/Ui/index.ts index 0956ef200..0666fef35 100644 --- a/src/components/Ui/index.ts +++ b/src/components/Ui/index.ts @@ -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'; diff --git a/src/pages/community/events.mdx b/src/pages/community/events.mdx index 9a557aed5..e75c62f8b 100644 --- a/src/pages/community/events.mdx +++ b/src/pages/community/events.mdx @@ -7,9 +7,9 @@ import { PageIntro, SolidHeading, ReducedWidth, - AddEventCalendar, SocialLink, ButtonLink, + GoogleCalendarEmbed, } from '~/components/Ui'; import Events from '~/components/Pages/Events/Events.astro'; @@ -20,7 +20,8 @@ Want to keep up to date with all the cool stuff the Unitary Foundation community - + + Interested in hosting a community call for your project on our