aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes/abbr.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-05-31 00:48:35 -0400
committertdro <tdro@noreply.example.com>2022-05-31 00:48:35 -0400
commit033a5bf2d11ee7052967f1148f495d9c0cc14662 (patch)
tree45fe9724e105641233139036c7ed02474d05c757 /themes/default/layouts/shortcodes/abbr.html
parenta7ae254e947d74dac5d3cbb28469f89ac0947ad8 (diff)
downloadcanory-033a5bf2d11ee7052967f1148f495d9c0cc14662.tar.gz
canory-033a5bf2d11ee7052967f1148f495d9c0cc14662.tar.bz2
canory-033a5bf2d11ee7052967f1148f495d9c0cc14662.zip
themes/default/layouts/shortcodes/abbr: Allow click expansion
Diffstat (limited to 'themes/default/layouts/shortcodes/abbr.html')
-rw-r--r--themes/default/layouts/shortcodes/abbr.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/themes/default/layouts/shortcodes/abbr.html b/themes/default/layouts/shortcodes/abbr.html
index e40df57..0edff43 100644
--- a/themes/default/layouts/shortcodes/abbr.html
+++ b/themes/default/layouts/shortcodes/abbr.html
@@ -1,5 +1,7 @@
{{- $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>
+{{- $id := delimit (shuffle (seq 0 20)) "" -}}
+<input hidden type="checkbox" id="abbr-{{ $id }}" />
+<abbr title="{{ $title }}"><label for="abbr-{{ $id }}">{{ $abbr | markdownify }}</label></abbr>
{{- /* This comment removes trailing newlines and white spaces. */ -}}