-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsurrenderDiscSuccess.html
More file actions
352 lines (330 loc) · 12.1 KB
/
surrenderDiscSuccess.html
File metadata and controls
352 lines (330 loc) · 12.1 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Standard Favicon -->
<link rel="icon" type="image/png" href="./assets/Color_Logo_Blue.png" />
<link
href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css"
rel="stylesheet"
/>
<!-- For Apple devices -->
<link
rel="apple-touch-icon"
sizes="512x512"
href="./assets/Color_Logo_Blue.png"
/>
<!-- For general use, like on Android -->
<link
rel="icon"
type="image/png"
sizes="256x256"
href="./assets/Color_Logo_Blue.png"
/>
<link
rel="icon"
type="image/png"
sizes="512x512"
href="./assets/Color_Logo_Blue.png"
/>
<!-- Web App Manifest -->
<link rel="manifest" href="/site.webmanifest" />
<title>DRN Inventory - Surrender Disc Success</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="./globals.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.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=Bebas+Neue&display=swap"
rel="stylesheet"
/>
<script>
function toggleFabMenu() {
const overlay = document.getElementById("overlay");
const fabMenuContainer = document.getElementById("fabMenuContainer");
const fabLogo = document.getElementById("fabLogo"); // Get the logo by its ID
const fabClose = document.getElementById("fabClose"); // Get the 'X' span by its ID
const fabContainer = document.getElementById("fabContainer"); // Get the 'X' span by its ID
const fab = document.getElementById("fab"); // Get the 'X' span by its ID
// Toggle the active class on the overlay and the FAB menu
overlay.classList.toggle("active");
fabMenuContainer.classList.toggle("active");
// Check if the menu is active or not
if (fabMenuContainer.classList.contains("active")) {
// Menu is active, show 'X' and hide logo
fabLogo.style.display = "none"; // Hide the logo
fabClose.style.display = "block"; // Show the 'X'
} else {
// Menu is not active, hide 'X' and show logo
fabLogo.style.display = "block"; // Show the logo
fabClose.style.display = "none"; // Hide the 'X'
}
}
function reportLostDisc() {
window.location.href = "reportLostDisc.html";
}
function requestCourse() {
window.location.href = "requestCourse.html";
}
function openSettings() {
window.location.href = "settings.html";
}
function goBack() {
if (document.referrer.startsWith(window.location.origin)) {
window.history.back();
} else {
// Handle the case when there is no history to go back to
// For example, redirect to a different page or display an error message
console.log("No page on the same domain to go back to.");
}
}
function refresh() {
window.location.href = "/";
}
</script>
<script>
// Function to parse query parameters from the URL
// function parseQueryParameters() {
// const query = window.location.search.substring(1);
// const pairs = query.split('&');
// const params = {};
// for (const pair of pairs) {
// const parts = pair.split('=');
// const key = decodeURIComponent(parts[0]);
// const value = decodeURIComponent(parts[1]);
// params[key] = value;
// }
// return params;
// }
function parseQueryParameters() {
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const params = {};
for (const [key, value] of urlParams.entries()) {
params[key] = value;
}
return params;
}
var discID = -1;
document.addEventListener("DOMContentLoaded", function () {
// Parse query parameters
const queryParams = parseQueryParameters();
const communicationMethodLabel =
queryParams.communicationMethodLabel || "";
// Update the elements with the parsed value
document.getElementById("communicationMethodLabel").textContent =
communicationMethodLabel;
document.getElementById("verifyPickupDate").textContent =
queryParams.pickupDate || "";
document.getElementById("verifyPickupLocation").textContent =
queryParams.pickupLocation || "";
document.getElementById("verifyContactInfoForRelease").textContent =
queryParams.contactInfo || "";
discID = queryParams.id || -1;
//search the found_discs array from /js/discs.js for the discID that was passed in the URL & display the disc info in the popup-verify
const matchingDisc = found_discs.find(
(disc) => disc.ID === parseInt(discID)
);
if (matchingDisc) {
const discInfoHTML = `
<div class="disc-item">
<div class="course-box">
<div class="course-box-detail">
<div class="course-image" style="border: 2px solid var(--primary-red)">
<img src="./assets/course-image.png" alt="image">
</div>
<div class="course-list">
<ul>
<li style="border-top: 1px solid var(--primary-grey);">
<img src="./assets/course-icon1.png" alt="icon">
<span style="font-weight: 300 !important; opacity: .7 !important;">${matchingDisc.Color} ${matchingDisc.Disc}</span>
</li>
<li>
<img src="./assets/course-icon.png" alt="icon">
<span style="font-weight: 300 !important; opacity: .7 !important;">${matchingDisc.Brand}</span>
</li>
<li>
<img src="./assets/Courses_Red_Icon.png" alt="icon">
<span style="font-weight: 300 !important; opacity: .7 !important;">${matchingDisc.Course}</span>
</li>
</ul>
</div>
</div>
</div>
</div>`;
// Insert the HTML content into the "discInfoVerify" element
const discInfoVerifyElement =
document.getElementById("discInfoVerify");
discInfoVerifyElement.innerHTML = discInfoHTML;
} else {
// Handle the case when the disc is not found
console.log("Disc not found with ID:", discID);
}
});
</script>
</head>
<body>
<section class="main-section text-center">
<div class="container" id="container">
<i
class="fa fa-arrow-left"
style="
position: absolute;
top: 30px;
left: 20px;
font-size: 30px;
color: white;
padding: 5px;
"
aria-hidden="true"
onclick="goBack()"
></i>
<div class="d-flex align-items-center flex-column text-center mb-2">
<img
class="icon-logo"
src="./assets/icon_logo_transparent_fullsize.png"
alt="logo"
onclick="refresh()"
/>
</div>
<div
class="rescue d-flex align-items-center flex-column text-center mt-0 mb-0"
>
<h2
class="m-0 text-white bigger-header"
style="color: var(--primary-green) !important"
>
NAILED
<span
style="
font-weight: 300 !important;
color: var(--primary-white) !important;
"
>IT!</span
>
</h2>
</div>
<div
class="d-flex align-items-center flex-column text-center mt-3 mb-3 p-3"
>
<h4
class="m-0 text-white"
style="color: var(--primary-white) !important"
>
You have successfully surrendered your disc to the course. The
volunteers thank you for your help!
</h4>
</div>
</div>
<div class="btn-container">
<button
class="btn red mb-2 mt-2 lessHeight"
style="width: 80%; font-size: 1.5rem"
>
Share to facebook
</button>
</div>
</section>
<div class="fab-menu-container" id="fabMenuContainer">
<div class="fab-menu" id="fabMenu">
<div class="fab-menu-item">
<a
class="fab-menu-item-text-left"
href="/reportLostDisc.html"
style="text-decoration: none"
>Report <br />
Lost Disc</a
>
<i class="bx bxs-analyse bx-sm" onclick="reportLostDisc()"></i>
</div>
<div class="fab-menu-item">
<a
class="fab-menu-item-text"
href="/requestCourse.html"
style="text-decoration: none"
>Request a Course</a
>
<i class="bx bx-map-pin bx-sm" onclick="requestCourse()"></i>
</div>
<div class="fab-menu-item">
<i class="bx bx-cog bx-sm" onclick="openSettings()"></i>
<a
class="fab-menu-item-text-right"
href="/settings.html"
style="text-decoration: none"
>Settings</a
>
</div>
</div>
</div>
<footer class="footer">
<div class="overlay" id="overlay" onclick="toggleFabMenu()"></div>
<div class="container">
<div class="footer-content row">
<div class="col-2">
<a class="d-flex align-items-center flex-column" href="/home.html">
<span class="img">
<img src="./assets/home.png" alt="home" />
</span>
<span>HOME</span>
</a>
</div>
<div class="col-2">
<a
class="d-flex align-items-center flex-column"
href="/searchInventory.html"
>
<span class="img">
<img
class="search"
src="./assets/search.png"
alt="home"
width="18"
/>
</span>
<span>SEARCH ALL</span>
</a>
</div>
<div class="col-2">
<a class="d-flex align-items-center flex-column" href="/store.html">
<span class="img">
<img src="./assets/disk-store.png" alt="home" />
</span>
<span>DISC STORE</span>
</a>
</div>
<div class="col-2">
<a
class="d-flex align-items-center flex-column"
href="/courses.html"
>
<span class="img">
<img src="./assets/courses.png" alt="home" />
</span>
<span>COURSES</span>
</a>
</div>
</div>
</div>
</footer>
<div class="fab-container" onclick="toggleFabMenu()" id="fabContainer">
<button class="fab" id="fab">
<img
src="./assets/app_center_btn_logo.png"
alt="Disc Rescue Network Logo"
class="logo-fab"
id="fabLogo"
/>
<span id="fabClose" style="display: none; z-index: 15">X</span>
<!-- Hidden by default -->
</button>
</div>
<script src="js/discs.js"></script>
</body>
</html>