fix favicon changes
This commit is contained in:
@@ -52,8 +52,12 @@ def create_app():
|
||||
return app.config["SYSTEM_NAME"]
|
||||
def get_pages_name():
|
||||
return app.config["PAGES_NAME"]
|
||||
def check_favicon():
|
||||
if os.path.isfile(os.path.join(app.config["STATIC_FOLDER"], "favicon.ico")):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
return dict(get_themes=get_themes, server_time=w_server_time, get_datetime_str=w_get_datetime_str, get_member=get_member, remove_html=remove_html, get_pages=get_pages, get_system_name=get_system_name, get_pages_name=get_pages_name)
|
||||
return dict(get_themes=get_themes, server_time=w_server_time, get_datetime_str=w_get_datetime_str, get_member=get_member, remove_html=remove_html, get_pages=get_pages, get_system_name=get_system_name, get_pages_name=get_pages_name, check_favicon=check_favicon)
|
||||
|
||||
return app
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>{% block title %}{% endblock %} - {{ get_system_name() }}</title>
|
||||
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='default.ico') }}">
|
||||
|
||||
{% if check_favicon() %}
|
||||
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||
{% else %}
|
||||
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='default.ico') }}">
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
|
||||
{% set themes = get_themes() %}
|
||||
|
||||
Reference in New Issue
Block a user