Add a details shortcode
This commit is contained in:
parent
7e3099aae3
commit
502190055d
|
@ -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;
|
||||
}
|
||||
|
|
4
layouts/shortcodes/details.html
Normal file
4
layouts/shortcodes/details.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<details>
|
||||
<summary>{{ .Get "summary" | markdownify }}</summary>
|
||||
{{ .Inner | markdownify }}
|
||||
</details>
|
Loading…
Reference in New Issue
Block a user