Skip to content

Commit 4545c09

Browse files
adon-cloudcannonAdon Moskal
and
Adon Moskal
authored
Feat: added icon prefix option to disclosure shortcode (#62)
Co-authored-by: Adon Moskal <[email protected]>
1 parent 855828f commit 4545c09

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

layouts/shortcodes/details-disclosure.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{{ $summary := .Get "summary"}}
22
{{ $initial_state := .Get "initial_state"}}
3+
{{ $icon := .Get "icon"}}
34

45
<details {{ $initial_state }}>
5-
<summary>{{ $summary }}</summary>
6+
<summary>{{ if .Get "icon_prefix" }}<i class="{{ $icon }}"></i>&nbsp;{{ end }}{{ $summary }}</summary>
67

78
{{ .Inner | markdownify }}
89

0 commit comments

Comments
 (0)