-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
170 lines (151 loc) · 6.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="script.js"></script>
<head>
<title>Babyfoot</title>
</head>
<body>
<!-- Black with white text -->
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<ul class="navbar-nav">
<li class="nav-item active">
<a id="nav-home" class="nav-link">Home</a>
</li>
<li class="nav-item">
<a id="nav-leaderboard" class="nav-link">Leaderboard</a>
</li>
<li class="nav-item">
<a id="nav-games" class="nav-link">Games</a>
</li>
<li class="nav-item">
<a id="nav-score-input" class="nav-link">Score input</a>
</li>
<li class="nav-item">
<a id="nav-add-player" class="nav-link">Add player</a>
</li>
</ul>
</nav>
<div id="home" class="jumbotron">
<h1>Babyfoot ELO ranking</h1>
<p>The is where the fierceless competition takes place, for the honor, for the glory</p>
</div>
<div id="leaderboard" style="display:none">
<table class="table">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">ELO Rating</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div id="games" style="display:none">
<table class="table">
<thead>
<tr>
<th scope="col">Game</th>
<th scope="col">Défense bleue</th>
<th scope="col">Attaque bleue</th>
<th scope="col">Score bleu</th>
<th scope="col">Score rouge</th>
<th scope="col">Attaque rouge</th>
<th scope="col">Défense rouge</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<form id="score-input" name="myform" class="col-md-12 m-3" action="javascript:void(0);" style="display:none">
<div class="form-row align-items-center">
<div class="form-group col-md-3 mb-3">
<label for="Player1">Défense <span class="text-primary">bleue</span></label>
<select class="form-control player-selector" name="blueDefense" id="Player1">
<option class="default-player" value="" disabled selected hidden>Choisir un joueur</option>
</select>
</div>
<div class="form-group col-md-3 mb-3">
<label for="Player2">Défense rouge</label>
<select class="form-control player-selector" name="redDefense" id="Player2">
<option class="default-player" value="" disabled selected hidden>Choisir un joueur</option>
</select>
</div>
</div>
<div class="form-row align-items-center">
<div class="form-group col-md-3 mb-3">
<label for="Player3">Attaque bleue</label>
<select class="form-control player-selector" name="blueOffense" id="Player3">
<option class="default-player" value="" disabled selected hidden>Choisir un joueur</option>
</select>
</div>
<div class="form-group col-md-3 mb-3">
<label for="Player4">Attaque rouge</label>
<select class="form-control player-selector" name="redOffense" id="Player4">
<option class="default-player" value="" disabled selected hidden>Choisir un joueur</option>
</select>
</div>
</div>
<div class="btn-group btn-group-toggle col-md-3 mb-3" data-toggle="buttons">
<label class="btn btn-primary active">
<input class="score-selector default-score-selector" type="radio" name="blueScore" value="0" id="scoreBlue0" autocomplete="off" checked> 0
</label>
<label class="btn btn-primary">
<input class="score-selector" type="radio" name="blueScore" value="1" id="scoreBlue1" autocomplete="off"> 1
</label>
<label class="btn btn-primary">
<input class="score-selector" type="radio" name="blueScore" value="2" id="scoreBlue2" autocomplete="off"> 2
</label>
<label class="mybtn btn btn-primary">
<input class="score-selector" type="radio" name="blueScore" value="3" id="scoreBlue3" autocomplete="off"> 3
</label>
<label class="btn btn-primary">
<input class="score-selector" type="radio" name="blueScore" value="4" id="scoreBlue4" autocomplete="off"> 4
</label>
<label class="btn btn-primary">
<input class="score-selector" type="radio" name="blueScore" value="5" id="scoreBlue5" autocomplete="off"> 5
</label>
</div>
<div class="btn-group btn-group-toggle col-md-3 mb-3" data-toggle="buttons">
<label class="btn btn-danger active">
<input class="score-selector default-score-selector" type="radio" name="redScore" value="0" id="scoreRed0" autocomplete="off" checked> 0
</label>
<label class="btn btn-danger">
<input class="score-selector" type="radio" name="redScore" value="1" id="scoreRed1" autocomplete="off"> 1
</label>
<label class="btn btn-danger">
<input class="score-selector" type="radio" name="redScore" value="2" id="scoreRed2" autocomplete="off"> 2
</label>
<label class="btn btn-danger">
<input class="score-selector" type="radio" name="redScore" value="3" id="scoreRed3" autocomplete="off"> 3
</label>
<label class="btn btn-danger">
<input class="score-selector" type="radio" name="redScore" value="4" id="scoreRed4" autocomplete="off"> 4
</label>
<label class="btn btn-danger">
<input class="score-selector" type="radio" name="redScore" value="5" id="scoreRed5" autocomplete="off"> 5
</label>
</div>
<div class="col-md-6 mb-3">
<button type="submit" class="btn btn-primary mb-2" onClick="submitScore()">Valider</button>
</div>
</form>
<form id="add-player" class="col-md-12 m-3" action="javascript:void(0);" style="display:none">
<div class="col-md-6 mb-3">
<label for="player-input">Nom du joueur</label>
<input type="text" class="form-control" name="player" id="player-input" placeholder="Entrer le nom du joueur">
</div>
<div class="col-md-6 mb-3">
<button type="submit" class="btn btn-primary mb-2" onClick="addPlayer()">Valider</button>
</div>
</form>
</body>
</html>