{{ $site := .Site}} {{$top := . }} {{$needsContentRender := true }} {{ range .Params.content }} {{ $currentContent := . }} {{ if .file }} {{ if $top.Resources.GetMatch .file }} {{ $currentContent = $top.Resources.GetMatch .file | transform.Unmarshal }} {{ else }} {{ $currentContent = resources.Get .file | transform.Unmarshal }} {{ end }} {{ end }} {{ $types := split $currentContent.type " " }}
{{$title := $currentContent.title}} {{ with $currentContent.icon }} {{$title = default $title (findRE "\\w+(?:\\.\\w+)*$" .)}} {{ partialCached "util/icon" (dict "key" . "size" 50 "class" "main-icon" "alt" $title) (print . "main-icon") }} {{ end }} {{ with $currentContent.image }} {{$anchor := .anchor | default "" }} {{ $cover := (partial "util/image.html" (dict "Page" $top "image" .href)).Fill (print (mul .width 2) "x" (mul .height 2) " " $anchor) }} {{.alt}} {{ end }} {{with $currentContent.title}}

{{. | markdownify}}

{{ end }} {{with $currentContent.subtitle}}

{{. | markdownify}}

{{ end }} {{with $currentContent.content}}

{{. | markdownify}}

{{ end }} {{ if in $types "content" }} {{ $needsContentRender = false }} {{ $top.Content }} {{ end }} {{ if in $types "blog" }} {{ end }} {{ $defaultFilter := $currentContent.filter }} {{ $filter := false }} {{ $list := "" }} {{ $filters := newScratch }} {{ if in $types "filter" }} {{ range $currentContent.items }} {{ $list = print $list " " (trim .filter " ") }} {{ end }} {{ $list = uniq (split (trim $list " ") " ") }} {{ $title := .title | urlize}} {{ range $index, $element := $list }} {{ $filters.Set $element $index }} {{ end }} {{ end }} {{ with $currentContent.items}}
{{ range . }}
{{ $title := .title }} {{ with .image }} {{$anchor := .anchor | default "" }} {{ $cover := (partial "util/image.html" (dict "Page" $top "image" .href)).Fill (print (mul .width 2) "x" (mul .height 2) " " $anchor) }} {{.alt | default $title}} {{ end }} {{ with .video }} {{ end }} {{$title := .title }} {{ with .icon }} {{$title = default $title (findRE "\\w+(?:\\.\\w+)*$" .href)}} {{ partialCached "util/icon" (dict "key" .href "size" (default 40 .width) "alt" $title "class" "item-icon") (print . "item-icon") }} {{ end }} {{ with .title }}

{{. | markdownify }}

{{ end }} {{ with .subtitle }}

{{. | markdownify}}

{{ end }} {{ with .heading }}

{{. | markdownify}}

{{ end }} {{ with .content}}
{{. | markdownify}}
{{ end }} {{ with .attribution}} {{. |markdownify}} {{ end }} {{ $title := default .title "" }} {{ with .links}} {{ end }}
{{ end }}
{{ end }} {{ with .attribution }} {{. |markdownify}} {{ end }}
{{ end }} {{ if (and (or (not .Params.Content) .Content) $needsContentRender) }}
{{- partial "util/cover.html" (dict "class" "banner-holder" "page" . "width" 1024 "height" 330) -}}
{{with .Title}}

{{.}}

{{end}} {{ with .Params.subtitle }} {{.}} {{ end }} {{ .Content }} {{- with .Params.tags }} {{ end }}
{{ end }}