-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.html
512 lines (493 loc) · 19.4 KB
/
app.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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<!-- google fonts -->
<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=Alkatra:wght@400;500;600;700&family=Allan:wght@400;700&family=Bebas+Neue&family=Delicious+Handrawn&family=Fira+Sans: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&family=Mallanna&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet">
<!-- bootstrap icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.4/font/bootstrap-icons.css">
<!-- css -->
<link rel="stylesheet" href="/css/site.css">
<!-- dev icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@v2.15.1/devicon.min.css">
<!-- favicon -->
<link rel="shortcut icon" href="/images/favicon_io/favicon-16x16.png" type="image/x-icon" />
</head>
<body onload="buildDropDown()">
<header>
<nav class="navbar navbar-expand-lg navbar-dark" id="mainNav">
<div class="container">
<a class="navbar-brand" href="#">
<img src="/images/Semicolon Angel Corral Nunez Logo/Semicolon Only/Semicolon Color logo - no background.png"
height="60" alt="Logo image of a semi-colon">
<span class="ms-4 ms-md-3 fs-2">FantasyCon</span>
</a>
<!-- Mobile hamburger menu button -->
<button class="navbar-toggler border border-light border-4" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="text-light">
<i class="bi bi-list"></i>
</span>
</button>
<div class="collapse navbar-collapse acn-secondary-color" id="navbarSupportedContent">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link fs-5" href="/index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active fs-5" aria-current="page" href="/app.html">The App</a>
</li>
<li class="nav-item">
<a class="nav-link fs-5" href="/code.html">The Code</a>
</li>
<li class="nav-item">
<a class="nav-link fs-5" target="blank" href="https://github.com/angelcorralnunez/fantasy-con-planner-events-tracker">The Repo</a>
</li>
<li class="nav-item">
<a class="nav-link fs-5" target="blank" href="https://angelcorralnunez.netlify.app/">About</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<main class="container mt-3">
<div class="row">
<div class="col-12 col-sm-6">
<div class="dropdown my-3">
<button
class="btn dropdown-btn dropdown-toggle"
type="button"
data-bs-toggle="dropdown"
aria-expanded="false"
>
Pick a Location
</button>
<ul class="dropdown-menu" id="eventDropDown">
<li><a class="dropdown-item" href="#">All</a></li>
<!-- event cities go here -->
</ul>
</div>
<table class="table table-striped border shadow">
<thead class="table-dark">
<tr>
<th colspan="2">
Stats For <span id="location">All Events</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>Total Attendance</td>
<td id="total"></td>
</tr>
<tr>
<td>Average Attendance</td>
<td id="average"></td>
</tr>
<tr>
<td>Most Attendance</td>
<td id="most"></td>
</tr>
<tr>
<td>Least Attendance</td>
<td id="least"></td>
</tr>
</tbody>
</table>
</div>
<div class="d-flex col-12 col-sm-6 order-first order-sm-last mt-5">
<img id="app-logo-img-pg2" src="/images/Fantasy Con.png" class="img-fluid mx-auto my-auto" alt="FantasyCon App Logo"/>
</div>
</div>
<div>
<a
role="button"
data-bs-toggle="modal"
data-bs-target="#addModal"
class="mb-3 btn app-btn my-3"
>Add Data
</a>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead class="table-dark">
<tr>
<th>Name</th>
<th>City</th>
<th>State</th>
<th>Attendance</th>
<th>Date</th>
</tr>
</thead>
<tbody id="eventTable">
<!-- event data -->
</tbody>
</table>
</div>
</div>
</main>
</body>
<footer class="py-3">
<div class="container">
<div class="row row-cols-1 row-cols-lg-3 align-items-center">
<div class="col text-center text-lg-start">
© 2023 Angel Corral Nunez
</div>
<div class="col text-center">
<img src="/images/Angel Single Semicolon Logo/Logo Files/For Web/svg/Color logo - no background.svg"
height="48" width="350"alt="Logo image of name 'Angel Corral Nunez'"/>
</div>
<div class="col text-center text-lg-end">
<a target="blank" href="https://www.linkedin.com/in/angelcorralnunez/">
<i class="socialicons bi bi-linkedin px-1"
alt="Icon for link to the 'Linkedin' professional
social network profile for Angel Corral Nunez."></i></a>
<a target="blank" href="https://github.com/angelcorralnunez">
<i class="socialicons bi bi-github px-1"
alt="Icon for link to the'Github'code hosting platform
account for Angel Corral Nunez."></i></a>
</div>
</div>
</div>
</footer>
<!-- templates -->
<template id="dropdownItemTemplate">
<li>
<a
class="dropdown-item"
href="#"
onclick="viewFilteredEvents(this)"
></a>
</li>
</template>
<template id="tableRowTemplate">
<tr
data-bs-toggle="modal"
data-bs-target="#editModal"
role="button"
onclick="editEvent(this)"
>
<td data-id="event"></td>
<td data-id="city"></td>
<td data-id="state"></td>
<td data-id="attendance"></td>
<td data-id="date"></td>
</tr>
</template>
<!-- new event modal -->
<div class="modal fade" id="addModal">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<form action="#">
<div class="modal-header lead text-primary bold">
Add a New Event
<button
type="button"
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<div class="my-1 lead">
<label for="Event Name" class="form-label">Event Name</label>
<input
name="Event Name"
class="form-control"
id="newEventName"
type="text"
placeholder="Event"
/>
</div>
<div class="my-1 lead">
<label for="City" class="form-label">City</label>
<input
name="City"
class="form-control"
id="newEventCity"
type="text"
placeholder="City"
/>
</div>
<div class="my-1 lead">
<label for="State" class="form-label">State</label>
<select
name="State"
class="form-select"
id="newEventState"
aria-label="Select a State"
>
<option value="" selected>Choose a state...</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District Of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">California</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select>
</div>
<div class="my-1 lead">
<label for="Attendance" class="form-label">Attendance</label>
<input
name="Attendance"
class="form-control"
id="newEventAttendance"
type="text"
placeholder="Attendance"
/>
</div>
<div class="my-1 lead">
<label for="Event Date" class="form-label">Date</label>
<input
name="Event Date"
id="newEventDate"
class="form-control"
type="date"
/>
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-bs-dismiss="modal"
aria-label="Close"
>
Close
</button>
<button
type="button"
class="btn btn-primary"
onclick="saveNewEvent()"
>
Save
</button>
</div>
</form>
</div>
</div>
</div>
<!-- edit/delete modal -->
<div class="modal fade" id="editModal">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header lead text-primary bold">
Edit Event
<button
type="button"
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<form id="editEventForm">
<input type="hidden" id="editEventId" />
<div class="form-group">
<label for="editEventName" class="form-label">Event Name</label>
<input
name="Event Name"
class="form-control"
id="editEventName"
type="text"
placeholder="Event"
/>
</div>
<div class="form-group">
<label for="editEventCity" class="form-label">City</label>
<input
name="City"
class="form-control"
id="editEventCity"
type="text"
placeholder="City"
/>
</div>
<div class="form-group">
<label for="editEventState" class="form-label">State</label>
<select
name="State"
class="form-select"
id="editEventState"
aria-label="Select a State"
>
<option value="" selected>Choose a state...</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District Of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">California</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select>
</div>
<div class="form-group">
<label for="editEventAttendance" class="form-label"
>Attendance</label
>
<input
name="Attendance"
class="form-control"
id="editEventAttendance"
type="text"
placeholder="Attendance"
/>
</div>
<div class="form-group">
<label for="editEventDate" class="form-label">Date</label>
<input
name="Event Date"
id="editEventDate"
class="form-control"
type="date"
/>
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary me-auto"
data-bs-dismiss="modal"
onclick=""
>
Cancel
</button>
<button
type="button"
class="btn btn-danger"
data-bs-dismiss="modal"
onclick="deleteEvent()"
>
Delete Event
</button>
<button
type="button"
class="btn btn-primary"
data-bs-dismiss="modal"
onclick="updateEvent(
)"
>
Save Changes
</button>
</div>
</form>
</div>
</div>
</div>
<!-- Bootstrap JS -->
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
crossorigin="anonymous"
></script>
<!-- Sweet Alerts -->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- App JS -->
<script src="/js/site.js"></script>
<script>
document
.getElementById("btnSubmit")
.addEventListener("click", displayMessage);
</script>
</body>
</html>