-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(calendar): create layout for events page
- Loading branch information
Showing
3 changed files
with
46 additions
and
31 deletions.
There are no files selected for viewing
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: "Events" | ||
calendars: ["index.ics", "https://www.c-base.org/calendar/exported/regulars.ics"] | ||
--- |
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,42 @@ | ||
{{ define "main" }} | ||
<div class="container mt-100 mt-60"> | ||
<div class="justify-content-center mx-auto col-sm-6"> | ||
<script type='importmap'> | ||
{ | ||
"imports": { | ||
"@fullcalendar/core": "https://cdn.skypack.dev/@fullcalendar/[email protected]", | ||
"@fullcalendar/daygrid": "https://cdn.skypack.dev/@fullcalendar/[email protected]", | ||
"@fullcalendar/icalendar": "https://cdn.skypack.dev/@fullcalendar/[email protected]" | ||
} | ||
} | ||
</script> | ||
<script type='module'> | ||
import { Calendar } from '@fullcalendar/core' | ||
import dayGridPlugin from '@fullcalendar/daygrid' | ||
import iCalendarPlugin from '@fullcalendar/icalendar' | ||
|
||
document.addEventListener('DOMContentLoaded', function() { | ||
const calendarEl = document.getElementById('calendar') | ||
var calendar = new Calendar(calendarEl, { | ||
plugins: [dayGridPlugin, iCalendarPlugin], | ||
|
||
eventSources: [ | ||
{{- range .Params.Calendars }} | ||
|
||
{ | ||
url: "{{ . }}", | ||
format: 'ics' | ||
}, | ||
{{- end }} | ||
] | ||
|
||
|
||
}) | ||
calendar.render() | ||
}) | ||
</script> | ||
<div id='calendar'></div> | ||
<a href="index.ics">ical Feed</a> | ||
</div> | ||
</div> | ||
{{ end }} |