|
31 | 31 | body = 'And some content and an icon!' |
32 | 32 | {{< /dropdown >}} |
33 | 33 |
|
34 | | -{{< dropdown >}}</dropdown> |
35 | | -title = "A success color dropdown" |
36 | | -icon = "fa-solid fa-check" |
37 | | -color = "success" |
38 | | -body = "And some content and an icon!" |
| 34 | +{{< dropdown >}} |
| 35 | +title = 'A success color dropdown' |
| 36 | +icon = 'fa-solid fa-check' |
| 37 | +color = 'success' |
| 38 | +body = 'And some content and an icon!' |
39 | 39 | {{< /dropdown >}} |
40 | 40 |
|
41 | 41 | {{< dropdown >}} |
42 | | -title = "A dropdown inside a dropdown" |
43 | | -icon = "fa-solid fa-exclamation-triangle" |
44 | | -body=''' |
45 | | - Here is a dropdown again! |
46 | | -{{< dropdown >}} |
47 | | - title="A nested dropdown" |
48 | | - icon="fa-solid fa-bell" |
49 | | - body="And some content!" |
50 | | -{{< /dropdown >}} |
51 | | -''' |
| 42 | +title = 'Open dropdown by default' |
| 43 | +icon = 'fa-solid fa-eye' |
| 44 | +color = 'info' |
| 45 | +open = true |
| 46 | +body = 'This dropdown is open by default!' |
52 | 47 | {{< /dropdown >}} |
53 | 48 |
|
54 | | -{{< dropdown |
55 | | - title="Open dropdown by default" |
56 | | - icon="fa-solid fa-eye" |
57 | | - color="info" |
58 | | - open="true" |
59 | | - body="This dropdown is open by default!" |
60 | | ->}} |
61 | | - |
62 | 49 | {{< dropdown >}} |
63 | 50 | title = 'Fade in animation' |
64 | 51 | icon = 'fa-solid fa-magic' |
|
161 | 148 | {{- $summaryClasses = $summaryClasses | append (printf "sd-bg-%s" .) -}} |
162 | 149 | {{- $summaryClasses = $summaryClasses | append (printf "sd-bg-text-%s" .) -}} |
163 | 150 | {{- end -}} |
164 | | - |
| 151 | + |
165 | 152 | <summary class="{{ delimit $summaryClasses " " }}"> |
166 | 153 | {{- with $data.icon }} |
167 | 154 | <span class="sd-summary-icon"><i class="fa {{ . }}"></i></span> |
|
181 | 168 | {{- with (trim $data.body "\n") -}} |
182 | 169 | {{- . | markdownify -}} |
183 | 170 | {{- end -}} |
184 | | - |
185 | | - <summary class="{{ delimit $summaryClasses " " }}"> |
186 | | - {{- with $data.icon }} |
187 | | - <span class="sd-summary-icon"><i class="fa {{ . }}"></i></span> |
188 | | - {{- end }} |
189 | | - <span class="sd-summary-text"> |
190 | | - {{- with $data.title }} |
191 | | - {{- . }} |
192 | | - {{- else }} |
193 | | - <i class="fas fa-ellipsis-h no-title sd-octicon"></i> |
194 | | - {{- end }} |
195 | | - </span> |
196 | | - <span class="sd-summary-state-marker {{ $chevronClass }}"> |
197 | | - <i class="fas {{ $chevronIcon }}"></i> |
198 | | - </span> |
199 | | - </summary> |
200 | | - <div class="sd-summary-content sd-card-body docutils"> |
201 | | - {{- with (trim $data.body "\n") -}} |
202 | | - {{- . | markdownify -}} |
203 | | - {{- end -}} |
204 | | - </div> |
205 | | - </details> |
| 171 | + </div> |
| 172 | +</details> |
0 commit comments