{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
{{ $useDefault := true }} {{ $homepageImage := "" }} {{ with .Site.Params.defaultBackgroundImage }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $homepageImage = resources.GetRemote . }} {{ else }} {{ $homepageImage = resources.Get . }} {{ end }} {{ end }} {{ with .Site.Params.homepage.homepageImage }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $homepageImage = resources.GetRemote . }} {{ $useDefault = false }} {{ else }} {{ $homepageImage = resources.Get . }} {{ $useDefault = false }} {{ end }} {{ end }} {{ if $homepageImage }} {{ $style := "" }} {{ $defaultPosition := cond $useDefault site.Params.imagePosition false }} {{ with $.Params.imagePosition | default $defaultPosition }} {{ $style = printf "object-position: %s;" . }} {{ end }}
{{ end }}
{{ with .Site.Params.Author.image }} {{ $authorImage := "" }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $authorImage = resources.GetRemote . }} {{ else }} {{ $authorImage = resources.Get . }} {{ end }} {{ if $authorImage }} {{ $final := $authorImage }} {{ $squareImage := $authorImage }} {{ if not (or $disableImageOptimization (eq $authorImage.MediaType.SubType "svg")) }} {{ $final = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }} {{ $shortSide := int (math.Min $authorImage.Width $authorImage.Height) }} {{ $squareImage = $authorImage.Crop (printf "%dx%d" $shortSide $shortSide ) }} {{ end }} {{ $.Site.Params.Author.name | default `Author` }} {{ end }} {{ end }}

{{ .Site.Params.Author.name | default .Site.Title }}

{{ with .Site.Params.Author.headline }}

{{ . | markdownify }}

{{ end }}
{{ with .Site.Params.Author.links }}
{{ range $links := . }} {{ range $name, $url := $links }} {{ partial "icon.html" $name }} {{ end }} {{ end }}
{{ end }}
{{ .Content }}
{{ partial "recent-articles/main.html" . }}
{{ if .Site.Params.homepage.layoutBackgroundBlur | default false }}
{{ $backgroundBlur := resources.Get "js/background-blur.js" }} {{ $backgroundBlur = $backgroundBlur | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }} {{ end }}