aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes/abbr.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-05-03 04:25:49 -0400
committertdro <tdro@noreply.example.com>2022-05-03 04:25:49 -0400
commite92dc018e28ba8d44f1c6cbc9fb0b779dec271e6 (patch)
tree3667043819ab91065019dfe3b4ff83ad625c2b49 /themes/default/layouts/shortcodes/abbr.html
downloadcanory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.tar.gz
canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.tar.bz2
canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.zip
config.yaml: Commission
Diffstat (limited to 'themes/default/layouts/shortcodes/abbr.html')
-rw-r--r--themes/default/layouts/shortcodes/abbr.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/themes/default/layouts/shortcodes/abbr.html b/themes/default/layouts/shortcodes/abbr.html
new file mode 100644
index 0000000..d661bd5
--- /dev/null
+++ b/themes/default/layouts/shortcodes/abbr.html
@@ -0,0 +1,4 @@
+{{- $abbr := default "TL;DR:" (.Get "abbr" | default (.Get 0)) -}}
+{{- $title := default "Too long, didn't read" (.Get "title" | default (.Get 1)) -}}
+
+<abbr title="{{ $title }}">{{ $abbr | markdownify }}</abbr>