layouts: add spoiler shortcode

This commit is contained in:
Bruno BELANYI 2021-01-23 16:08:01 +01:00
parent d20b6aed18
commit 370f40ef5a
2 changed files with 13 additions and 0 deletions

View File

@ -39,3 +39,11 @@ echo hello world | cut -d' ' -f 1
\draw (0,0) circle (1in);
\end{tikzpicture}
{{% /tikz %}}
### Spoilers
{{% spoiler "Don't open me" %}}
Test 2
Test 3
{{% /spoiler %}}

View File

@ -0,0 +1,5 @@
{{- $title := .Get "title" | default (.Get 0) -}}
<details>
<summary>{{ $title }}</summary>
<p>{{.Inner}}</p>
</details>