You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2022/09/20 20:50:36 UTC

[superset] 26/29: fix: set correct favicon from config for login and FAB list views (#21498)

This is an automated email from the ASF dual-hosted git repository.

elizabeth pushed a commit to branch 2.0-test
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 0da708e3593f4dc3c802411e0a35fce8fd2baaee
Author: Mayur <ma...@gmail.com>
AuthorDate: Mon Sep 19 12:54:01 2022 +0530

    fix: set correct favicon from config for login and FAB list views (#21498)
    
    (cherry picked from commit b29e7e7d9e6f4c1f429eb1220f03640596579e9f)
---
 superset/templates/superset/base.html | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/superset/templates/superset/base.html b/superset/templates/superset/base.html
index e3c3d35dfe..b226d3aedd 100644
--- a/superset/templates/superset/base.html
+++ b/superset/templates/superset/base.html
@@ -21,7 +21,15 @@
 
 {% block head_css %}
   {{ super() }}
-  <link rel="icon" type="image/png" href="{{ assets_prefix }}/static/assets/images/favicon.png">
+  {% set favicons = appbuilder.app.config['FAVICONS'] %}
+  {% for favicon in favicons %}
+    <link
+      rel="{{favicon.rel if favicon.rel else "icon"}}"
+      type="{{favicon.type if favicon.type else "image/png"}}"
+      {% if favicon.sizes %}sizes={{favicon.sizes}}{% endif %}
+      href="{{ "" if favicon.href.startswith("http") else assets_prefix }}{{favicon.href}}"
+    >
+  {% endfor %}
   {{ css_bundle("theme") }}
 {% endblock %}