aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r--layouts/shortcodes/details.html6
-rw-r--r--layouts/shortcodes/expand.html1
2 files changed, 7 insertions, 0 deletions
diff --git a/layouts/shortcodes/details.html b/layouts/shortcodes/details.html
new file mode 100644
index 0000000..f6fff38
--- /dev/null
+++ b/layouts/shortcodes/details.html
@@ -0,0 +1,6 @@
+<details {{ if or (.Get "open") (in .Params "open") }}open{{ end }}>
+ <summary>{{ cond .IsNamedParams (.Get "title") (.Get 0) }}</summary>
+ <div class="markdown-inner">
+ {{ .Inner | markdownify }}
+ </div>
+</details>
diff --git a/layouts/shortcodes/expand.html b/layouts/shortcodes/expand.html
index 1c0cb6b..f254944 100644
--- a/layouts/shortcodes/expand.html
+++ b/layouts/shortcodes/expand.html
@@ -1,3 +1,4 @@
+{{ warnf "Expand shortcode is deprecated. Use 'details' instead." }}
<div class="book-expand">
<label>
<div class="book-expand-head flex justify-between">