Skip to content
Snippets Groups Projects
Commit 7809f80a authored by Kevin Lin's avatar Kevin Lin :sparkles:
Browse files

google-calendar.md: Use an iframe instead of fullcalendar

parent 2d8d04de
No related branches found
No related tags found
No related merge requests found
......@@ -9,46 +9,4 @@ description: An embedded Google Calendar displaying the weekly event schedule.
**Warning**: This page is not optimized for performance. Use the `schedule` include instead for faster page loads. See the [Schedule]({{ site.baseurl }}/schedule) page for more information.
<div id="fullcalendar"></div>
<link rel="stylesheet" property="stylesheet" href="https://unpkg.com/@fullcalendar/core/main.css">
<link rel="stylesheet" property="stylesheet" href="https://unpkg.com/@fullcalendar/timegrid/main.css">
<script src="https://unpkg.com/@fullcalendar/core/main.min.js"></script>
<script src="https://unpkg.com/@fullcalendar/daygrid/main.min.js"></script>
<script src="https://unpkg.com/@fullcalendar/timegrid/main.min.js"></script>
<script src="https://unpkg.com/@fullcalendar/google-calendar/main.min.js"></script>
<style>
.fc table {
margin-bottom: 0;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
new FullCalendar.Calendar(document.getElementById('fullcalendar'), {
plugins: ['dayGrid', 'timeGrid', 'googleCalendar'],
header: {
left: 'title',
right: 'today prev,next',
},
nowIndicator: true,
height: 'auto',
minTime: '09:00:00',
maxTime: '21:00:00',
allDaySlot: false,
slotEventOverlap: false,
defaultView: 'timeGridWeek',
// THIS KEY WON'T WORK IN PRODUCTION!!!
// To make your own Google API key, follow the directions here:
// http://fullcalendar.io/docs/google_calendar/
googleCalendarApiKey: 'AIzaSyDcnW6WejpTOCffshGDDb4neIrXVUA1EAE',
// US Holidays
eventSources: [
{
googleCalendarId: 'en.usa#holiday@group.v.calendar.google.com',
className: 'holiday',
},
],
}).render();
});
</script>
<iframe src="https://calendar.google.com/calendar/embed?src=en.usa%23holiday@group.v.calendar.google.com&ctz=America%2FLos_Angeles" style="border: none; width: 100%; height: 600px;" frameborder="0" scrolling="no"></iframe>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment