-
Notifications
You must be signed in to change notification settings - Fork 0
/
shotchart.html
230 lines (187 loc) · 12 KB
/
shotchart.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Shot Tracker - Math Buzz - Charlotte Hornets & National Museum of Mathematics</title>
<meta property="og:title" content="Math Buzz - Charlotte Hornets & National Museum of Mathematics"/>
<meta property="og:description" content="Explore sports analytics with activities designed by the National Museum of Mathematics and the Charlotte Hornets."/>
<meta property="og:url" content="https://sportingmath.davidson.edu/hornets/"/>
<meta property="og:image" content="https://sportingmath.davidson.edu/hornets/assets/img/share-math-buzz-open-graph-1200x630.png"/>
<meta property="og:image:width" content="1200"/>
<meta property="og:image:height" content="630"/>
<meta name="twitter:title" content="Math Buzz - Charlotte Hornets & National Museum of Mathematics">
<meta name="twitter:description" content="Explore sports analytics with activities designed by the National Museum of Mathematics and the Charlotte Hornets.">
<meta name="twitter:image" content="https://sportingmath.davidson.edu/hornets/assets/img/share-math-buzz-twitter-1200x600.png">
<meta name="twitter:card" content="summary_large_image">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous" />
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css'>
<link rel="stylesheet" href="assets/css/styles.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.2/d3.min.js"></script>
<style>
body,
html {
width: 100%;
height: 100%;
}
.event {
fill-opacity: 0.75;
stroke: black;
stroke-opacity: 0.75;
}
.background {
visibility: hidden;
pointer-events: all;
}
.toolbar {
position: relative;
top: 0;
left: 0;
z-index: 10;
background-color: rgba(255, 255, 255, 1);
}
</style>
</head>
<body class="hornets-purple-bg">
<header class="container-fluid white-bg">
<div class="container">
<div class="row py-4 px-2">
<div class="col-12 col-sm-6 col-lg-4 d-flex align-items-center justify-content-center text-center">
<a href="./index.html" title="Math Buzz home">
<img src="assets/img/banner.png" alt="Math Buzz logo" class="img-fluid" />
</a>
</div>
<div class="col-12 col-sm-6 col-lg-8 d-flex align-items-center justify-content-center text-center">
<div class="mt-3">
<img src="assets/img/title-shot-tracker.svg" alt="Shot Tracker title" class="img-fluid page-title-img">
<div class="d-none d-md-block">Select points and type, then click the court to add or remove shots!</div>
</div>
</div>
</div>
</div>
</header>
<div class="container-fluid hornets-teal-bg white text-center">
<div class="container">
<div class="row">
<div class="col-12 py-2"></div>
</div>
</div>
</div>
<div class="container-fluid py-md-2 toolbar position-sticky">
<div class="row">
<div class="btn-toolbar justify-content-center align-items-center" role="toolbar" aria-label="Toolbar with button groups">
<span class="toolbarLabel d-block">Quarter</span>
<div class="btn-group m-1" role="group" aria-label="Quarter (radio toggle button group)">
<input type="radio" class="btn-check btn-period" name="periodBtn" id="periodBtn1" data-period="1" autocomplete="off" checked>
<label class="btn btn-outline-hornets" for="periodBtn1">1</label>
<input type="radio" class="btn-check btn-period" name="periodBtn" id="periodBtn2" data-period="2" autocomplete="off">
<label class="btn btn-outline-hornets" for="periodBtn2">2</label>
<input type="radio" class="btn-check btn-period" name="periodBtn" id="periodBtn3" data-period="3" autocomplete="off">
<label class="btn btn-outline-hornets" for="periodBtn3">3</label>
<input type="radio" class="btn-check btn-period" name="periodBtn" id="periodBtn4" data-period="4" autocomplete="off">
<label class="btn btn-outline-hornets" for="periodBtn4">4</label>
</div>
<span class="toolbarLabel d-block">Points</span>
<div class="btn-group m-1" role="group" aria-label="Points (radio toggle button group)">
<input type="radio" class="btn-check btn-points" name="pointsBtn" id="pointsBtn0" data-point="0" autocomplete="off">
<label class="btn btn-outline-danger" for="pointsBtn0">0</label>
<!-- <input type="radio" class="btn-check btn-points" name="pointsBtn" id="pointsBtn1" data-point="1" autocomplete="off">
<label class="btn btn-outline-warning" for="pointsBtn1">1</label> -->
<input type="radio" class="btn-check btn-points" name="pointsBtn" id="pointsBtn2" data-point="2" autocomplete="off" checked>
<label class="btn btn-outline-primary" for="pointsBtn2">2</label>
<input type="radio" class="btn-check btn-points" name="pointsBtn" id="pointsBtn3" data-point="3" autocomplete="off">
<label class="btn btn-outline-success" for="pointsBtn3">3</label>
</div>
<div class="btn-group m-1 shot-menu-group" role="group" aria-label="Type">
<button type="button" class="btn btn-hornets dropdown-toggle shot-menu-toggle" data-bs-toggle="dropdown" aria-expanded="false">
Shot type
</button>
<ul class="dropdown-menu shot-menu">
<li><a class="dropdown-item" data-shot="0" href="#">
<!-- circle -->
<svg class="shotSymbol" width="20" height="20" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="25" cy="25" r="25" fill="white" />
</svg>
layup/dunk</a></li>
<li><a class="dropdown-item" data-shot="1" href="#">
<!-- cross -->
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 16H16V0H34V16H50V34H34V50H16V34H0V16Z" fill="white" />
</svg>
dribble jumper</a></li>
<li><a class="dropdown-item" data-shot="2" href="#">
<!-- diamond -->
<svg width="38" height="48" viewBox="0 0 38 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19 0L38.0001 24.0001L19 48.0002L-0.000111882 24.0001L19 0Z" fill="white" />
</svg>
catch & shoot</a></li>
<li><a class="dropdown-item" data-shot="3" href="#">
<!-- square -->
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="50" height="50" fill="white" />
</svg>
runner/floater</a></li>
<li><a class="dropdown-item" data-shot="4" href="#">
<!-- star -->
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M25 0L33 17L50 19.0983L37 32L40.4509 50L25 40.1966L9.54915 50L12.5 32L0 19.0983L16 17L25 0Z" fill="white" />
</svg>
post move</a></li>
<li><a class="dropdown-item" data-shot="5" href="#">
remove</a></li>
<li><a class="dropdown-item" id="clearButton" data-shot="6" href="#">
Clear All</a></li>
</ul>
</div>
<span id="toolbarLabelsBtn" class="m-1 me-2">
<i class="bi bi-info-circle"></i>
</span>
</div>
</div>
<div class="row toolbarLabel">
<div class="col text-center">
Watch the game and record the shots. You can select the quarter, the point value of the shot, and, if you like, the type of shot.
</div>
</div>
</div>
<div id="clickMap">
<img id="svgBgImage" src="./assets/img/halfcourt-cropped.png" alt='basketball court' draggable="false" />
<div id="svgDiv">
<svg width="100%" height="100%">
<g id="zoomGroup">
<rect class="background" width="100%" height="100%" />
</g>
</svg>
</div>
</div>
<footer class="container-fluid hornets-purple-bg white">
<div class="container py-5">
<div class="row fs-5 text-center text-md-start">
<div class="col-12 col-md-3 d-flex align-items-top justify-content-center">
<div>
<p>Math Games</p>
<a href="./shotchart.html">NBA Analyst</a><br />
<a href="./freethrow.html">Free Throw Shooter</a><br />
<a href="./tshirt.html">T-Shirt Toss</a>
<p class="mt-5">
<a href="credits.html">Credits</a>
</p>
</div>
</div>
<div class="col-12 col-md-6 d-flex align-items-top justify-content-center mt-4 mt-md-0">
<div>
Brought to you by<br>
<a href="https://momath.org/"><img src="assets/img/logo-momath-horiz.png" alt="National Museum of Mathematics logo" class="img-fluid " /></a>
</div>
</div>
<div class="col-12 col-md-3 d-flex align-items-top justify-content-center mt-4 mt-md-0">
<a href="https://www.nba.com/hornets"><img src="assets/img/logo-hornets-sq.png" alt="Charlotte Hornets logo" class="img-fluid" /></a>
</div>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
<script src="assets/js/functions.js"></script>
<script src="assets/js/shotchart.js"></script>
</body>
</html>