From 21241c212ea9b6a7f8727564bd245bf3857e1a0d Mon Sep 17 00:00:00 2001 From: Niek Blankers Date: Thu, 22 Oct 2020 13:12:26 +0200 Subject: relative-cover: init Responsive cover images (#43) Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com> - generates images of different sizes - browser can choose between set of images w.r.t viewport width - is enabled by default - supported image formats : https://gohugo.io/content-management/image-processing/#target-format - Customizing site config params: params: cover: responsiveImages: false # if want to disable it linkFullImages: true # if link original image on clicking cover --- layouts/_default/single.html | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'layouts/_default/single.html') diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ec8038e..20c3bc9 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -26,16 +26,7 @@ {{- end}} - {{- if .Params.cover.image }} -
- {{- if (ne .Params.cover.relative true) }} - {{ .Params.cover.alt | plainify }} - {{- else}} - {{ .Params.cover.alt | plainify }} - {{- end}} -

{{.Params.cover.caption | markdownify }}

-
- {{- end }} + {{- partial "cover.html" (dict "cxt" . "IsHome" false) }} {{- if .Params.ShowToc }}
@@ -68,4 +59,4 @@ {{- end }} -{{- end }}{{/* end main */}} \ No newline at end of file +{{- end }}{{/* end main */}} -- cgit v1.2.3