mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 14:15:47 +00:00
fix: CTA icon in Slider widget only works with fas icon pack (#1189)
This commit is contained in:
1 parent
263926cc45
commit
adfc2803be
1 file changed
+6
-2
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user