mirror of
https://github.com/xlionjuan/xlion-blog.git
synced 2026-11-17 04:17:24 +00:00
12 lines
447 B
HTML
12 lines
447 B
HTML
<!--
|
|
Details disclosure and summary elements hugo shortcode.
|
|
https://gist.github.com/maxrodrigo/34996d1ea036555edb9b692d496fab19?permalink_comment_id=3736076#gistcomment-3736076
|
|
-->
|
|
|
|
{{ .Scratch.Set "lastp" (sub (.Params | len) 1) }}
|
|
<details {{ if .Get 0 | eq "open"}} open {{ end }}>
|
|
<summary>
|
|
{{ i18n "click_to_open" }}{{ .Get (.Scratch.Get "lastp") | markdownify }}
|
|
</summary>
|
|
{{ .Inner | markdownify }}
|
|
</details>
|