summaryrefslogtreecommitdiffstatshomepage
path: root/templates/shortcodes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/shortcodes/img.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html
index ff6869d..1b960c4 100644
--- a/templates/shortcodes/img.html
+++ b/templates/shortcodes/img.html
@@ -1,6 +1,10 @@
{% set url = page.path ~ path | trim_start_matches(pat="/") -%}
{% set image = resize_image(path=url, width=width | default(value=500), op="fit_width", format=format | default(value="jpg")) -%}
+{% if not float -%}
<figure>
+{% else -%}
+<figure style="float: {{ float }};">
+{% endif -%}
<a href="/{{ url }}">
<img src="{{ image.url }}" alt="{{ alt }}" />
</a>