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/list.html | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'layouts/_default/list.html') diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a92fe71..3596a93 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -31,15 +31,7 @@ {{- $class = "post-entry tag-entry" }} {{- end }}
- {{- if .Params.cover.image }} -
- {{- if (ne .Params.cover.relative true) }} - {{ .Params.cover.alt | plainify }} - {{- else}} - {{ .Params.cover.alt | plainify }} - {{- end}} -
- {{- end }} + {{- partial "cover.html" (dict "cxt" . "IsHome" true) }}

{{ .Title }} @@ -75,4 +67,4 @@ {{- end }} {{end}}{{/* end profileMode */}} -{{- end }}{{- /* end main */ -}} \ No newline at end of file +{{- end }}{{- /* end main */ -}} -- cgit v1.2.3