Improve web page

This commit is contained in:
Yohann D'ANELLO 2021-11-09 01:15:39 +01:00
parent 133abfe195
commit c53656c427
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 60 additions and 75 deletions

View File

@ -2,68 +2,50 @@
<html lang="fr"> <html lang="fr">
<head> <head>
<title>Zero Escape: Radical Outcome</title> <title>Zero Escape: Radical Outcome</title>
<meta charset="utf-8">
<style> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
table { <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
border-collapse: collapse;
}
th, td {
border: 1px solid black;
}
</style>
</head> </head>
<body> <body>
<div class="container">
<h1>Scores Nonary Game: Ambidex Edition</h1> <h1>Scores Nonary Game: Ambidex Edition</h1>
<h2>Tableau des scores</h2> <hr>
<table>
<thead>
<tr>
<th>Joueur</th>
<th>Score</th>
</tr>
</thead>
<h2>Tableau des scores</h2>
<table class="table table-striped">
<tbody> <tbody>
{% for player in game.players.values() %}
<tr> <tr>
<td>{{ player.name }}</td> {% for player in game.players.values() %}
<td>{{ player.score }}{% if player.score <= 0 %} ☠️ {% elif player.score >= 9 %} 9⃣ {% endif %}</td> <th scope="row">{{ player.name }}</th>
</tr>
{% endfor %} {% endfor %}
</tr>
<tr>
{% for player in game.players.values() %}
<td>{{ player.score }}{% if player.score <= 0 %} ☠️ {% elif player.score >= 9 %} 9⃣ {% endif %}</td>
{% endfor %}
</tr>
</tbody> </tbody>
</table> </table>
<ul> <hr>
<li>
<b>Tour actuel :</b>
{{ game.rounds|length }}
</li>
<li>
<b>État :</b>
{% if game.state.value == 0 %}
<span style="color: orange;">En préparation ...</span>
{% elif game.state.value == 1 %}
<span style="color: red;">Votes en cours ...</span>
{% else %}
<span style="color: green;">Résultats du tour</span>
{% endif %}
</li>
</ul>
<h2>Récapitulatif par tour</h2> <h2>Récapitulatif par tour</h2>
<div class="row">
{% for round in game.rounds if admin or game.state.value > 0 or round.round < game.rounds|length %} {% for round in game.rounds if admin or game.state.value > 0 or round.round < game.rounds|length %}
<div class="col-sm-3 table-responsive">
<h3>Tour n°{{ round.round }}</h3> <h3>Tour n°{{ round.round }}</h3>
<hr>
<table> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Salle</th> <th scope="col">Salle</th>
<th>Équipes</th> <th scope="col">Équipes</th>
<th>Vote</th> <th scope="col">Vote</th>
</tr> </tr>
</thead> </thead>
@ -72,7 +54,7 @@
{% for vote in room.votes %} {% for vote in room.votes %}
<tr> <tr>
{% if loop.index0 == 0 %} {% if loop.index0 == 0 %}
<td rowspan="2">{{ room.room.value }}</td> <th scope="row" rowspan="2">{{ room.room.value }}</th>
{% endif %} {% endif %}
<td>{{ vote.player1.name|default('<em>personne</em>')|safe }}{% if vote.player2 %}, {{ vote.player2.name }}{% endif %}</td> <td>{{ vote.player1.name|default('<em>personne</em>')|safe }}{% if vote.player2 %}, {{ vote.player2.name }}{% endif %}</td>
{% if round.round != game.rounds|length or game.state.value == 2 or admin %} {% if round.round != game.rounds|length or game.state.value == 2 or admin %}
@ -86,6 +68,9 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div>
{% endfor %} {% endfor %}
</div>
</div>
</body> </body>
</html> </html>