aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes/disclose.html
blob: 5422366a791ddd2903390cc8ab5b1de1169ee14c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{{- $text := default "Content Warning: " (.Get "text" | default (.Get 0)) -}}

{{- if gt (len .Inner) 1 -}}
  {{- $text = .Inner -}}
{{- end -}}

<details data-disclosure="">
  <summary>
    {{- (or $.Page.Params.title $text) | markdownify }}
  </summary>
</details>
{{- /* This comment removes trailing newlines and white spaces. */ -}}