From f3aa21f816028aa1d641c2acb21f53585761a40e Mon Sep 17 00:00:00 2001 From: "theo@manjaro" Date: Thu, 2 Dec 2021 19:41:51 +0100 Subject: [PATCH] Base css --- app.py | 5 ++++- pages.py | 5 ++++- static/style.css | 13 +++++++++++++ templates/main.html | 12 ++++++++++-- 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 static/style.css diff --git a/app.py b/app.py index 29c0713..bf5dc42 100644 --- a/app.py +++ b/app.py @@ -1,5 +1,5 @@ # Fichier principal -from flask import Flask, escape, request +from flask import Flask, escape, request, url_for import pages app = Flask(__name__) @@ -7,3 +7,6 @@ app = Flask(__name__) @app.route('/') def main(): return pages.main() + +if __name__=="__main__": + app.run(debug=True) diff --git a/pages.py b/pages.py index 767097e..35b94b5 100644 --- a/pages.py +++ b/pages.py @@ -1,4 +1,7 @@ +from flask import render_template import definitions as lib +# Fonctions qui seront associées à des URLs + def main(): - return lib.read("templates/main.html") + return render_template("main.html") diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..0a9cefb --- /dev/null +++ b/static/style.css @@ -0,0 +1,13 @@ +body { + background-color: lightblue; +} + +h1 { + color: white; + text-align: center; +} + +p { + font-family: verdana; + font-size: 20px; +} diff --git a/templates/main.html b/templates/main.html index 9188e32..888c9fb 100644 --- a/templates/main.html +++ b/templates/main.html @@ -1,3 +1,11 @@ -

Bienvenue !

+ + + + + + +

Bienvenue !

+

Ceci est la page d'accueil !

+ + -

Ceci est la page d'accueil !