fix: CTA icon in Slider widget only works with fas icon pack (#1189)

This commit is contained in:
Joel Scheuner authored and George committed 2019-07-07 20:13:45 +01:00
1 parent 263926cc45
commit adfc2803be
1 file changed
+6 -2
+6 -2
View File
@@ -34,10 +34,14 @@
{{ end }}
{{ if $item.cta_url }}
{{ $pack := or .icon_pack "fa" }}
{{ $pack := or .cta_icon_pack "fas" }}
{{ $pack_prefix := $pack }}
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
{{ $pack_prefix = "fa" }}
{{ end }}
<p>
<a href="{{ $item.cta_url }}" class="btn btn-light btn-lg">
{{- with $item.cta_icon -}}<i class="{{ $pack }} {{ $pack }}-{{ . }}" style="padding-right: 10px;"></i>{{- end -}}
{{- with $item.cta_icon -}}<i class="{{ $pack }} {{ $pack_prefix }}-{{ . }}" style="padding-right: 10px;"></i>{{- end -}}
{{- $item.cta_label | emojify | safeHTML -}}
</a>
</p>