{{ define "title" }}
{{ .Title }}
{{ end }}

{{ define "subtitle" }}
{{ .Params.subtitle }}
{{ end }}

{{ define "extra_css" }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.4.1/event-calendar.min.css">
{{ end }}

{{ define "extra_js" }}
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.4.1/event-calendar.min.js" type="application/javascript"></script>
{{ $js := resources.Get "js/calendar.js" | resources.Minify }}
{{ $secureJS := $js | resources.Fingerprint "sha512" }}
<script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
{{ end }}

{{ define "content" }}
<div id="calendar"></div>
{{ printf "<!--# include virtual='%s' -->" ("/cgi/events.cgi" | relURL) | safeHTML }}
{{ end }}