Skip to content

Commit 3b0f0d1

Browse files
authored
Add dynamic Google Calendar iframe to events page
Updated the events page to include a dynamic Google Calendar iframe that adjusts to the user's timezone.
1 parent 9451d58 commit 3b0f0d1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

events.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ layout: default
33
permalink: /events/
44
---
55

6-
<iframe src="https://calendar.google.com/calendar/embed?src=7000a514e4c452c330b7786deba4a311e5d2e7aac1951ba87451e2b0961882a8%40group.calendar.google.com" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
7-
6+
<script type="text/javascript">
7+
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone
8+
const html = `<iframe src="https://calendar.google.com/calendar/embed?src=7000a514e4c452c330b7786deba4a311e5d2e7aac1951ba87451e2b0961882a8%40group.calendar.google.com&ctz=${timezone}" style=" border-width:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe>`
9+
document.getElementById('calendar-container').innerHTML = html;
10+
</script>
11+
<div class="calendar-container"></div>

0 commit comments

Comments
 (0)