diff --git a/server.py b/server.py index 575c0c4..2ea798a 100644 --- a/server.py +++ b/server.py @@ -101,8 +101,6 @@ def send_report(path): ): if os.path.isfile("templates/assets/img/" + filename): return send_from_directory("templates/assets/img", filename) - if os.path.isfile("templates/assets/img/favicon/" + filename): - return send_from_directory("templates/assets/img/favicon", filename) return render_template("404.html"), 404 @@ -870,6 +868,14 @@ def index(): ) +@app.route("/manifest.json") +def manifest(): + with open("templates/manifest.json", "r") as file: + manifest = json.load(file) + manifest["start_url"] = request.url_root + return jsonify(manifest) + + @app.route("/") def catch_all(path: str): if os.path.isfile("templates/" + path): diff --git a/templates/assets/img/favicon.png b/templates/assets/img/favicon.png index 88ddd85..dd8950d 100644 Binary files a/templates/assets/img/favicon.png and b/templates/assets/img/favicon.png differ diff --git a/templates/index.html b/templates/index.html index 0a1aadc..68e7bda 100644 --- a/templates/index.html +++ b/templates/index.html @@ -34,6 +34,7 @@ + diff --git a/templates/manifest.json b/templates/manifest.json new file mode 100644 index 0000000..dfe2b6e --- /dev/null +++ b/templates/manifest.json @@ -0,0 +1,15 @@ +{ + "name": "HNSDoH Status", + "short_name": "HNSDoH Status", + "start_url": "https://{{host}}/", + "display": "standalone", + "background_color": "#212529", + "theme_color": "#212529", + "orientation": "portrait-primary", + "icons": [ + { + "src": "/favicon.png", + "sizes": "500x500" + } + ] + } \ No newline at end of file