Merge branch 'master' of https://forge.chapril.org/CretinsMotorisesIngenieux/Marin
This commit is contained in:
commit
3513a02f52
7
app.py
7
app.py
@ -25,6 +25,13 @@ def sauveteur(idsauveteur):
|
||||
def bateau(idbateau):
|
||||
return pages.bateau(idbateau)
|
||||
|
||||
@app.route('/modifications')
|
||||
@app.route('/modifications/')
|
||||
@app.route('/modification')
|
||||
@app.route('/modification/')
|
||||
def modifs():
|
||||
return pages.modifs()
|
||||
|
||||
@app.route('/expeditions/<int:idexpe>')
|
||||
@app.route('/expedition/<int:idexpe>')
|
||||
def expe(idexpe):
|
||||
|
17
pages.py
17
pages.py
@ -10,6 +10,9 @@ dbname = "site.db"
|
||||
def main():
|
||||
return render_template("index.html")
|
||||
|
||||
def modifs():
|
||||
return render_template("modification.html")
|
||||
|
||||
def error():
|
||||
return render_template("error.html")
|
||||
|
||||
@ -17,20 +20,18 @@ def bateau(idbateau):
|
||||
dico = {}
|
||||
dico["NomBateau"] = "Le Bateau"
|
||||
dico["nom"] = "Le constructeur"
|
||||
dico["Dimensions"] = 666
|
||||
dico["DateInstallation"] = "Aujourd'hui"
|
||||
dico["DateCondamnation"] = "Demain"
|
||||
dico["ville"] = "ici"
|
||||
dico["date_naissance"] = "Aujourd'hui"
|
||||
dico["date_mort"] = "Demain"
|
||||
dico["HistoireBateau"] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam at odio cursus, rutrum odio non, dignissim risus. Pellentesque non varius ante. Vivamus scelerisque pulvinar mauris, nec imperdiet ante mattis et."
|
||||
result = lib.ex_sql(dbname,"SELECT * FROM bateau WHERE ship_id=?",(idbateau,))
|
||||
if len(result)>=1:
|
||||
result = result[0]
|
||||
dico["nom"] = result["nom"]
|
||||
print(result)
|
||||
dico["Dimensions"] = result["dimension"]
|
||||
dico["DateInstallation"] = result["date_naissance"]
|
||||
dico["DateCondamnation"] = result["date_mort"]
|
||||
return render_template("sauveteur.html",**dico)
|
||||
dico["date_naissance"] = result["date_naissance"]
|
||||
dico["date_mort"] = result["date_mort"]
|
||||
dico["Histoire"] = result["histoire"]
|
||||
return render_template("bateau.html",**dico)
|
||||
else:
|
||||
return error()
|
||||
|
||||
|
@ -20,6 +20,10 @@ table, tr, td {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.form-pad {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
#banner {
|
||||
background-color: #dfcba8;
|
||||
margin-left: calc(-50vw + 50%);
|
||||
@ -41,8 +45,11 @@ table, tr, td {
|
||||
}
|
||||
|
||||
#logo_title {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
#searchresults {
|
||||
|
@ -1,5 +1,5 @@
|
||||
body {
|
||||
background: black;
|
||||
background: #313131;
|
||||
font-family: arial;
|
||||
color: white;
|
||||
}
|
||||
@ -22,8 +22,12 @@ table, tr, td {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.form-pad {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
#banner {
|
||||
background-color: #a36f13;
|
||||
background-color: #9C7228;
|
||||
margin-left: calc(-50vw + 50%);
|
||||
margin-right: calc(-50vw + 50%);
|
||||
margin-top: calc(-50vw + 50%);
|
||||
@ -34,7 +38,7 @@ table, tr, td {
|
||||
}
|
||||
|
||||
#banner_index {
|
||||
background-color: #a36f13;
|
||||
background-color: #9C7228;
|
||||
margin-left: calc(-50vw + 50%);
|
||||
margin-right: calc(-50vw + 50%);
|
||||
margin-top: calc(-50vw + 50%);
|
||||
@ -43,8 +47,15 @@ table, tr, td {
|
||||
}
|
||||
|
||||
#logo_title {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#searchresults {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.searchbar {
|
||||
@ -55,3 +66,11 @@ table, tr, td {
|
||||
.right-align {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #8F9BFF;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #9BA6FF;
|
||||
}
|
||||
|
26
templates/bateau.html
Normal file
26
templates/bateau.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>{{nom}} {{prenom}} - Sauveteurs du Dunkerquois</title>
|
||||
{% include 'head.html' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include "smallheader.html" %}
|
||||
<h1>{{nom}} - Un navire</h1>
|
||||
<div class="flexbox">
|
||||
<p>{{Histoire}}</p>
|
||||
<p class="right-align">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="table_key">Nom</td><td>{{nom}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="table_key">Mise à flot</td><td>{{date_naissance}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="table_key">Mise en arrêt</td><td>{{date_mort}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,16 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>404 Not Found - Sauveuteurs du dunkerquois</title>
|
||||
<link href="../static/style.css" rel="stylesheet" type="text/css" />
|
||||
<link rel="icon" type="image/png" href="../static/favicon.png" />
|
||||
{% include 'head.html' %}
|
||||
</head>
|
||||
<body>
|
||||
<header id="banner">
|
||||
<img src="../static/icon.png" width="150" height="75">
|
||||
<span id="logo_title">Sauveuteurs du dunkerquois</span>
|
||||
</header>
|
||||
{% include 'smallheader.html' %}
|
||||
<h1>Page introuvable !</h1>
|
||||
<p>Retour à <a href="/home">la page d'accueil</a>.</p>
|
||||
</body>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<<<<<<< HEAD
|
||||
<!--- Variables
|
||||
nom
|
||||
prenom
|
||||
@ -7,11 +8,14 @@ place
|
||||
histoire
|
||||
!-->
|
||||
<!-- saved from url=(0055)file:///C:/Users/rugja/Marin/templates/bateau_temp.html -->
|
||||
=======
|
||||
>>>>>>> f53b67000eac017030794619a1ccd0eaa7ad151e
|
||||
<html><head>
|
||||
<title>{{nom}}- Sauveteurs du dunkerquois</title>
|
||||
{% include 'head.html' %}
|
||||
</head>
|
||||
<body>
|
||||
<<<<<<< HEAD
|
||||
{% include "smallheader.html" %}
|
||||
<h1>{{nom}}</h1>
|
||||
<div class="flexbox">
|
||||
@ -27,4 +31,10 @@ histoire
|
||||
<td>{{date}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody></table>
|
||||
</tbody></table>
|
||||
=======
|
||||
{% include "smallheader.html" %}
|
||||
<h1>{{siecle}}</h1>
|
||||
</body>
|
||||
</html>
|
||||
>>>>>>> f53b67000eac017030794619a1ccd0eaa7ad151e
|
||||
|
@ -1,3 +1,3 @@
|
||||
<meta charset="utf-8">
|
||||
<link href="../static/style.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../static/style_dark.css" rel="stylesheet" type="text/css" />
|
||||
<link rel="icon" type="image/png" href="../static/favicon.png" />
|
||||
|
@ -1,7 +1,8 @@
|
||||
<center>
|
||||
<header id="banner_index">
|
||||
<img src="../static/icon.png" width="250" height="125">
|
||||
<h1>Sauveteurs du Dunkerquois</h1>
|
||||
<br>
|
||||
<div id="logo_title">Sauveteurs du Dunkerquois</div>
|
||||
</header>
|
||||
<br>
|
||||
<form action="/search" method="post">
|
||||
|
18
templates/modification.html
Normal file
18
templates/modification.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>{{nom}} {{prenom}} - Sauveuteurs du dunkerquois</title>
|
||||
{% include 'head.html' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include "smallheader.html" %}
|
||||
<h1>Proposer une modification :</h1>
|
||||
<form class="form-pad" method="post">
|
||||
Votre nom (facultatif) : <input type="text" name="nom" placeholder="Votre nom"><br><br>
|
||||
Votre prénom (facultatif) : <input type="text" name="prenom" placeholder="Votre prénom (facultatif)"><br><br>
|
||||
Votre adresse e-mail (facultatif) : <input type="email" name="email" placeholder="Votre adresse e-mail (facultatif)"><br><br>
|
||||
Nom de l'article à modifier : <input type="text" name="article" placeholder="Nom de l'article à modifier" required><br><br>
|
||||
Modification suggérée :<br><textarea name="modif" placeholder="Modification suggérée" required></textarea><br><br>
|
||||
<input type="submit" value="Envoyer">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -1,12 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!--- Variables
|
||||
nom
|
||||
prenom
|
||||
date
|
||||
place
|
||||
histoire
|
||||
!-->
|
||||
<!-- saved from url=(0055)file:///C:/Users/rugja/Marin/templates/bateau_temp.html -->
|
||||
<html><head>
|
||||
<title>{{nom}}{{prenom}}- Sauveuteurs du dunkerquois</title>
|
||||
{% include 'head.html' %}
|
||||
@ -35,7 +27,5 @@ histoire
|
||||
<td>{{place}}</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,15 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!--- Variables
|
||||
nom
|
||||
prenom
|
||||
date_naissance
|
||||
date_deces
|
||||
nb_sauvetages
|
||||
nb_sauves
|
||||
gratifications
|
||||
description
|
||||
!-->
|
||||
|
||||
<head>
|
||||
<title>{{nom}} {{prenom}} - Sauveuteurs du dunkerquois</title>
|
||||
{% include 'head.html' %}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>Recherche - Sauveuteurs du dunkerquois</title>
|
||||
<title>Recherche - Sauveteurs du Dunkerquois</title>
|
||||
{% include 'head.html' %}
|
||||
</head>
|
||||
<body>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<span id="logo_title">Sauveteurs du Dunkerquois</span>
|
||||
</header></a>
|
||||
<br>
|
||||
<a href="https://www.google.com/">Proposer une modification</a>
|
||||
<a href="/modification">Proposer une modification</a>
|
||||
<form action="/search" class="searchbar" method="post">
|
||||
<input type="text" name="search" value="" placeholder="Rechercher des sauveteurs, des bateaux, des expéditions..." size="40" required>
|
||||
<input type="submit" value="Rechercher">
|
||||
|
@ -1,17 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<!--- Variables
|
||||
nom
|
||||
date
|
||||
evenement
|
||||
!-->
|
||||
<!-- saved from url=(0055)file:///C:/Users/rugja/Marin/templates/bateau_temp.html -->
|
||||
<html><head>
|
||||
<title>{{nom}} - Sauveuteurs du dunkerquois</title>
|
||||
{% include 'head.html' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include "smallheader.html" %}
|
||||
<h1>{{nom}}</h1>
|
||||
<h1>{{nom}}</h1>
|
||||
<div class="flexbox">
|
||||
<table>
|
||||
<tbody><tr>
|
||||
@ -22,7 +16,7 @@ evenement
|
||||
<td class="table_key">Date</td>
|
||||
<td>{{Annee}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<script> {% for i in range(Evenement) %}
|
||||
{{ i }}
|
||||
{% endfor %}
|
||||
@ -30,5 +24,7 @@ evenement
|
||||
<td>{{Evenement}}</td>
|
||||
<td>{{Evenement}}</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</body></html>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user