Skip to content

Commit c98ab3b

Browse files
authored
Add FA icons for dropdowns (#474)
1 parent eb9613a commit c98ab3b

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

layouts/shortcodes/dropdown.html

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@
1313

1414
{{< dropdown >}}
1515
title = 'With a title and icon'
16-
icon = 'unlock'
16+
icon = 'fa-solid fa-lock-open'
1717
body = 'And some content and an icon!'
1818
{{< /dropdown >}}
1919

2020
{{< dropdown >}}
2121
title = 'A primary color dropdown'
22-
icon = 'unlock'
22+
icon = 'fa-solid fa-lock-open'
2323
color = 'primary'
2424
body = 'And some content and an icon!'
2525
{{< /dropdown >}}
2626

2727
{{< dropdown >}}
2828
title = 'A secondary color dropdown'
29-
icon = 'unlock'
29+
icon = 'fa-solid fa-eye'
3030
color = 'secondary'
3131
body = 'And some content and an icon!'
3232
{{< /dropdown >}}
@@ -40,18 +40,14 @@
4040
{{- else }}
4141
<summary class="sd-summary-title sd-card-header">
4242
{{- end }}
43-
{{- with $data.icon }}
44-
<span class="sd-summary-icon"><svg version="1.1" width="1.0em" height="1.0em" class="sd-octicon sd-octicon-{{ . }}" viewBox="0 0 16 16" aria-hidden="true"><path fill-rule="evenodd" d="M5.5 4a2.5 2.5 0 014.607-1.346.75.75 0 101.264-.808A4 4 0 004 4v2h-.501A1.5 1.5 0 002 7.5v6A1.5 1.5 0 003.5 15h9a1.5 1.5 0 001.5-1.5v-6A1.5 1.5 0 0012.5 6h-7V4zm-.75 3.5H3.5v6h9v-6H4.75z"></path></svg></span>
45-
{{- end }}
46-
{{- with $data.title }}
47-
{{- . }}
48-
{{- else }}
49-
<svg version="1.1" width="1.5em" height="1.5em" class="sd-octicon sd-octicon-kebab-horizontal" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M6 12a2 2 0 11-4 0 2 2 0 014 0zm8 0a2 2 0 11-4 0 2 2 0 014 0zm6 2a2 2 0 100-4 2 2 0 000 4z"></path></svg>
50-
{{- end }}
51-
<div class="sd-summary-down">
52-
<svg version="1.1" width="1.5em" height="1.5em" class="sd-octicon sd-octicon-chevron-down" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M5.22 8.72a.75.75 0 000 1.06l6.25 6.25a.75.75 0 001.06 0l6.25-6.25a.75.75 0 00-1.06-1.06L12 14.44 6.28 8.72a.75.75 0 00-1.06 0z"></path></svg></div>
53-
<div class="sd-summary-up">
54-
<svg version="1.1" width="1.5em" height="1.5em" class="sd-octicon sd-octicon-chevron-up" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M18.78 15.28a.75.75 0 000-1.06l-6.25-6.25a.75.75 0 00-1.06 0l-6.25 6.25a.75.75 0 101.06 1.06L12 9.56l5.72 5.72a.75.75 0 001.06 0z"></path></svg></div>
43+
{{- with $data.icon }}
44+
<span class="sd-summary-icon"><i class="fa {{ . }}"></i></span>
45+
{{- end }}
46+
{{- with $data.title }}
47+
{{- . }}
48+
{{- else }}
49+
<i class="fas fa-ellipsis-h"></i>&nbsp;
50+
{{- end }}
5551
</summary>
5652
<div class="sd-summary-content sd-card-body">
5753
{{- with (trim $data.body "\n") }}

0 commit comments

Comments
 (0)