Created
January 26, 2023 17:07
-
-
Save exkuretrol/36526c73f6d44389e6ee9f63f2d789c0 to your computer and use it in GitHub Desktop.
Creates a details HTML element. You can pass your title to summary element to setup `title` argument.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ $open := .Get "open" | default "false" }} | |
{{ $markdownify := .Get "markdownify" | default "true" }} | |
<details | |
{{ if eq $open "true"}} | |
open | |
{{ end }} | |
> | |
<summary> | |
{{ i18n "click_to_open" | default "Click to Open" }} | |
{{ with .Get "title" }} | |
{{ . | markdownify }} | |
{{ end }} | |
</summary> | |
{{ if eq $markdownify "true"}} | |
{{ .Inner | markdownify }} | |
{{ else }} | |
{{ .Inner }} | |
{{ end }} | |
</details> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment