diff options
author | GNUxeava <bluenerd@protonmail.com> | 2022-03-11 10:32:10 +0530 |
---|---|---|
committer | GNUxeava <bluenerd@protonmail.com> | 2022-03-11 10:32:10 +0530 |
commit | fecc9b268410c8fefcd1ca32bc4228bba9002178 (patch) | |
tree | aa621093976dbbe8961f723ddb3569737e96932a /layouts/shortcodes/admonition.html | |
parent | 2dfa39111cd76b102dbb3f58c1754b6c93b0265a (diff) |
use theme
Diffstat (limited to 'layouts/shortcodes/admonition.html')
-rw-r--r-- | layouts/shortcodes/admonition.html | 37 |
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 |