From 637d4e585cc6557710e45bfa537ab3ecbdc0ef2b Mon Sep 17 00:00:00 2001 From: Gu1llaum-3 Date: Tue, 3 Jan 2023 23:33:04 +0100 Subject: [PATCH] Plusieurs modifications au niveau des pages et du bouton pour raffraichir --- app.py | 5 +++++ static/css/style.css | 2 +- templates/404.html | 15 +++++++++++++++ templates/erreur.html | 4 ++-- templates/index.html | 6 ++++-- 5 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 templates/404.html diff --git a/app.py b/app.py index fb44ab7..68c0906 100644 --- a/app.py +++ b/app.py @@ -54,10 +54,15 @@ def download_file(): return render_template('erreur.html') urls = [url1, url2, url3, url4, url5] + process_file(urls) PATH = "downloads/musics.zip" return send_file(PATH, as_attachment=True) +@app.errorhandler(404) +def page_not_found(error): + return render_template('404.html'), 404 + if __name__ == '__main__': app.run(debug=True, port=3000) \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css index cb9f837..03368ad 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -74,7 +74,7 @@ body { color: whitesmoke } - .title { + h1 { color: rgb(24,216,96); } diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..8382b12 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,15 @@ + + + + SpotDL Web + + + +
+

Error 404

+

Il semble que vous soyez perdu. Revenez à la page d'accueil

+ +
+ + + diff --git a/templates/erreur.html b/templates/erreur.html index e531188..fee662d 100644 --- a/templates/erreur.html +++ b/templates/erreur.html @@ -5,10 +5,10 @@ -
+

SpotDL Web

Veuillez entrer au moins une URL !

- + {% if message %}

{{ message }}

diff --git a/templates/index.html b/templates/index.html index cf6354c..2608de8 100644 --- a/templates/index.html +++ b/templates/index.html @@ -27,10 +27,12 @@
+ - - + +
+