aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-07-07 04:24:59 -0400
committertdro <tdro@noreply.example.com>2022-07-07 04:24:59 -0400
commit9ae8b12c1bb8f8f8d6927150c74e2381cb55c97d (patch)
tree85b4f5d8cc5da10c7b8dbd8d534978952afe2152 /themes/default/layouts/shortcodes
parentd42fb91ac4b4ae75c0ba02126965e71c2d8a68eb (diff)
downloadcanory-9ae8b12c1bb8f8f8d6927150c74e2381cb55c97d.tar.gz
canory-9ae8b12c1bb8f8f8d6927150c74e2381cb55c97d.tar.bz2
canory-9ae8b12c1bb8f8f8d6927150c74e2381cb55c97d.zip
themes/default/layouts/shortcodes/spoiler: Format and use self closing syntax
Diffstat (limited to 'themes/default/layouts/shortcodes')
-rw-r--r--themes/default/layouts/shortcodes/spoiler.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/themes/default/layouts/shortcodes/spoiler.html b/themes/default/layouts/shortcodes/spoiler.html
index 9267876..fd3c9d3 100644
--- a/themes/default/layouts/shortcodes/spoiler.html
+++ b/themes/default/layouts/shortcodes/spoiler.html
@@ -1,9 +1,9 @@
{{- $text := default "This is a spoiler." (.Get "text" | default (.Get 0)) -}}
{{- $title := default "Click to show/hide text." (.Get "title" | default (.Get 1)) -}}
-{{ if gt (len .Inner) 1 }}
- {{ $text = .Inner }}
-{{ end }}
+{{- if gt (len .Inner) 1 -}}
+ {{- $text = .Inner -}}
+{{- end -}}
<input hidden type="checkbox" id="spoiler-text-{{ md5 $text }}" />
<s title="{{ $title }}"><label for="spoiler-text-{{ md5 $text }}">{{ $text | markdownify }}</label></s>