aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2024-09-10 00:00:00 +0000
committertdro <tdro@noreply.example.com>2024-09-10 00:00:00 +0000
commit1a3954b95b6fa14331e20e304b064d7e7e29712c (patch)
treeb2714535e2bc433a9404ecf155af5c75bb0280e9
parent06bd42fb1ebf2f788232b79f6998b334f41c5284 (diff)
downloadcanory-1a3954b95b6fa14331e20e304b064d7e7e29712c.tar.gz
canory-1a3954b95b6fa14331e20e304b064d7e7e29712c.tar.bz2
canory-1a3954b95b6fa14331e20e304b064d7e7e29712c.zip
themes/default/layouts/partials/gallery-walk: Hack to be more precise
-rw-r--r--themes/default/layouts/_default/_markup/render-image.html5
-rw-r--r--themes/default/layouts/partials/gallery-walk.html16
2 files changed, 12 insertions, 9 deletions
diff --git a/themes/default/layouts/_default/_markup/render-image.html b/themes/default/layouts/_default/_markup/render-image.html
index 04bf931..57433be 100644
--- a/themes/default/layouts/_default/_markup/render-image.html
+++ b/themes/default/layouts/_default/_markup/render-image.html
@@ -86,7 +86,10 @@
<a data-orientation="{{ $orientation }}" href="{{ $source }}">
<picture>
{{- with $srcset }}
- <source srcset="{{ $srcset }}" type="{{ or $type "image/webp" }}" />
+ <source
+ srcset="{{ $srcset }}"
+ type="{{ or $type "image/webp" }}"
+ />
{{- end }}
<img
loading="lazy"
diff --git a/themes/default/layouts/partials/gallery-walk.html b/themes/default/layouts/partials/gallery-walk.html
index ca95d3f..090eabe 100644
--- a/themes/default/layouts/partials/gallery-walk.html
+++ b/themes/default/layouts/partials/gallery-walk.html
@@ -5,14 +5,14 @@
{{- range (where $filteredPages "Section" $author.user) -}}
{{- if in .Content "<picture>" -}}
{{- $data = $data | append (dict
- "alt" (delimit (findRE `(?sU)alt=".*"` .Content 1) "")
- "height" (delimit (findRE `(?sU)height=".*"` .Content 1) "")
- "src" (delimit (findRE `(?sU)src=".*"` .Content 1) "")
- "srcset" (delimit (findRE `(?sU)srcset=".*"` .Content 1) "")
- "style" (delimit (findRE `(?sU)style=".*"` .Content 1) "")
- "title" (delimit (findRE `(?sU)title=".*"` .Content 1) "")
- "type" (delimit (findRE `(?sU)type=".*"` .Content 1) "")
- "width" (delimit (findRE `(?sU)width=".*"` .Content 1) "")
+ "srcset" (delimit (findRE `(?sU)\s{8}srcset=".*"` .Content 1) "")
+ "type" (delimit (findRE `(?sU)\s{8}type=".*"` .Content 1) "")
+ "alt" (delimit (findRE `(?sU)\s{8}alt=".*"` .Content 1) "")
+ "height" (delimit (findRE `(?sU)\s{8}height=".*"` .Content 1) "")
+ "src" (delimit (findRE `(?sU)\s{8}src=".*"` .Content 1) "")
+ "style" (delimit (findRE `(?sU)\s{8}style=".*"` .Content 1) "")
+ "title" (delimit (findRE `(?sU)\s{8}title=".*"` .Content 1) "")
+ "width" (delimit (findRE `(?sU)\s{8}width=".*"` .Content 1) "")
"relatedHref" .Permalink
)
-}}