diff options
author | Wolfgang Müller | 2021-06-12 14:21:59 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-06-12 14:21:59 +0200 |
commit | ad2be2b20c337d99ebe6e7d4b8cf6106cfba77df (patch) | |
tree | 65c0ddbb7828fd5b174eb531739097f83a3f17ee /templates/shortcodes/img.html | |
download | zunzuncito-ad2be2b20c337d99ebe6e7d4b8cf6106cfba77df.tar.gz |
Initial commit
Diffstat (limited to 'templates/shortcodes/img.html')
-rw-r--r-- | templates/shortcodes/img.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html new file mode 100644 index 0000000..13d38d6 --- /dev/null +++ b/templates/shortcodes/img.html @@ -0,0 +1,9 @@ +{% set url = page.path ~ path | trim_start_matches(pat="/") -%} +<figure> + <a href="/{{ url }}"> + <img src="{{ resize_image(path=url, width=500, op="fit_width") }}" alt="{{ alt }}" /> + </a> + {% if caption -%} + <figcaption class="smaller">{{ caption }}</figcaption> + {% endif -%} +</figure> |