aboutsummaryrefslogtreecommitdiffstats
path: root/code/frontpage/layouts/shortcodes/details.html
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2023-02-25 13:15:44 +0100
committerivarlovlie <git@ivarlovlie.no>2023-02-25 13:15:44 +0100
commit900bb5e845c3ad44defbd427cae3d44a4a43321f (patch)
treedf3d96a93771884add571e82336c29fc3d9c7a1c /code/frontpage/layouts/shortcodes/details.html
downloadgreatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.tar.xz
greatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.zip
feat: Initial commit
Diffstat (limited to 'code/frontpage/layouts/shortcodes/details.html')
-rw-r--r--code/frontpage/layouts/shortcodes/details.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/code/frontpage/layouts/shortcodes/details.html b/code/frontpage/layouts/shortcodes/details.html
new file mode 100644
index 0000000..61a7183
--- /dev/null
+++ b/code/frontpage/layouts/shortcodes/details.html
@@ -0,0 +1,4 @@
+<details{{ with .Get 1 }} {{ . | safeHTML }}{{ end -}}>
+ <summary>{{ with .Get 0 -}}{{ . | safeHTML }}{{ else -}}{{ errorf "No summary provided"}}{{ end -}}</summary>
+ {{ with .Inner -}}{{ . | markdownify}}{{ else -}}{{ errorf "No details provided"}}{{ end -}}
+</details> \ No newline at end of file