aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes/admonition.html
diff options
context:
space:
mode:
authorGNUxeava <bluenerd@protonmail.com>2022-03-11 10:32:10 +0530
committerGNUxeava <bluenerd@protonmail.com>2022-03-11 10:32:10 +0530
commitfecc9b268410c8fefcd1ca32bc4228bba9002178 (patch)
treeaa621093976dbbe8961f723ddb3569737e96932a /layouts/shortcodes/admonition.html
parent2dfa39111cd76b102dbb3f58c1754b6c93b0265a (diff)
use theme
Diffstat (limited to 'layouts/shortcodes/admonition.html')
-rw-r--r--layouts/shortcodes/admonition.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/layouts/shortcodes/admonition.html b/layouts/shortcodes/admonition.html
new file mode 100644
index 0000000..fa5aacb
--- /dev/null
+++ b/layouts/shortcodes/admonition.html
@@ -0,0 +1,37 @@
+{{ if .IsNamedParams -}}
+
+ {{ if eq (.Get "details") "true" -}}
+
+<details class="admonition {{ .Get "type" }}">
+ {{- with .Get "title" }}<summary class="admonition-title">{{ . }}</summary>{{ end }}
+ {{ .Inner }}
+</details>
+
+ {{- else -}}
+
+<div class="admonition {{ .Get "type" }}">
+ {{- with .Get "title" }}<p class="admonition-title">{{ . }}</p>{{ end }}
+ {{ .Inner }}
+</div>
+
+ {{- end }}
+
+{{- else -}}
+
+ {{ if eq (.Get 2) "true" -}}
+
+<details class="admonition {{ .Get 0 }}">
+ {{- with .Get 1 }}<summary class="admonition-title">{{ . }}</summary>{{ end }}
+ {{ .Inner }}
+</details>
+
+ {{- else -}}
+
+<div class="admonition {{ .Get 0 }}">
+ {{- with .Get 1 }}<p class="admonition-title">{{ . }}</p>{{ end }}
+ {{ .Inner }}
+</div>
+
+ {{- end }}
+
+{{- end }} \ No newline at end of file