From 8ad0dd74495500cf2935600da5306e05a15f3721 Mon Sep 17 00:00:00 2001 From: Vitaly Potyarkin Date: Wed, 22 Jan 2020 13:56:29 +0300 Subject: [PATCH] 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 --- alchemy/templates/include/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alchemy/templates/include/header.html b/alchemy/templates/include/header.html index 517c0ff..791d28a 100644 --- a/alchemy/templates/include/header.html +++ b/alchemy/templates/include/header.html @@ -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}}