From d4a052e86f33ced79b9f4d09aeee0b1c43ef1f23 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Tue, 31 May 2022 01:45:54 -0700 Subject: Improve imghover shortcode, examples, page scores --- templates/shortcodes/imagehover.html | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'templates/shortcodes/imagehover.html') diff --git a/templates/shortcodes/imagehover.html b/templates/shortcodes/imagehover.html index 68f25be..99dd4e4 100644 --- a/templates/shortcodes/imagehover.html +++ b/templates/shortcodes/imagehover.html @@ -8,22 +8,33 @@ {%- else %}
## {{ sourcename }}
-
+
{%- endif %} {%- endfor %} +{%- if w and h and p %} + {%- set padding = h / w * p %} +{%- elif w and h %} + {%- set padding = h / w * 50 %} +{%- else %} + {%- set padding = 50 %} +{%- endif %} +