{{- define "main" -}}
{{- .Content }}
{{- $paginator := .Paginate .Pages.ByPublishDate.Reverse 6 }}
{{- $.Scratch.Set "cardskip" 0 }}
{{- if eq $paginator.PageNumber 1 }}
{{- $.Scratch.Set "cardskip" 4 }}
{{- range first ($.Scratch.Get "cardskip") $paginator.Pages }}
{{- $ph := cond (or (not .Params.header) (not (fileExists (printf "static/%s" .Params.header)))) (cond (or (not .Parent.Params.header) (not (fileExists (printf "static/%s" .Parent.Params.header)))) "/img/speedy.png" .Parent.Params.header) .Params.header }}
{{ .Title }}
{{ .Content | safeHTML | truncate 1024 }}
{{- if .Truncated }}
{{- end }}