diff --git a/layouts/index.html b/layouts/index.html index 485af81..c7af6ae 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -12,13 +12,19 @@ {{- $heroBanner := .Resources.GetMatch "banner.png" -}} {{- if not $heroBanner -}}{{- $heroBanner = .Resources.GetMatch "banner.*" -}}{{- end -}} + {{- if $heroBanner -}} +
+ {{- partial "img.html" (dict "res" $heroBanner "widths" (slice 1200 1920 2560) "sizes" "100vw" "class" "w-full h-full object-cover" "alt" "" "loading" "eager") -}} +
+ {{- else -}} {{- $heroBannerSrc := "" -}} - {{- with $heroBanner }}{{ $heroBannerSrc = .RelPermalink }}{{ else }}{{ with $.Params.background }}{{ $heroBannerSrc = .src }}{{ else }}{{ with $.Params.banner }}{{ $heroBannerSrc = .src }}{{ end }}{{ end }}{{ end -}} + {{- with .Params.background }}{{ $heroBannerSrc = .src }}{{ else }}{{ with $.Params.banner }}{{ $heroBannerSrc = .src }}{{ end }}{{ end -}} {{- with $heroBannerSrc -}}
{{- end -}} + {{- end -}}