Allow specifying custom width for logo (#6739)

This commit is contained in:
Beto Dealmeida 2019-01-22 14:25:49 -08:00 committed by GitHub
parent d65059b06a
commit cf1a35b94b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -110,6 +110,7 @@ APP_NAME = 'Superset'
# Uncomment to setup an App icon
APP_ICON = '/static/assets/images/superset-logo@2x.png'
APP_ICON_WIDTH = 126
# Druid query timezone
# tz.tzutc() : Using utc timezone

View File

@ -19,6 +19,7 @@
{% set menu = appbuilder.menu %}
{% set languages = appbuilder.languages %}
{% set WARNING_MSG = appbuilder.app.config.get('WARNING_MSG') %}
{% set app_icon_width = appbuilder.app.config.get('APP_ICON_WIDTH', 126) %}
<div class="navbar navbar-static-top {{menu.extra_classes}}" role="navigation">
<div class="container-fluid">
@ -30,7 +31,7 @@
</button>
<a class="navbar-brand" href="/superset/profile/{{ current_user.username }}/">
<img
width="126"
width="{{ app_icon_width }}"
src="{{ appbuilder.app_icon }}"
alt="{{ appbuilder.app_name }}"
/>