{{ define "main" }}
{{ .Content }} {{ $image := .Resources.GetMatch "front.*" }} {{ with $image }} {{ $image_400 := .Fit "400x400" }} {{ $image_600 := .Fit "600x600" }} {{ $image_800 := .Fit "800x800" }}
{{ .Title }}
{{ end }} {{ $events := where .Site.RegularPages "Section" "events" }} {{ with $events }} {{ range first 1 (.ByParam "startDate").Reverse }} {{ $current := partial "events/isCurrent" . }} {{ if $current }}

Current Event

{{ else }}

Latest Event

{{ end }}
{{ partial "events/preview" . }}
{{ end }} {{ end }} {{ $posts := where .Site.RegularPages "Section" "posts" }} {{ with $posts }}

Recent Posts

{{ $latest := first 3 $posts.ByDate.Reverse }}
{{ partial "posts/listing" $latest }}
{{ end }}
{{ end }}