aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/mypaper/layouts/shortcodes/collapse.html
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2022-04-19 19:29:38 +0900
committernsfisis <nsfisis@gmail.com>2022-04-19 19:37:17 +0900
commit5a8024a827b6dbb103712865261c9a5ebc2908f9 (patch)
tree38b06170f358cd22492ff4f8879f3d413c942623 /themes/mypaper/layouts/shortcodes/collapse.html
parentde3cb0a4ad98708540e9fa9ff7831f583ce380c7 (diff)
downloadnsfisis.github.io-5a8024a827b6dbb103712865261c9a5ebc2908f9.tar.gz
nsfisis.github.io-5a8024a827b6dbb103712865261c9a5ebc2908f9.tar.zst
nsfisis.github.io-5a8024a827b6dbb103712865261c9a5ebc2908f9.zip
add themes/mypaper, modified version of paper theme
Diffstat (limited to 'themes/mypaper/layouts/shortcodes/collapse.html')
-rw-r--r--themes/mypaper/layouts/shortcodes/collapse.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/themes/mypaper/layouts/shortcodes/collapse.html b/themes/mypaper/layouts/shortcodes/collapse.html
new file mode 100644
index 0000000..b92ad01
--- /dev/null
+++ b/themes/mypaper/layouts/shortcodes/collapse.html
@@ -0,0 +1,12 @@
+{{ if .Get "content" }}
+{{ if .Get "summary" }}
+{{ else }}
+{{ warnf "missing value for param 'summary': %s" .Position }}
+{{ end }}
+{{ else }}
+{{ errorf "missing value for param 'content': %s" .Position }}
+{{ end }}
+<p><details {{ if (eq (.Get "openByDefault") true) }} open=true {{ end }}>
+ <summary markdown="span">{{ .Get "summary" | markdownify }}</summary>
+ {{ .Get "content" | markdownify }}
+</details></p>