Skip to content

Commit

Permalink
Add custom favicon on admin (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
danimarinBG authored Feb 7, 2024
1 parent a19f50f commit 095f6d1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions schemas/qwc-admin-gui.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
"description": "Max number of retries for checks during Solr index update",
"type": "integer"
},
"favicon":{
"description": "URL to favicon",
"type": "string"
},
"plugins": {
"description": "List of plugins to load",
"type": "array",
Expand Down
2 changes: 2 additions & 0 deletions src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def home():
config = handler().config()
admin_gui_title = config.get('admin_gui_title', i18n('interface.main.title'))
admin_gui_subtitle = config.get('admin_gui_subtitle', i18n('interface.main.subtitle'))
favicon = config.get('favicon')
have_config_generator = True if config.get(
"config_generator_service_url",
"http://qwc-config-service:9090"
Expand All @@ -191,6 +192,7 @@ def home():
'templates/home.html',
admin_gui_title=admin_gui_title,
admin_gui_subtitle=admin_gui_subtitle,
favicon=favicon,
have_config_generator=have_config_generator,
solr_index_update_enabled=solr_index_update_enabled, i18n=i18n
)
Expand Down
5 changes: 5 additions & 0 deletions src/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

{% if favicon %}
<link rel="icon" href="{{favicon}}">
{% endif %}


<!-- Styles -->
{{ bootstrap.load_css() }}
<link href="{{ url_for('static', filename='css/application.css') }}" rel="stylesheet">
Expand Down

0 comments on commit 095f6d1

Please sign in to comment.