-
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
1 parent
5780782
commit 2bde60e
Showing
7 changed files
with
93 additions
and
19 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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#calendar { | ||
max-width: 75vw; | ||
max-height: 75vh; | ||
margin: 0 auto; | ||
} | ||
#calendar-message { | ||
text-align: center; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
document.addEventListener('DOMContentLoaded', function() { | ||
var calendarEl = document.getElementById('calendar'); | ||
var calendarMessage = document.getElementById('calendar-message'); | ||
|
||
var calendar = new FullCalendar.Calendar(calendarEl, { | ||
headerToolbar: { | ||
start: 'title', | ||
center: '', | ||
end: 'today prev,next dayGridMonth,listYear,multiMonthYear' | ||
}, | ||
initialView: 'listYear', | ||
events: { | ||
url: calendarEl.dataset.url, | ||
format: 'ics', | ||
}, | ||
eventSourceSuccess: function() { | ||
calendarMessage.style.display = 'none'; | ||
}, | ||
eventSourceFailure: function() { | ||
calendarMessage.innerText = "Loading the calendar failed. Please try again later, or check your browser's developer console for more details." | ||
} | ||
}); | ||
|
||
calendar.render(); | ||
}); |
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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{% set calendar_name = calendar.name|default(calendar.slug, true) %} | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>{{ calendar_name }}</title> | ||
<meta name="robots" content="noindex" /> | ||
<link rel="stylesheet" href="/static/calendar.css" /> | ||
</head> | ||
<body> | ||
<h1>{{ calendar_name }}</h1> | ||
<p>{{ calendar.description }}</p> | ||
<p><a href="{{ calendar|calendar_url }}">{{ calendar|calendar_url }}</a></p> | ||
|
||
<p id="calendar-message">Events are loading...</p> | ||
<div id='calendar' data-url="{{ calendar|calendar_url }}"></div> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/ical.min.js" integrity="sha256-uotVKltUv5neKsIlZxrxUccba0PaptusFj6p+w8Sons=" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/index.global.min.js" integrity="sha256-i4vDW9EgtaJmeauDDymtNF2omPZ1fCKpf4w1gBlU1IE=" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/index.global.min.js" integrity="sha256-WwbtQlF1JHoTRN5Ma84E0HPmjgvdbMzJ5bzJFarfQRE=" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
<script src="/static/calendar.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
</body> | ||
</html> |
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
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