{{- $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink "article" -}} {{ if $image.exists }}
{{ if $image.resource }} {{- $Permalink := $image.resource.RelPermalink -}} {{- $Width := $image.resource.Width -}} {{- $Height := $image.resource.Height -}} {{- $Srcset := slice -}} {{- if .Page.Site.Params.ImageProcessing.Cover.Enabled -}} {{- $keys := slice "small" "big" -}} {{- range $keys -}} {{- with (index $.Page.Site.Params.ImageProcessing.Cover .) -}} {{- if gt $Width .Threshold -}} {{- $resized := $image.resource.Resize (printf "%dx" .Width) -}} {{- $Srcset = $Srcset | append (printf `%s %dw` $resized.RelPermalink .Width) -}} {{- end -}} {{- end -}} {{- end -}} {{- $Srcset = $Srcset | append (printf `%s %dw` $Permalink $Width) -}} {{- end -}} Featured image of post {{ .Title }} {{ else }} Featured image of post {{ .Title }} {{ end }}
{{ end }} {{ partialCached "article/components/details" . .RelPermalink }}