This commit is contained in:
theo@manjaro 2021-12-03 03:53:11 +01:00
commit fa6dd6f351
9 changed files with 126 additions and 65 deletions

5
app.py
View File

@ -25,6 +25,11 @@ def sauveteur(idsauveteur):
def bateau(idbateau):
return pages.bateau(idbateau)
@app.route('/expeditions/<int:idexpe>')
@app.route('/expedition/<int:idexpe>')
def expe(idexpe):
return pages.expeditions(idexpe)
@app.errorhandler(404)
def error(e):
return pages.error()

View File

@ -30,6 +30,18 @@ def bateau(idbateau):
dico["DateInstallation"] = result["date_naissance"]
dico["DateCondamnation"] = result["date_mort"]
return render_template("sauveteur.html",**dico)
else:
return error()
def expeditions(idexpedition):
dico = {}
result = lib.ex_sql(dbname,"SELECT * FROM expedition WHERE expedition_id=?",(idexpedition,))
if len(result) >= 1:
result = result[0]
dico["evenement"] = result["nom"]
dico["Date"] = result["date"]
print("dico")
return render_template("expedition.html",**dico)
else:
return error()

View File

@ -45,6 +45,10 @@ table, tr, td {
font-size: 30px;
}
#searchresults {
width: 75%;
}
.searchbar {
float: right;
padding-right: 20px;

View File

@ -9,41 +9,54 @@ origine
histoire
!-->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{{nom}}</title>
<link href="/static/style.css" rel="stylesheet" type="text/css">
<link rel="icon" type="image/png" href="../static/favicon.png" />
<title>{{nom}} - Sauveuteurs du dunkerquois</title>
<link href="../static/style.css" rel="stylesheet" type="text/css">
<link href="file:///C:/Users/rugja/Marin/templates/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<header id="banner">
<img src="../static/icon.png" width="150" height="75">
<span id="logo_title">Sauveuteurs du dunkerquois</span>
</header>
<br>
<a href="https://www.google.com/">Proposer une modification</a>
<form class="searchbar" method=get>
<input type="text" placeholder="Saisissez votre recherche..." size=20>
<input type="submit" value="Rechercher">
</form>
<h1>{{nom}}}</h1>
<div class="flexbox">
<p>{{HistoireBateau}}</p>
<p class="right-align">
<table>
<tbody><tr>
<td>Nom</td>
<td class="table_key">Nom</td>
<td>{{NomBateau}}</td>
</tr>
<tr>
<td>Constructeur</td>
<td class="table_key">Constructeur</td>
<td>{{nom}}</td>
</tr>
<tr>
<td>Dimensions</td>
<td class="table_key">Dimensions</td>
<td>{{Dimensions}}</td>
</tr>
<tr>
<td>Installation</td>
<td>{{DateInstallation}}</td>
<td class="table_key">Installation</td>
<td>{{Date1}}</td>
</tr>
<tr>
<td>Condamnation</td>
<td>{{DateCondamnation}}</td>
<td class="table_key">Condamnation</td>
<td>{{Date2}}</td>
</tr>
<tr>
<th>Origine</th>
<th>{{ville}}</th>
<td class="table_key">Origine</td>
<td>{{ville}}</td>
</tr>
</tbody></table>
<p>
{{HistoireBateau}}
</p>
</body></html>

View File

@ -6,19 +6,29 @@ evenement
<!-- saved from url=(0055)file:///C:/Users/rugja/Marin/templates/bateau_temp.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{{siecle}}</title>
<title>{{siecle}}- Sauveuteurs du dunkerquois</title>
<link href="../static/style.css" rel="stylesheet" type="text/css">
<link rel="icon" type="image/png" href="../static/favicon.png" />
</head>
<body>
<header id="banner">
<img src="../static/icon.png" width="150" height="75">
<span id="logo_title">Sauveuteurs du dunkerquois</span>
</header>
<br>
<a href="https://www.google.com/">Proposer une modification</a>
<form class="searchbar" method=get>
<input type="text" placeholder="Saisissez votre recherche..." size=20>
<input type="submit" value="Rechercher">
</form>
<h1>{{siecle}}</h1>
<div class="flexbox">
<table>
<tbody><tr>
<script> {% for i in range(Date) %}
{{ i }}
{% endfor %}
</script>
<td>Date</td>
<td class="table_key">Date</td>
<td>{{Annee}}</td>
</tr>
<tr>
@ -30,4 +40,4 @@ evenement
<td>{{Evenement}}</td>
</tr>
</tbody></table>
</body></html>
</body></html>

View File

@ -9,33 +9,43 @@ histoire
<!-- saved from url=(0055)file:///C:/Users/rugja/Marin/templates/bateau_temp.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{{nom}}{{prenom}}</title>
<title>{{nom}}{{prenom}}- Sauveuteurs du dunkerquois</title>
<link href="../static/style.css" rel="stylesheet" type="text/css">
<link rel="icon" type="image/png" href="../static/favicon.png" />
</head>
<body>
<header id="banner">
<img src="../static/icon.png" width="150" height="75">
<span id="logo_title">Sauveuteurs du dunkerquois</span>
</header>
<br>
<a href="https://www.google.com/">Proposer une modification</a>
<form class="searchbar" method=get>
<input type="text" placeholder="Saisissez votre recherche..." size=20>
<input type="submit" value="Rechercher">
</form>
<h1>{{nom}}}{{prenom}}</h1>
<div class="flexbox">
<p>{{histoire}}</p>
<p class="right-align">
<table>
<tbody><tr>
<td>Nom</td>
<td class="table_key">Nom</td>
<td>{{nom}}</td>
</tr>
<tr>
<td>Prenom</td>
<td class="table_key">Prenom</td>
<td>{{prenom}}</td>
</tr>
<tr>
<td>Date</td>
<td class="table_key">Date</td>
<td>{{date}}</td>
</tr>
<tr>
<td>Place</td>
<td class="table_key">Place</td>
<td>{{place}}</td>
</tr>
</tbody></table>
<p>
{{Histoire}}
</p>
</body></html>
</body></html>

View File

@ -1,23 +0,0 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>{{nom}} {{prenom}} - Sauveuteurs du dunkerquois</title>
<link href="../static/style.css" rel="stylesheet" type="text/css" />
<link rel="icon" type="image/png" href="../static/favicon.png" />
</head>
<body>
<header id="banner">
<img src="../static/icon.png" width="150" height="75">
<span id="logo_title">Sauveuteurs du dunkerquois</span>
</header>
<br>
<form class="searchbar" method=get>
<input type="text" placeholder="Saisissez votre recherche..." size=20>
<input type="submit" value="Rechercher">
</form>
<script> {% for key, value in dres %}
{{<a href=}value{>}key{</a>}}
{% endfor %}
</script>
</body>
</html>

View File

@ -1,9 +1,29 @@
<ul>
{% for result in liste %}
<li><a href="{{result.lien}}">{{result.nom}}</a></li>
{% endfor %}
</ul>
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>{{nom}} {{prenom}} - Sauveuteurs du dunkerquois</title>
<link href="../static/style.css" rel="stylesheet" type="text/css" />
<link rel="icon" type="image/png" href="../static/favicon.png" />
</head>
<body>
<header id="banner">
<img src="../static/icon.png" width="150" height="75">
<span id="logo_title">Sauveuteurs du dunkerquois</span>
</header>
<br>
<form class="searchbar" method=get>
<input type="text" placeholder="Saisissez votre recherche..." size=20>
<input type="submit" value="Rechercher">
</form>
<h1>Résultats de la recherche :</h1>
<center>
<table id="searchresults">
{% for result in liste %}
<tr>
<td><a href="{{result.lien}}">{{result.nom}}</a></td>
</tr>
{% endfor %}
</table>
</center>
</body>
</html>

View File

@ -7,19 +7,29 @@ evenement
<!-- saved from url=(0055)file:///C:/Users/rugja/Marin/templates/bateau_temp.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{{nom}}</title>
<title>{{nom}} - Sauveuteurs du dunkerquois</title>
<link href="../static/style.css" rel="stylesheet" type="text/css">
<link rel="icon" type="image/png" href="../static/favicon.png" />
</head>
<body>
<header id="banner">
<img src="../static/icon.png" width="150" height="75">
<span id="logo_title">Sauveuteurs du dunkerquois</span>
</header>
<br>
<a href="https://www.google.com/">Proposer une modification</a>
<form class="searchbar" method=get>
<input type="text" placeholder="Saisissez votre recherche..." size=20>
<input type="submit" value="Rechercher">
</form>
<h1>{{nom}}</h1>
<div class="flexbox">
<table>
<tbody><tr>
<script> {% for i in range(Date) %}
{{ i }}
{% endfor %}
</script>
<td>Date</td>
<td class="table_key">Date</td>
<td>{{Annee}}</td>
</tr>
<tr>
@ -31,4 +41,4 @@ evenement
<td>{{Evenement}}</td>
</tr>
</tbody></table>
</body></html>
</body></html>