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 | |
download | zunzuncito-ad2be2b20c337d99ebe6e7d4b8cf6106cfba77df.tar.gz |
Initial commit
Diffstat (limited to '')
-rw-r--r-- | templates/shortcodes/img.html | 9 | ||||
-rw-r--r-- | templates/shortcodes/ref.html | 1 |
2 files changed, 10 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> diff --git a/templates/shortcodes/ref.html b/templates/shortcodes/ref.html new file mode 100644 index 0000000..6708552 --- /dev/null +++ b/templates/shortcodes/ref.html @@ -0,0 +1 @@ +<a href="/{{ id }}">{{ text | default(value="№ " ~ id) }}</a> |