1
0
Fork 0

Use less fragile detection of FontAwesome classes

List of all possible styles:
https://fontawesome.com/how-to-use/on-the-web/referencing-icons/basic-use
This commit is contained in:
Vitaly Potyarkin 2020-01-22 13:56:29 +03:00
commit 8ad0dd7449

View file

@ -5,7 +5,7 @@
} -%} } -%}
{%- if icon in fa_special_icons -%} {%- if icon in fa_special_icons -%}
{{ fa_special_icons[icon] }} {{ fa_special_icons[icon] }}
{%- elif icon.startswith("fa") -%} {%- elif icon.split()|select("in", ["fab", "fas", "far", "fal", "fad"])|list -%}
{{ icon }} {{ icon }}
{%- else -%} {%- else -%}
fab fa-{{icon}} fab fa-{{icon}}