From 98186b5ae904df9176844c8ab6cd1ba6281cf5d6 Mon Sep 17 00:00:00 2001 From: sebousan Date: Mon, 25 Mar 2024 10:39:23 +0100 Subject: [PATCH] add desktop and mobile size to block-figure --- layouts/partials/blocks/templates/figure.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/layouts/partials/blocks/templates/figure.html b/layouts/partials/blocks/templates/figure.html index cba8183..6569d2c 100644 --- a/layouts/partials/blocks/templates/figure.html +++ b/layouts/partials/blocks/templates/figure.html @@ -17,6 +17,8 @@ {{- $desktop = printf "%sx" (string $width) -}} {{- end -}} +{{- if .figure -}} +{{- $figure := merge .figure (dict "desktop" $desktop "mobile" $mobile) -}}
@@ -27,7 +29,7 @@
{{- end -}} - {{- with .figure -}} + {{- with $figure -}} {{- partial "commons/figure" . -}} {{- end -}} @@ -37,4 +39,5 @@ {{- end -}}
-
\ No newline at end of file + +{{- end -}} \ No newline at end of file