aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/partials')
-rw-r--r--themes/default/layouts/partials/gallery-walk.html12
1 files changed, 8 insertions, 4 deletions
diff --git a/themes/default/layouts/partials/gallery-walk.html b/themes/default/layouts/partials/gallery-walk.html
index 693c113..ca95d3f 100644
--- a/themes/default/layouts/partials/gallery-walk.html
+++ b/themes/default/layouts/partials/gallery-walk.html
@@ -26,16 +26,20 @@
{{- range $image := $data }}
<a href="{{ $image.relatedHref }}">
<picture>
- <source
- {{ $image.srcset | safeHTMLAttr }}
- {{ $image.type | safeHTMLAttr }}
- />
+ {{- with $image.srcset -}}
+ <source
+ {{ $image.srcset | safeHTMLAttr }}
+ {{ $image.type | safeHTMLAttr }}
+ />
+ {{- end -}}
<img
loading="lazy"
{{ $image.alt | safeHTMLAttr }}
{{ $image.title | safeHTMLAttr }}
+ {{ with ne (index (last 1 (split $image.width "=")) 0) `""` }}
{{ $image.width | safeHTMLAttr }}
{{ $image.height | safeHTMLAttr }}
+ {{ end }}
{{ $image.src | safeHTMLAttr }}
{{ $image.style | safeHTMLAttr }}
/>