-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.html
More file actions
351 lines (326 loc) · 11.9 KB
/
settings.html
File metadata and controls
351 lines (326 loc) · 11.9 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
<!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 - Settings</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 to get the value of a query parameter from the URL
function getQueryParam(parameterName) {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get(parameterName);
}
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 = "/";
}
function submitEmail() {
alert("submitEmail");
}
function validateContact(input) {
// Regular expression patterns for email and phone number
var emailPattern = /\S+@\S+\.\S+/;
var phonePattern = /^\d{10}$/; // Adjust the regex to suit the phone number format you need
if (emailPattern.test(input)) {
console.log("The input is a valid email address.");
return true;
} else if (phonePattern.test(input.replace(/\D/g, ""))) {
// Remove non-digit characters before test
console.log("The input is a valid phone number.");
return true;
} else {
console.log(
"The input is neither a valid email address nor a valid phone number."
);
return false;
}
}
// Attach an event listener to your input field
document
.getElementById("inputContact")
.addEventListener("change", function () {
validateContact(this.value);
});
function signUp() {
var input = document.getElementById("inputContact").value;
var errorMessageElement = document.getElementById("error");
var successMessageElement = document.getElementById("success");
var submitButton = document.getElementById("submitButton");
// Regular expression for validating an email address
var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;
// Regular expression for validating a phone number (basic validation)
var phonePattern = /^[0-9]{10,15}$/;
if (emailPattern.test(input)) {
console.log("Input is an email address.");
errorMessageElement.style.display = "none";
successMessageElement.style.display = "block";
submitButton.style.display = "none";
} else if (phonePattern.test(input)) {
console.log("Input is a phone number.");
errorMessageElement.style.display = "none";
successMessageElement.style.display = "block";
submitButton.style.display = "none";
} else {
console.log("Input is neither a valid email nor a phone number.");
errorMessageElement.textContent =
"Please enter a valid email or phone number.";
errorMessageElement.style.display = "block";
successMessageElement.style.display = "none";
submitButton.style.display = "block";
}
}
</script>
</head>
<body>
<section class="main-section text-center">
<div class="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-3">
<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 mb-2"
>
<h2 class="m-0 text-white">Coming Soon</h2>
</div>
<h4 class="mt-3 text-white text-center mb-4 where">
In the meantime, let's talk about what else is coming! Not all discs
will be claimed, but they can still be rescued! The DRN Shop will
bring quality, affordable discs for purchase. <br />
<br />
<span class="text-white"
>Get notified when we launch for
<span style="text-decoration: underline">20% off</span>
your first order!</span
>
</h4>
<div
class="d-flex align-items-center flex-column text-center mb-0"
style="width: 100%"
>
<input
type="text"
class="form-control"
style="max-width: 610px !important"
id="inputContact"
placeholder="Phone Number or Email for Notification"
/>
<div
id="error"
style="color: var(--primary-red); display: none"
></div>
<div
id="success"
style="color: var(--primary-green); display: none"
>
This is a demo. If you would like to opt in, visit our website <a href="https://www.discrescuenetwork.com" style="text-decoration: underline; color: var(--primary-white);">here</a>
</div>
<div class="btn-container">
<button
class="newsletterButton red text-white mt-2 mb-3"
style="width: 90%"
onClick="signUp()"
>
Get notified when the deals are live
</button>
</div>
</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 class="wizardbox d-flex align-items-center">
<img src="./assets/arrow-down.png" alt="arrow">
<p>if you don’t want to use the wizard you can always just enter
the information manually on our search page</p>
</div> -->
</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>
<!-- <button class="btnaction"><img class="btnlogo" src="./assets/app_center_btn_logo.png" alt="btnlogo"></button> -->
</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/bootstrap.bundle.min.js"></script> -->
</body>
</html>