Nouvelle version du dimanche
This commit is contained in:
3
app.py
3
app.py
@@ -7,7 +7,8 @@ app = Flask(__name__) # crée l'application Flask
|
|||||||
|
|
||||||
@app.route("/") # URL racine : http://localhost:5000/
|
@app.route("/") # URL racine : http://localhost:5000/
|
||||||
def index():
|
def index():
|
||||||
return render_template("index.html", Identifiant="Alban")
|
return render_template("user_search.html", display= "none")
|
||||||
|
#return render_template("index.html", Identifiant="Alban")
|
||||||
|
|
||||||
@app.route("/index2/<Identifiant>") # URL racine : http://localhost:5000/
|
@app.route("/index2/<Identifiant>") # URL racine : http://localhost:5000/
|
||||||
def index2(Identifiant):
|
def index2(Identifiant):
|
||||||
|
|||||||
@@ -21,3 +21,5 @@ bleurj;;gh
|
|||||||
bleurj;;gh
|
bleurj;;gh
|
||||||
bleurj;;gh
|
bleurj;;gh
|
||||||
zebi;;2
|
zebi;;2
|
||||||
|
tebi;;kk
|
||||||
|
tebi;;kk
|
||||||
|
|||||||
@@ -5,10 +5,23 @@ _repertoire = {
|
|||||||
"Bob": "0600000002"
|
"Bob": "0600000002"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def lecture():
|
||||||
|
with open('repertoire.txt','r') as f:
|
||||||
|
for ligne in f:
|
||||||
|
ligne = ligne.replace("\n","")
|
||||||
|
nom,numero=list(ligne.split(";;"))
|
||||||
|
_repertoire[nom]=numero
|
||||||
|
return _repertoire
|
||||||
|
|
||||||
|
|
||||||
def rechercher(nom: str) -> str:
|
def rechercher(nom: str) -> str:
|
||||||
"""Renvoie le numéro si le nom existe, sinon 'Inconnu'."""
|
"""Renvoie le numéro si le nom existe, sinon 'Inconnu'."""
|
||||||
return _repertoire.get(nom, "Inconnu")
|
return _repertoire.get(nom, "Inconnu")
|
||||||
|
|
||||||
def ajouter(nom: str, numero: str) -> None:
|
def ajouter(nom: str, numero: str) -> None:
|
||||||
"""Ajoute ou remplace une entrée du répertoire."""
|
"""Ajoute ou remplace une entrée du répertoire."""
|
||||||
_repertoire[nom] = numero
|
with open('repertoire.txt','a') as f :
|
||||||
|
f.write(nom)
|
||||||
|
f.write(';;')
|
||||||
|
f.write(numero)
|
||||||
|
f.write("\n")
|
||||||
|
|||||||
@@ -4,26 +4,40 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||||
<title>NOTES</title>
|
<title>NOTES</title>
|
||||||
|
<script>
|
||||||
|
function main_weapon(){
|
||||||
|
alert("le sniper est une arme qui tue les adversaires en un seul coup lorsque l'on touche leur tête et en trois si on touche leur corp (le sniper a les plus petites hitboxes)");
|
||||||
|
}
|
||||||
|
function secondary_weapon(){
|
||||||
|
alert("les daggers sont des armes qui donnent 20% de buff de vitesse et qui permmettent de faire des doubles sauts (seulement quand elles sont equipées)");
|
||||||
|
}
|
||||||
|
function mele_weapon(){
|
||||||
|
alert("la compétence du katana premet de renvoyer ses balles a l'adversaire, celle de la scythe permet de faire un dash");
|
||||||
|
}
|
||||||
|
function utility_weapon(){
|
||||||
|
alert("la war horn donne un boost de vitesse, les satchels permmettent de créer des explosion qui font 50 dégats quand elles sont collés à des parois et 25 quand elles explosent en l'air");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>NOTES</h1>
|
<h1>NOTES</h1>
|
||||||
<h2>Jeux favoris</h2>
|
<h2>Jeux favoris</h2>
|
||||||
<p>#1.RIVALS</p>
|
<p>#1.RIVALS</p>
|
||||||
<img src="{{ url_for('static', filename='img/rivals_logo.jpg') }}" alt="Logo Rivals" width="200">
|
<img src="{{ url_for('static', filename='img/rivals_logo.jpg') }}" title = "Rivals est un jeu video de combat, il y a beacoup de modes de jeu disponibles(les modes disponibles proposent des combats d'équipes')"alt="Logo Rivals" width="200">
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><p>favorite main weapon: SNIPER</p></td>
|
<td><p onMouseover="main_weapon()">favorite main weapon: SNIPER </p></td>
|
||||||
<td><p>favorite secondary: daggers</p></td>
|
<td><p onMouseover="secondary_weapon()">favorite secondary: daggers</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><p>favorite mele: schyte/katana</p></td>
|
<td><p onMouseover="mele_weapon()">favorite mele: schyte/katana</p></td>
|
||||||
<td><p>favorite utility: war horn/satchels</p></td>
|
<td><p onMouseover="utility_weapon()">favorite utility: war horn/satchels</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h2>#2.The Strongest Battlegrounds</h2>
|
<h2>#2.The Strongest Battlegrounds</h2>
|
||||||
<img src="{{ url_for('static', filename='img/TSB_logo.jpg') }}" alt="Logo TSB" width="200">
|
<img src="{{ url_for('static', filename='img/TSB_logo.jpg') }}" title = "The Strongests Battlegrounds est un jeu de combat général où tout les joueurs peuvent combattre les uns contre les autres cependant le jeu propose également des duels ou des 2vs2 (il y a des personnages avec des compétences differantes et vous pouvez choisir celui qui vous plait le plus)" alt="Logo TSB" width="200">
|
||||||
<h2>Phonk favoris</h2>
|
<h2>Phonk favoris</h2>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -39,7 +53,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p><a href="{{ url_for('index') }}">Retour à l'accueil</a></p>
|
<p><a href="{{ url_for('index2',Identifiant=Identifiant) }}">Retour à l'accueil</a></p>
|
||||||
<p><a href="{{ url_for('heure',Identifiant=Identifiant) }}">Verifier l'heure</a></p>
|
<p><a href="{{ url_for('heure',Identifiant=Identifiant) }}">Verifier l'heure</a></p>
|
||||||
<p><a href="{{ url_for('formulaire') }}">Aller au formulaire</a></p>
|
<p><a href="{{ url_for('formulaire') }}">Aller au formulaire</a></p>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<img src="{{ url_for('static', filename='img/logo.jpg') }}" alt="Logo" width="160">
|
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||||
<script>
|
<script>
|
||||||
function added_user(Identifiant){
|
function added_user(Identifiant){
|
||||||
@@ -13,8 +12,36 @@
|
|||||||
</script>
|
</script>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Accueil</title>
|
<title>Accueil</title>
|
||||||
|
<style>
|
||||||
|
.main{
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(1, 1fr) ;
|
||||||
|
}
|
||||||
|
.align_left {
|
||||||
|
grid-column: 1;
|
||||||
|
grid-row: 1 ;
|
||||||
|
/*
|
||||||
|
display: inline-block;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
.align_right {
|
||||||
|
|
||||||
|
grid-column: 2;
|
||||||
|
grid-row: 1;
|
||||||
|
/*
|
||||||
|
position: relative;
|
||||||
|
top: 0px;
|
||||||
|
width: 40%;
|
||||||
|
float: right;
|
||||||
|
display: inline-block;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<img src="{{ url_for('static', filename='img/logo.jpg') }}" style="display: block" alt="Logo" width="160">
|
||||||
|
<div class= "main">
|
||||||
|
<div class= "align_left">
|
||||||
<h1>Mon site journal</h1>
|
<h1>Mon site journal</h1>
|
||||||
<h2>Accueil</h2>
|
<h2>Accueil</h2>
|
||||||
<p><a href="{{ url_for('NOTES',Identifiant=Identifiant) }}">Aller sur NOTES</a></p>
|
<p><a href="{{ url_for('NOTES',Identifiant=Identifiant) }}">Aller sur NOTES</a></p>
|
||||||
@@ -25,6 +52,8 @@
|
|||||||
<li><a href="{{ url_for('cherche') }}">Rechercher un numéro</a></li>
|
<li><a href="{{ url_for('cherche') }}">Rechercher un numéro</a></li>
|
||||||
<li><a href="{{ url_for('ajout') }}">Ajouter un contact</a></li>
|
<li><a href="{{ url_for('ajout') }}">Ajouter un contact</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class= "align_right">
|
||||||
{% if Identifiant == "Alban" %}
|
{% if Identifiant == "Alban" %}
|
||||||
<h1>Ajouter un utilisateur</h1>
|
<h1>Ajouter un utilisateur</h1>
|
||||||
<form action="{{ url_for('result_add_user') }}" method="post">
|
<form action="{{ url_for('result_add_user') }}" method="post">
|
||||||
@@ -34,5 +63,7 @@
|
|||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p><a href="{{ url_for('user_search') }}">Se connecter avec un autre identifiant</a></p>
|
<p><a href="{{ url_for('user_search') }}">Se connecter avec un autre identifiant</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user