-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
247 lines (232 loc) · 11.5 KB
/
index.html
File metadata and controls
247 lines (232 loc) · 11.5 KB
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Buckets">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="theme-color" content="#f2f2f2">
<title>BUCKETS</title>
<link rel="apple-touch-icon" href="icons/180x180.png" />
<link rel="shortcut icon" href="icons/favicon.png">
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="css/style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet">
<script defer src="https://cloud.umami.is/script.js"
data-website-id="2392a451-203c-4d8a-a4f5-bd7d06f832af"></script>
</head>
<body>
<main>
<section class="left">
<div class="img-bg">
<img class="team-logo" src="" alt="">
<img class="player-photo" src="" alt="">
<div class="label">CPU</div>
<div class="callout hidden"></div>
</div>
<h1>------</h1>
<ul>
<li><abbr title="Games Played">GP</abbr>:</li>
<li data-gp="">---</li>
<li><abbr title="Minutes Played">MIN</abbr>:</li>
<li data-min="">---</li>
<li><abbr title="Points">PTS</abbr>:</li>
<li data-pts="">---</li>
<li><abbr title="Field Goal Percentage">FG%</abbr>:</li>
<li data-fgp="">---</li>
<li><abbr title="3 Point Field Goals Made">3PM</abbr>:</li>
<li data-3pm="">---</li>
<li><abbr title="3 Point Field Goal Percentage">3P%</abbr>:</li>
<li data-3pp="">---</li>
<li><abbr title="Free Throws Made">FTM</abbr>:</li>
<li data-ftm="">---</li>
<li><abbr title="Free Throw Percentage">FT%</abbr>:</li>
<li data-ftp="">---</li>
<li><abbr title="Rebounds">REB</abbr>:</li>
<li data-reb="">---</li>
<li><abbr title="Assists">AST</abbr>:</li>
<li data-ast="">---</li>
<li><abbr title="Steals">STL</abbr>:</li>
<li data-stl="">---</li>
<li><abbr title="Blocks">BLK</abbr>:</li>
<li data-blk="">---</li>
</ul>
</section>
<section class="right">
<div class="img-bg">
<img class="team-logo" src="" alt="">
<img class="player-photo" src="" alt="">
<div class="label">YOU</div>
<div class="callout hidden"></div>
</div>
<h1>------</h1>
<ul>
<li><abbr title="Games Played">GP</abbr>:</li>
<li data-gp="">---</li>
<li><abbr title="Minutes Played">MIN</abbr>:</li>
<li data-min="">---</li>
<li><abbr title="Points">PTS</abbr>:</li>
<li data-pts="">---</li>
<li><abbr title="Field Goal Percentage">FG%</abbr>:</li>
<li data-fgp="">---</li>
<li><abbr title="3 Point Field Goals Made">3PM</abbr>:</li>
<li data-3pm="">---</li>
<li><abbr title="3 Point Field Goal Percentage">3P%</abbr>:</li>
<li data-3pp="">---</li>
<li><abbr title="Free Throws Made">FTM</abbr>:</li>
<li data-ftm="">---</li>
<li><abbr title="Free Throw Percentage">FT%</abbr>:</li>
<li data-ftp="">---</li>
<li><abbr title="Rebounds">REB</abbr>:</li>
<li data-reb="">---</li>
<li><abbr title="Assists">AST</abbr>:</li>
<li data-ast="">---</li>
<li><abbr title="Steals">STL</abbr>:</li>
<li data-stl="">---</li>
<li><abbr title="Blocks">BLK</abbr>:</li>
<li data-blk="">---</li>
</ul>
</section>
</main>
<footer>
<div class="scoreboard">
<div class="players active">CPU</div>
<output class="">
<span>0</span><span>0</span>
</output>
<output class="">
<span>0</span><span>0</span>
</output>
<div class="players">YOU</div>
</div>
<div id="time">
<img id="helpBtn" src="icons/help-svgrepo-com.svg" alt="">
<div>
<span class="quarter">1st</span> -
<span class="clock">12</span>:00
</div>
<img id="settingsBtn" src="icons/sliders-svgrepo-com.svg" alt="">
</div>
<!-- Score Chart Modal -->
<aside class="modal hidden" id="chartModal">
<div class="modal-header">
<h2 id="chartTitle">Score over time</h2>
<button class="modal-close" id="chartClose">
<img src="icons/clear-svgrepo-com.svg" alt="Close">
</button>
</div>
<div class="modal-body">
<div class="chart-wrap"><canvas id="scoreChart"></canvas></div>
</div>
</aside>
<!-- HowTo Modal -->
<aside class="modal hidden" id="howtoModal">
<div class="modal-header">
<h2 id="howtoTitle">Instructions</h2>
<button class="modal-close" id="howtoClose">
<img src="icons/clear-svgrepo-com.svg" alt="Close">
</button>
</div>
<div class="modal-body">
<p>You play as <strong>YOU</strong>. Your card is on the right (desktop) or at the bottom (mobile). The
opponent is the <strong>CPU</strong> on the other side. You can switch between NBA and WNBA rosters
in the Settings at any time.</p>
<p>💡 Tip: You always choose a stat category – it doesn’t matter if you click on your card or the CPU’s
card. Just watch which side is marked green after the reveal: right/bottom = you score, left/top =
CPU scores.</p>
<h3>How to play</h3>
<ol>
<li>Choose one stat on your <strong>YOU</strong> card.</li>
<li>The <strong>CPU</strong>’s stat in the same category is revealed.</li>
<li>The higher value wins the round.</li>
<li>After each round, the game clock decreases by the amount set in the Settings (default: 1
minute).</li>
<li>When the game ends, the player with the most points wins.</li>
</ol>
<p>New round, new cards: At the start of every round, both you and the CPU get a new player card.<br>
– Your card is random.<br>
– The CPU card is chosen based on the current score difference: if you’re ahead, you’ll face tougher
opponents; if you’re behind, you’ll get easier ones.</p>
<h3>Color legend</h3>
<ul>
<li><span class="higher">Green</span> on <strong>YOU</strong> → you score</li>
<li><span class="higher">Green</span> on <strong>CPU</strong> → opponent scores</li>
<li><span class="tie">Yellow</span> → tie (no points)</li>
<li><span class="lower">Red</span> → loses the round</li>
</ul>
<h3>Scoring by stat</h3>
<ul>
<li>1 point: FT%, FTM, GP, MIN</li>
<li>3 points: 3PM, 3P%</li>
<li>2 points: all others (PTS, REB, AST, STL, BLK, FG%, EFF, …)</li>
</ul>
<h3>Data</h3>
<p>Player stats come from the most recently finished NBA or WNBA regular season (based on your
Settings), sourced from
<a href="https://www.nba.com/stats" target="_blank">nba.com/stats</a> and
<a href="https://www.wnba.com/stats" target="_blank">wnba.com/stats</a>.
</p>
</div>
</aside>
<!-- Settings Modal -->
<aside class="modal hidden" id="settingsModal">
<div class="modal-header">
<h2 id="settingsTitle">Settings</h2>
<button class="modal-close" id="settingsClose">
<img src="icons/clear-svgrepo-com.svg" alt="Close">
</button>
</div>
<div class="modal-body">
<form id="settingsForm">
<fieldset>
<legend id="leagueLegend">League</legend>
<div role="radiogroup">
<label for="leagueNBA">
<input type="radio" name="league" id="leagueNBA" value="nba" checked>
NBA
</label>
<label for="leagueWNBA">
<input type="radio" name="league" id="leagueWNBA" value="wnba">
WNBA
</label>
</div>
<p class="note">League changes apply on the next draw.</p>
</fieldset>
<fieldset>
<legend id="tickLegend">Clock decrement per matchup</legend>
<div role="radiogroup">
<label for="tick1">
<input type="radio" name="tickSize" id="tick1" value="1" checked>
1 minute
</label>
<label for="tick2">
<input type="radio" name="tickSize" id="tick2" value="2">
2 minutes
</label>
<label for="tick4">
<input type="radio" name="tickSize" id="tick4" value="4">
4 minutes
</label>
</div>
<p class="note">Takes effect from the next round.</p>
</fieldset>
<fieldset>
<legend id="revealLegend">CPU reveal</legend>
<label for="revealCpuAll">
<input type="checkbox" name="revealCpuAll" id="revealCpuAll">
Reveal all CPU stats during comparison
</label>
<p class="note">Stats stay visible until you click to continue.</p>
</fieldset>
</form>
</div>
</aside>
</footer>
<script type="module" src="./js/app.js"></script>
</body>
</html>