diff --git a/backend/app/main.py b/backend/app/main.py index 863a0d7..a7f2d4f 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -1,4 +1,4 @@ -from flask import Flask, render_template, Response, abort, request, redirect +from flask import Flask, render_template, Response, abort, request, redirect, send_from_directory import helpers import database import data_adapters @@ -20,6 +20,12 @@ def home(): return render_template('main.html', list=database.get_list(), auth=basic_auth.authenticate()) +@app.route("/favicon.ico") +def favicon(): + return send_from_directory(os.path.join(app.root_path, 'static'), + 'favicon.ico', mimetype='image/vnd.microsoft.icon') + + @app.route('/api/enqueue', methods=['POST']) def enqueue(): if not request.json: @@ -209,6 +215,17 @@ def activate_job(): database.create_done_song_view() helpers.setup_config(app) + + +@app.after_request +def add_header(response): + """ + Add headers to both force latest IE rendering engine or Chrome Frame, + and also to cache the rendered page for 10 minutes. + """ + response.headers['Cache-Control'] = 'private, max-age=600' + return response + @app.context_processor def inject_version(): return dict(karaoqueue_version=app.config['VERSION']) diff --git a/backend/app/static/favicon.ico b/backend/app/static/favicon.ico new file mode 100644 index 0000000..840908c Binary files /dev/null and b/backend/app/static/favicon.ico differ diff --git a/backend/app/static/images/touch/homescreen512.png b/backend/app/static/images/touch/homescreen512.png new file mode 100644 index 0000000..89084c4 Binary files /dev/null and b/backend/app/static/images/touch/homescreen512.png differ diff --git a/backend/app/static/manifest.webmanifest b/backend/app/static/manifest.webmanifest index 7d9a6d2..d57b9d8 100644 --- a/backend/app/static/manifest.webmanifest +++ b/backend/app/static/manifest.webmanifest @@ -6,8 +6,8 @@ "background_color": "#343a40", "description": "Eine Karaokewarteliste.", "icons": [{ - "src": "images/touch/homescreen192.png", - "sizes": "192x192", + "src": "images/touch/homescreen512.png", + "sizes": "512x512", "type": "image/png" }], "related_applications": [{ diff --git a/backend/app/templates/base.html b/backend/app/templates/base.html index a2b5ff5..f243850 100644 --- a/backend/app/templates/base.html +++ b/backend/app/templates/base.html @@ -75,7 +75,7 @@ {% endif %} - KaraoQueue {{karaoqueue_version}} - © 2019-2021 - Phillip + KaraoQueue {{karaoqueue_version}} - © 2019-21 - Phillip Kühne