From fa010e1807e046b1a2048d1843f3ed46ba9ed64f Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Wed, 6 Jan 2021 10:23:28 +0100 Subject: [PATCH] Move to leafbox --- layouts/shortcodes/imgthumb.html | 45 +++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/layouts/shortcodes/imgthumb.html b/layouts/shortcodes/imgthumb.html index 40aedee..c9ca77e 100644 --- a/layouts/shortcodes/imgthumb.html +++ b/layouts/shortcodes/imgthumb.html @@ -5,21 +5,43 @@ {{ $imagethumbnail := $image.Resize $options }} - + + {{ with .Get + + + + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
{{ with (.Get "title") -}}

{{ . }}

{{- end -}} - {{- if or (.Get "caption") (.Get "attr") -}}

+ {{- if or (.Get "caption") (.Get "attr") -}}

{{- .Get "caption" | markdownify -}} {{- with .Get "attrlink" }} @@ -30,11 +52,4 @@

{{- end }} - - {{ with .Get -