mirror of
https://github.com/AudebertAdrien/ft_transcendence.git
synced 2026-11-09 18:47:07 +01:00
01
This commit is contained in:
@@ -1,60 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Tournament Brackets</title>
|
||||
<style>
|
||||
.tournament-bracket {
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
font-family: Arial, sans-serif;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.round {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
margin-right: 40px;
|
||||
}
|
||||
.match {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.player {
|
||||
width: 150px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
background-color: #000000;
|
||||
border: 1px solid #ffffff;
|
||||
margin: 2px 0;
|
||||
padding: 0 10px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.player.winner {
|
||||
background-color: #00ff3c;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="tournament-bracket">
|
||||
{% for round in tournament_rounds %}
|
||||
<div class="round">
|
||||
{% for match in round %}
|
||||
<div class="match">
|
||||
<div class="player {% if match.winner == match.player1 %}winner{% endif %}">
|
||||
{{ match.player1 }}
|
||||
</div>
|
||||
<div class="player {% if match.winner == match.player2 %}winner{% endif %}">
|
||||
{{ match.player2|default:"BYE" }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,20 +1,10 @@
|
||||
<!-- pong/tournament_waiting_room.html -->
|
||||
<!-- templates/tournament_waiting_room.html -->
|
||||
<div class="tournament-waiting-room">
|
||||
<h2>Tournament Waiting Room</h2>
|
||||
|
||||
<p>Players currently waiting: {{ players_count }}</p>
|
||||
<p>Minimum players needed to start: {{ min_players_to_start }}</p>
|
||||
|
||||
<h3>Players:</h3>
|
||||
<p>Players currently waiting: {{ players|length }}</p>
|
||||
<ul>
|
||||
{% for player in players %}
|
||||
<li>{{ player }}</li>
|
||||
{% endfor %}
|
||||
{% for player in players %}
|
||||
<li>{{ player }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% if players_count >= min_players_to_start %}
|
||||
<button id="start-tournament-btn">Start Tournament</button>
|
||||
{% else %}
|
||||
<p>Waiting for more players to join...</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user