-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
52 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,13 @@ | |
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- list of calendars --> | ||
<div id="calendarList0" class="calendar-list"> | ||
<div class="calendar-row"><label for="cal4checkbox0"><input type="checkbox" name="calVisibility0" id="cal4checkbox0" value="a71ff6b63e1709ae2bfbcada2b3b64ebeb1f7f5e30787b2bb059725fa17b7b2b@group.calendar.google.com" toggle-checkbox="" checked=""><span style="color: #5F6B02">Free Museums (Bay Area)</span></label></div> | ||
<div class="calendar-row"><label for="cal5checkbox0"><input type="checkbox" name="calVisibility0" id="cal5checkbox0" value="[email protected]" toggle-checkbox="" checked=""><span style="color: #B1440E">CCPA Calendar of Events - Public</span></label></div> | ||
<div class="calendar-row"><label for="cal6checkbox0"><input type="checkbox" name="calVisibility0" id="cal6checkbox0" value="e5c502978d4582e2e7b304e8197120672739ed245f730fc938e64c24949e000e@group.calendar.google.com" toggle-checkbox="" checked=""><span style="color: #1B887A">CCPA STEM Stuff</span></label></div> | ||
</div> | ||
<!-- the actual iframe --> | ||
<iframe id="fullscreen-iframe" src="https://calendar.google.com/calendar/embed?wkst=2&ctz=America%2FLos_Angeles&bgcolor=%23ffffff&src=ZTVjNTAyOTc4ZDQ1ODJlMmU3YjMwNGU4MTk3MTIwNjcyNzM5ZWQyNDVmNzMwZmM5MzhlNjRjMjQ5NDllMDAwZUBncm91cC5jYWxlbmRhci5nb29nbGUuY29t&src=YTcxZmY2YjYzZTE3MDlhZTJiZmJjYWRhMmIzYjY0ZWJlYjFmN2Y1ZTMwNzg3YjJiYjA1OTcyNWZhMTdiN2IyYkBncm91cC5jYWxlbmRhci5nb29nbGUuY29t&src=Y2NwYWVkdS5jb21fZnR1MGxhNTRraW8wY3JoaDgzbTI2N2xyaThAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&color=%23039BE5&color=%23C0CA33&color=%23F4511E&mode=WEEK" frameborder="0" scrolling="no"></iframe> | ||
|
||
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
/* | ||
- get all events from Google Calendars | ||
- get all events from hard-coded events | ||
- combine them into one array | ||
Scripts specific to events, ie not dots | ||
*/ | ||
|
||
const calendarIds = [ | ||
"[email protected]", // CCPA | ||
"a71ff6b63e1709ae2bfbcada2b3b64ebeb1f7f5e30787b2bb059725fa17b7b2b@group.calendar.google.com", // Opportunities HS - https://github.com/ccpa-ousd/opps-cal-hs | ||
"e5c502978d4582e2e7b304e8197120672739ed245f730fc938e64c24949e000e@group.calendar.google.com", // CCPA Robotics | ||
"a71ff6b63e1709ae2bfbcada2b3b64ebeb1f7f5e30787b2bb059725fa17b7b2b@group.calendar.google.com", // Free museums - https://github.com/ccpa-ousd/opps-cal-hs | ||
"e5c502978d4582e2e7b304e8197120672739ed245f730fc938e64c24949e000e@group.calendar.google.com", // CCPA STEM Interested | ||
]; | ||
let combinedGCalEvents = []; | ||
let combinedAllEvents = []; | ||
|
||
// Fetch events from Google Calendar | ||
$(document).ready(function () { | ||
document.addEventListener("DOMContentLoaded", () => { | ||
async function fetchGoogleCalendarEvents(calendarIdsList) { | ||
// Set parameters for Google Calendar API | ||
const timeMin = "2024-08-01T00:00:00-0700"; // set for SY2425; -0700 is Pacific Daylight Time | ||
const timeMax = "2025-08-01T00:00:00-0700"; // set for SY2425; -0700 is Pacific Daylight Time | ||
const now = new Date(); | ||
const timeMin = now.toISOString(); | ||
let timeMax = ""; | ||
// date-fns stuff | ||
if (window.dateFns && window.dateFns.addDays) { | ||
const { addDays } = window.dateFns; | ||
timeMax = addDays(now, 90); | ||
timeMax = timeMax.toISOString(); | ||
} else { | ||
console.error("dateFns or addDays is not available."); | ||
} | ||
|
||
const timezone = "America/Los_Angeles"; | ||
const gCalkey = "AIzaSyDdvMUXW8jaNxCfVZQv3vKbaL4nTzhygMI"; // https://console.cloud.google.com/apis/credentials/ | ||
|
||
|
@@ -139,7 +147,6 @@ $(document).ready(function () { | |
} | ||
} | ||
showEvents(combinedAllEvents); | ||
console.log(combinedAllEvents[15]); // | ||
return combinedAllEvents; | ||
}) | ||
.catch((error) => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters