{{ partial "header.html" . }} {{ partial "navbar.html" . }}

{{ .Title }}

{{ $.Scratch.Set "pre" true }} {{ $.Scratch.Set "post" true }} {{ range .Pages.ByDate.Reverse }} {{ $eventdate := .Param "eventdate" }} {{ $t := (time $eventdate)}} {{ if and ($t.After now) ( $.Scratch.Get "pre")}}

Upcoming Events

{{ $.Scratch.Set "pre" false }} {{ end }} {{ if and ($t.Before now) ($.Scratch.Get "post")}}

Past Events

{{ $.Scratch.Set "post" false }} {{ end }}
{{ if .Param "image" }} {{ $imagename := .Param "image" }} {{ $imagelocation := (printf "%s/%s" "images/events/" $imagename) }} {{ $imageresource := resources.Get $imagelocation }} {{ $image := $imageresource }} {{ .Param {{ else }} {{ .Param "title" }} {{ end }}

{{ .Param "title" }}

{{ dateFormat "January 2, 2006" $eventdate }}
{{ .Param "eventtime" }}
{{ .Param "eventcalendar" }}

{{ .Content }}

{{ if and ($t.After now) }} Registration {{ else }} Access event content {{ end }}

{{ end }}
{{ partial "footer.html" . }}