summaryrefslogtreecommitdiffstatshomepage
path: root/templates/shortcodes
diff options
context:
space:
mode:
Diffstat (limited to 'templates/shortcodes')
-rw-r--r--templates/shortcodes/img.html9
-rw-r--r--templates/shortcodes/ref.html1
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>