aboutsummaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-11-18 19:41:45 -0500
committertdro <tdro@noreply.example.com>2022-11-18 19:41:45 -0500
commit886e656644c9895f7c5350411898ae35f495d9a2 (patch)
treec445b08e4a3d7a79ed11b3608252a31ec1ccb546 /themes
parentf38088bf3bcf8f4d1b5c7e42f2abc2b9b89d2eb4 (diff)
downloadcanory-886e656644c9895f7c5350411898ae35f495d9a2.tar.gz
canory-886e656644c9895f7c5350411898ae35f495d9a2.tar.bz2
canory-886e656644c9895f7c5350411898ae35f495d9a2.zip
themes/default/layouts/shortcodes/disclose: Allow inner
Inherit display instead of revert
Diffstat (limited to 'themes')
-rw-r--r--themes/default/layouts/shortcodes/disclose.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/themes/default/layouts/shortcodes/disclose.html b/themes/default/layouts/shortcodes/disclose.html
index fdbcc6a..2cc99c7 100644
--- a/themes/default/layouts/shortcodes/disclose.html
+++ b/themes/default/layouts/shortcodes/disclose.html
@@ -1,5 +1,9 @@
{{- $text := default "Content Warning: " (.Get "text" | default (.Get 0)) -}}
+{{- if gt (len .Inner) 1 -}}
+ {{- $text = .Inner -}}
+{{- end -}}
+
<details data-disclosure>
<summary>{{ (or $.Page.Params.title $text) | markdownify }}</summary>
</details>