-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
170 lines (132 loc) · 5.35 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>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="The Elo chess ranking algorithm in Javascript form">
<link rel="stylesheet" href="./assets/main.min.css">
<title>Arpadio - The Elo Rating App</title>
</head>
<body>
<header>
<div class="container">
<div class="flexbox">
<div class="brand">
<h1><a href="./">Arpadio</a></h1>
</div>
<div>
<button class="btn small-btn" id="resetButton">Reset</button>
</div>
</div>
</div>
</header>
<main>
<div class="container">
<section id="rankingView">
<div class="view-header">
<div class="flex-half">
<h2>Current Ranking</h2>
</div>
<div class="flex-half">
<button class="btn newPlayerButton">Add new player</button>
<button class="btn spaced-btn" id="newResultButton">Add new result</button>
</div>
</div>
<table class="card ranking-table">
<thead>
<tr>
<th>Rank</th>
<th>Name</th>
<th>Nationality</th>
<th>Won</th>
<th>Lost</th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<!-- Populated by app.js -->
</tbody>
</table>
</section>
<section id="newPlayerView">
<div class="view-header" />
<h2>Add a New Player</h2>
<button class="btn cancel-btn spaced-btn">Cancel</button>
</div>
<div class="card">
<div class="input-group">
<label for="npName">First name:</label>
<input type="text" id="npFirst" />
<span class="form-error" id="firstError">Please enter the new player's name</span>
</div>
<div class="input-group">
<label for="npName">Last name:</label>
<input type="text" id="npLast" />
<span class="form-error" id="lastError">Please enter the new player's name</span>
</div>
<div class="input-group">
<label for="npNationality">Nationality:</label>
<input type="text" id="npNationality"/>
<span class="form-error" id="nationalityError">Please enter the new player's nationality</span>
</div>
<button class="btn submit-btn" id="addPlayer">Add new player</button>
</div>
</section> <!-- New player view -->
<section id="newResultView">
<div class="view-header" />
<h2>Submit a New Result</h2>
<div>
<button class="btn newPlayerButton">Add new player</button>
<button class="btn cancel-btn spaced-btn">Cancel</button>
</div>
</div>
<div class="card" id="selects">
<div class="input-group">
<label for="resultWinner">The humble winner:</label>
<select class="resultSelect" id="playerOne" name="resultWinner">
<option value="none"></option>
<!-- app.js will populate -->
</select>
<span class="form-error" id="winnerError">Please select the winner</span>
</div>
<div class="input-group">
<label for="resultWinner">The gallant loser:</label>
<select class="resultSelect" id="playerTwo">
<option value="none"></option>
<!-- app.js will populate -->
</select>
<span class="form-error" id="loserError">Please select the loser</span>
</div>
<button id="submitResult" class="btn submit-btn">Publish result</button>
</div>
</section> <!-- New result view -->
<section>
<div class="view-header results-history">
<h2>Recent Results</h2>
<p id="totalGames"></p>
</div>
<div class="card" id="resultsList">
</div>
</section>
</div>
</main>
<footer>
<div class="container">
<div class="flexbox">
<div class="flex-half">
<p>"The process of rating players can be compared to the measurement of the position of a cork, bobbing up and down on the surface of agitated water, with a yard stick tied to a rope and which is swaying in the wind."</p>
<p><em>— Arpad Elo</em></p>
</div>
<div class="credits">
<p>By <a href="https://sjam.studio" target="_blank">Sam Mead</a>, with thanks to <a href="https://metinmediamath.wordpress.com/" target="_blank">Metin Bektas</a></p>
<p><a href="https://github.com/arpadio/eloRatingApp" target="_blank">About Arpadio — The Elo Rating App</a></p>
</div>
</div>
</div>
</footer>
</body>
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> -->
<script src="https://www.gstatic.com/firebasejs/3.4.0/firebase.js"></script>
<script src="./assets/app.js" ></script>
</html>