This commit is contained in:
theo@manjaro 2021-12-02 19:41:51 +01:00
parent acc8088aa3
commit f3aa21f816
4 changed files with 31 additions and 4 deletions

5
app.py
View File

@ -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)

View File

@ -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")

13
static/style.css Normal file
View File

@ -0,0 +1,13 @@
body {
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
p {
font-family: verdana;
font-size: 20px;
}

View File

@ -1,3 +1,11 @@
<h1>Bienvenue !</h1>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" src="static/style.css">
</head>
<body>
<h1>Bienvenue !</h1>
<p>Ceci est la page d'accueil !</p>
</body>
</html>
<p>Ceci est la page d'accueil !</p>