{{/* Parameters: SmallTitle: string Image: Image object Title Description ImageWidths: array of ints ShowImage: bool */}} {{ $blurry := false }} {{ $vibrant := false }} {{ if and .Image }} {{ $blurry = default .Context.Site.Params.Default.Hero.Blurry .Context.Params.Hero.Blurry }} {{ $vibrant = default .Context.Site.Params.Default.Hero.Vibrant .Context.Params.Hero.Vibrant }} {{ end }}
{{ if .Image }} {{ if .ShowImage }}
{{ partial "helper/image/lazy" (dict "Image" .Image "Alt" (default .ImageAlt (printf "Cover image of %s" .Title)) "Widths" .ImageWidths )}}
{{ if $blurry }}
{{ end }} {{ end }} {{ $resized := partial "helper/image/resize" (dict "Image" .Image "Width" 50 ) }} {{ $backgroundURL := $resized.Permalink }} {{ if $resized.Local }} {{ $backgroundURL = printf "data:image/png;base64, %s" ($resized.Resource.Content | base64Encode) }} {{ end }} {{ end }}
{{ with .SmallTitle }} {{ . | safeHTML }} {{ end }} {{ with .Title }}

{{ . | safeHTML }}

{{ end }} {{ with .Description }}

{{ . }}

{{ end }}