Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/frjo/hugo-theme-zen.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Jonsson <frjo@xdeb.org>2022-05-24 23:45:24 +0300
committerFredrik Jonsson <frjo@xdeb.org>2022-05-24 23:45:24 +0300
commit34f0579682f97f9fab647249286f7042a85073a8 (patch)
tree90aaabc5595d734d0501432f23e40561448d5822
parentd806a8de650cd4b084a9504de5b99c7cdd19f631 (diff)
Add a detail/summary shortcode.
-rw-r--r--layouts/shortcodes/details.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/shortcodes/details.html b/layouts/shortcodes/details.html
new file mode 100644
index 0000000..e308042
--- /dev/null
+++ b/layouts/shortcodes/details.html
@@ -0,0 +1,6 @@
+{{ $class := .Get "class" -}}
+{{ $summary := .Get "summary" -}}
+<details{{ with $class }} class="{{ . }}"{{ end }}>
+{{ with $summary }}<summary>{{ . }}</summary>{{ end }}
+{{ .Inner | markdownify }}
+</details>