diff options
| author | Jieiku | 2022-07-27 22:46:21 -0700 |
|---|---|---|
| committer | Jieiku | 2022-07-27 22:46:21 -0700 |
| commit | 0e57376f244848c6513236424dffb63acd15271c (patch) | |
| tree | 7815270c6072ff49104bb4ea142c663b4a39b724 /templates/shortcodes/imghover.html | |
| parent | fe718cfb3b63bce0dcc8766d32b1f86f8cc65ade (diff) | |
| download | abridge-0e57376f244848c6513236424dffb63acd15271c.tar.gz abridge-0e57376f244848c6513236424dffb63acd15271c.tar.bz2 abridge-0e57376f244848c6513236424dffb63acd15271c.zip | |
img/imghover shortcodes optional width/height
Diffstat (limited to 'templates/shortcodes/imghover.html')
| -rw-r--r-- | templates/shortcodes/imghover.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/shortcodes/imghover.html b/templates/shortcodes/imghover.html index b1af3f9..1ad733c 100644 --- a/templates/shortcodes/imghover.html +++ b/templates/shortcodes/imghover.html @@ -69,9 +69,10 @@ {%- set metafile = page.path ~ path ~ sourcepath %} {%- set meta = get_image_metadata(path=metafile) %} {%- set padding = meta.height / meta.width * p %} - /* height={{meta.height}} width={{meta.width}} (THIS IS BACKWARDS!?) */ {%- else %} - {%- set padding = 50 %} + {%- set metafile = page.path ~ path ~ sourcepath %} + {%- set meta = get_image_metadata(path=metafile) %} + {%- set padding = meta.height / meta.width * 50 %} {%- endif %} |
