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
main
Vitaly Potyarkin 2020-01-22 13:56:29 +03:00
parent 1b930951e7
commit 8ad0dd7449
1 changed files with 1 additions and 1 deletions

View File

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