@@ -31,36 +31,52 @@ <h5 class="subtitle">{{ .Params.Subtitle }}</h5>
3131
3232 < br >
3333 < script src ="https://cdn.jsdelivr.net/npm/vega@5 "> </ script >
34- < script src ="https://cdnjs.cloudflare.com/ajax/libs/ical.js/1.5.0/ical.min.js "> </ script >
35- < script src ='https://cdn.jsdelivr.net/npm/fullcalendar@6.1.15/index.global.min.js '> </ script >
36- < script src ="https://cdn.jsdelivr.net/npm/@fullcalendar/icalendar@6.1.15/index.global.min.js "> </ script >
34+ < script src ="https://unpkg.com/ical.js/dist/ical.es5.min.cjs "> </ script >
35+ < script src ='https://cdn.jsdelivr.net/npm/fullcalendar@6.1.18/index.global.min.js '> </ script >
36+
37+ <!-- This is a temporary workaround for https://github.com/fullcalendar/fullcalendar/issues/7456
38+
39+ PR proposed in https://github.com/fullcalendar/fullcalendar/pull/7450 was compiled and is sourced
40+ below as `icalendar.js`
41+
42+ Build procedure:
43+
44+ 0. Clone git@github.com:fullcalendar/fullcalendar.git
45+ 1. pnpm install
46+ 2. pnpm run build
47+ 3. Unzip resulting archive in ./dist
48+ 4. Copy /dist/fullcalendar-6.1.19/packages/icalendar/index.global.js to static/js-non-bundled/icalendar.js -->
49+
50+ <!-- <script src="https://cdn.jsdelivr.net/npm/@fullcalendar/icalendar@6.1.19/index.global.min.js"></script> -->
51+ < script src ="/js-non-bundled/icalendar.js "> </ script >
52+
3753 < script >
3854 document . addEventListener ( 'DOMContentLoaded' , function ( ) {
3955 var cal_colors = vega . scheme ( 'category10' ) ;
4056 var community_calendar = document . getElementById ( 'community-calendar' ) ;
4157 var calendar = new FullCalendar . Calendar ( community_calendar , {
42- aspectRatio : 1 ,
43- timeZone : 'local' ,
44- initialView : 'dayGridMonth' ,
45- headerToolbar : {
46- left : "prev,next today" ,
47- center : "title" ,
48- right : "dayGridMonth,timeGridWeek,listWeek" ,
49- } ,
50- eventSources : [
51- { { range $key , $value := $ . Site . Data . calendars } }
52- {
53- url : '{{ $key }}.ics' ,
54- format : 'ics' ,
55- color : cal_colors . shift ( ) ,
56- } ,
57- { { end } }
58- ] ,
59- eventClick : function ( info ) {
60- info . jsEvent . preventDefault ( ) ;
61- alert ( 'Event: ' + info . event . title + '\n' + info . event . extendedProps . description + '\n' + 'URL: ' + info . event . url ) ;
58+ aspectRatio : 1 ,
59+ timeZone : 'local' ,
60+ initialView : 'timeGridWeek' ,
61+ headerToolbar : {
62+ left : "prev,next today" ,
63+ center : "title" ,
64+ right : "dayGridMonth,timeGridWeek,listWeek" ,
65+ } ,
66+ eventSources : [
67+ { { - range $key, $value := $ . Site . Data . calendars } }
68+ {
69+ url : '{{ $key }}.ics' ,
70+ format : 'ics' ,
71+ backgroundColor : cal_colors . shift ( ) ,
6272 } ,
63- eventDisplay : 'block' ,
73+ { { - end } }
74+ ] ,
75+ eventClick : function ( info ) {
76+ info . jsEvent . preventDefault ( ) ;
77+ alert ( 'Event: ' + info . event . title + '\n' + info . event . extendedProps . description + '\n' + 'URL: ' + info . event . url ) ;
78+ } ,
79+ eventDisplay : 'block' ,
6480 } ) ;
6581 calendar . render ( ) ;
6682 } ) ;
0 commit comments