Add a details shortcode

This commit is contained in:
Danila Fedorin 2023-06-04 21:54:08 -07:00
parent 7e3099aae3
commit 502190055d
2 changed files with 24 additions and 0 deletions

View File

@ -339,3 +339,23 @@ figure {
margin: 0 0.25rem 0 0.25rem;
}
}
details {
@include bordered-block;
padding: 0.5rem 0.5rem 0 0.5rem;
&[open] {
padding-bottom: 0.5rem;
summary {
border-bottom: $standard-border;
margin-bottom: 0.5rem;
}
}
}
summary {
margin: 0 -0.5rem 0 -0.5rem;
padding: 0.5rem;
padding-top: 0;
}

View File

@ -0,0 +1,4 @@
<details>
<summary>{{ .Get "summary" | markdownify }}</summary>
{{ .Inner | markdownify }}
</details>