{{ define "main" }}
{{- with .Site.Params.homepageImage -}}
{{- end -}}

{{ .Site.Title }}

{{- with .Site.Params.description -}}

{{ . | safeHTML }}

{{- end -}}
{{- range first 1 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) -}} {{ $page := . }}
{{- with $page.Params.images -}} {{- $images := . -}} {{- with $page.Site.GetPage "section" "images" -}} {{- with .Resources.GetMatch (strings.TrimPrefix "/images/" (index $images 0)) -}} {{- $image := .Fill "700x450" -}} {{ $page.Title }} {{- end -}} {{- end -}} {{- end -}}
{{ $page.Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}

{{ $page.Title }}

{{ $page.Summary }}
{{- end -}}
{{ range after 1 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
{{ .Render "card" }}
{{ end }}
{{ end }}