From b026701dd6fa1a653d35f6f1e6ed7adc48d59082 Mon Sep 17 00:00:00 2001 From: Geo Date: Sun, 17 Apr 2022 15:37:27 +0100 Subject: [PATCH] feat: re-add link option to figures --- wowchemy/layouts/shortcodes/figure.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wowchemy/layouts/shortcodes/figure.html b/wowchemy/layouts/shortcodes/figure.html index c9800d62..8327f1cf 100644 --- a/wowchemy/layouts/shortcodes/figure.html +++ b/wowchemy/layouts/shortcodes/figure.html @@ -9,6 +9,8 @@ {{ $zoom := eq (.Get "lightbox" | default "true") "true" }} {{ $id := anchorize (.Get "id" | default ($caption | plainify)) }} {{ $alt := .Get "alt" | default ($caption | plainify) }} +{{ $link := .Get "link" }} +{{ $zoom = cond (ne $link "") false $zoom }} {{ $img_class := "" }} {{ if eq (.Get "theme" | lower) "light" }}{{ $img_class = printf "%s img-light" $img_class }}{{end}} {{ if eq (.Get "theme" | lower) "dark" }}{{ $img_class = printf "%s img-dark" $img_class }}{{end}} @@ -25,6 +27,9 @@