diff --git a/layouts/partials/article-list/default.html b/layouts/partials/article-list/default.html index ce45368..02e0b30 100644 --- a/layouts/partials/article-list/default.html +++ b/layouts/partials/article-list/default.html @@ -1,35 +1,4 @@ {{ $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink "articleList" }}
- {{ if $image.exists }} -
- - {{ if $image.resource }} - {{- $Permalink := $image.resource.RelPermalink -}} - {{- $Width := $image.resource.Width -}} - {{- $Height := $image.resource.Height -}} - {{- $Srcset := "" -}} - - {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} - {{- $thumbnail := $image.resource.Fill "800x250" -}} - {{- $thumbnailRetina := $image.resource.Fill "1600x500" -}} - {{- $Srcset = printf "%s 800w, %s 1600w" $thumbnail.RelPermalink $thumbnailRetina.RelPermalink -}} - {{- $Permalink = $thumbnail.RelPermalink -}} - {{- $Width = $thumbnail.Width -}} - {{- $Height = $thumbnail.Height -}} - {{- end -}} - - Featured image of post {{ .Title }} - {{ else }} - Featured image of post {{ .Title }} - {{ end }} - -
- {{ end }} - - {{ partialCached "article/components/details" . .RelPermalink }} + {{ partial "article/components/header" . }}
\ No newline at end of file diff --git a/layouts/partials/article/components/header.html b/layouts/partials/article/components/header.html index 4e0b7b3..6713515 100644 --- a/layouts/partials/article/components/header.html +++ b/layouts/partials/article/components/header.html @@ -2,26 +2,32 @@ {{- $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink "article" -}} {{ if $image.exists }}
- {{ if $image.resource }} - {{- if (default true .Site.Params.imageProcessing.cover.enabled) -}} - {{- $tablet := $image.resource.Resize "1024x" -}} - {{- $desktop := $image.resource.Resize "2000x" -}} - + {{ if $image.resource }} + {{- $Permalink := $image.resource.RelPermalink -}} + {{- $Width := $image.resource.Width -}} + {{- $Height := $image.resource.Height -}} + {{- $Srcset := "" -}} + + {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} + {{- $thumbnail := $image.resource.Fill "800x250" -}} + {{- $thumbnailRetina := $image.resource.Fill "1600x500" -}} + {{- $Srcset = printf "%s 800w, %s 1600w" $thumbnail.RelPermalink $thumbnailRetina.RelPermalink -}} + {{- $Permalink = $thumbnail.RelPermalink -}} + {{- $Width = $thumbnail.Width -}} + {{- $Height = $thumbnail.Height -}} + {{- end -}} + + Featured image of post {{ .Title }} - {{- else -}} - Featured image of post {{ .Title }} - {{- end -}} - {{ else }} - Featured image of post {{ .Title }} - {{ end }} + {{ else }} + Featured image of post {{ .Title }} + {{ end }} +
{{ end }}