Skip to content

Commit af36abf

Browse files
registration
1 parent 314be98 commit af36abf

File tree

2 files changed

+55
-41
lines changed

2 files changed

+55
-41
lines changed

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"liveServer.settings.port": 5501
3+
}

js/main.js

+52-41
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,38 @@
11
console.log("This is ThetaHacks");
22

3-
43
if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
54
// Special iPad css
65
$("head").append(
76
'<link rel="stylesheet" type="text/css" href="css/ipad.css">'
87
);
9-
document.getElementById('banner').style.display = "block";
8+
document.getElementById("banner").style.display = "block";
109
}
1110

12-
13-
14-
window.mobileCheck = function() {
11+
window.mobileCheck = function () {
1512
let check = false;
16-
(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);
13+
(function (a) {
14+
if (
15+
/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(
16+
a
17+
) ||
18+
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(
19+
a.substr(0, 4)
20+
)
21+
)
22+
check = true;
23+
})(navigator.userAgent || navigator.vendor || window.opera);
1724
return check;
1825
};
1926

2027
console.log(window.mobileCheck());
2128

22-
if(window.mobileCheck()) {
29+
if (window.mobileCheck()) {
2330
$("head").append(
2431
'<link rel="stylesheet" type="text/css" href="css/ipad.css">'
2532
);
26-
document.getElementById('banner').style.display = "block";
33+
document.getElementById("banner").style.display = "block";
2734
}
2835

29-
3036
function showSVG() {
3137
var path = document.querySelector(".mainpath");
3238
var length = path.getTotalLength();
@@ -142,7 +148,6 @@ $(window).resize(function () {
142148
el.addClass("animate__fadeIn");
143149
}
144150
});
145-
146151
});
147152

148153
var scheduleDone = false;
@@ -219,20 +224,17 @@ function shiftBackward() {
219224
document.getElementById("day").innerHTML = "Friday 1/15";
220225
document.getElementById("schedSat").style.display = "none";
221226
document.getElementById("schedFri").style.display = "block";
222-
}
223-
else if (shiftDay == "Friday 1/15") {
227+
} else if (shiftDay == "Friday 1/15") {
224228
shiftDay = "Monday 1/18";
225229
document.getElementById("day").innerHTML = "Monday 1/18";
226230
document.getElementById("schedFri").style.display = "none";
227231
document.getElementById("schedMon").style.display = "block";
228-
}
229-
else if (shiftDay == "Monday 1/18") {
232+
} else if (shiftDay == "Monday 1/18") {
230233
shiftDay = "Sunday 1/17";
231234
document.getElementById("day").innerHTML = "Sunday 1/17";
232235
document.getElementById("schedMon").style.display = "none";
233236
document.getElementById("schedSun").style.display = "block";
234-
}
235-
else if (shiftDay == "Sunday 1/17") {
237+
} else if (shiftDay == "Sunday 1/17") {
236238
shiftDay = "Saturday 1/16";
237239
document.getElementById("day").innerHTML = "Saturday 1/16";
238240
document.getElementById("schedSun").style.display = "none";
@@ -246,81 +248,90 @@ function shiftForward() {
246248
document.getElementById("day").innerHTML = "Sunday 1/17";
247249
document.getElementById("schedSat").style.display = "none";
248250
document.getElementById("schedSun").style.display = "block";
249-
}
250-
else if (shiftDay == "Sunday 1/17") {
251+
} else if (shiftDay == "Sunday 1/17") {
251252
shiftDay = "Monday 1/18";
252253
document.getElementById("day").innerHTML = "Monday 1/18";
253254
document.getElementById("schedSun").style.display = "none";
254255
document.getElementById("schedMon").style.display = "block";
255-
}
256-
else if (shiftDay == "Monday 1/18") {
256+
} else if (shiftDay == "Monday 1/18") {
257257
shiftDay = "Friday 1/15";
258258
document.getElementById("day").innerHTML = "Friday 1/15";
259259
document.getElementById("schedMon").style.display = "none";
260260
document.getElementById("schedFri").style.display = "block";
261-
}
262-
else if (shiftDay == "Friday 1/15") {
261+
} else if (shiftDay == "Friday 1/15") {
263262
shiftDay = "Saturday 1/16";
264263
document.getElementById("day").innerHTML = "Saturday 1/16";
265264
document.getElementById("schedFri").style.display = "none";
266265
document.getElementById("schedSat").style.display = "block";
267266
}
268267
}
269268

270-
271-
272269
$(".volunteer-container").flickity({
273-
cellAlign: 'left',
270+
cellAlign: "left",
274271
contain: true,
275-
groupCells: '80%',
272+
groupCells: "80%",
276273
autoPlay: 2500,
277-
wrapAround: true
274+
wrapAround: true,
278275
});
279276

280277
function getTime(countdownTime) {
281278
// Get today's date and time
282279
var now = new Date().getTime();
283280
// Find the distance between now and the count down date
284281
var distance = countdownTime - now;
285-
282+
286283
// Time calculations for days, hours, minutes and seconds
287284
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
288285
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
289286
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
290287
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
291-
return days + "d " + " • " + hours + "h " + " • " + minutes + "m " + " • " + seconds + "s ";
288+
return (
289+
days +
290+
"d " +
291+
" • " +
292+
hours +
293+
"h " +
294+
" • " +
295+
minutes +
296+
"m " +
297+
" • " +
298+
seconds +
299+
"s "
300+
);
292301
}
293302

294303
function getDistance(countdownTime) {
295304
var now = new Date().getTime();
296305
distance = countdownTime - now;
297306
}
298307

299-
var signupCountDown = setInterval(function() {
300-
var countDownDate = new Date("Jan 10, 2021 12:00:00").getTime() - 8;
308+
var signupCountDown = setInterval(function () {
309+
var countDownDate = new Date("Jan 15, 2021 12:00:00").getTime() - 8;
301310
// Output the result in an element with id="registerBy"
302-
document.getElementById("registerBy").innerHTML = "Registration ends in: " + getTime(countDownDate);
311+
document.getElementById("registerBy").innerHTML =
312+
"Registration ends in: " + getTime(countDownDate);
303313

304-
// If the count down is over, write some text
314+
// If the count down is over, write some text
305315
if (getDistance(countDownDate) < 0) {
306316
clearInterval(countDown);
307317
document.getElementById("registerBy").innerHTML = "Sign Ups Closed";
308318
document.getElementById("gb10").href = "https://thetahacks.tech";
309319
document.getElementById("gb10").innerHTML = "Sign Ups are Closed";
310-
document.getElementById("gb10").style.display = 'none';
320+
document.getElementById("gb10").style.display = "none";
311321
}
312322
}, 1000);
313323

314-
var eventCountDown = setInterval(function() {
324+
var eventCountDown = setInterval(function () {
315325
var amongUsHypeNight = new Date("Jan 15, 2021 21:00:00").getTime() - 8;
316-
var openingCermony = new Date("Jan 16, 2021 10:00:00").getTime() -8;
326+
var openingCermony = new Date("Jan 16, 2021 10:00:00").getTime() - 8;
317327
var date = new Date();
318328
if (date.getDay > 10 && date.getMonth == 1 && date.getFullYear == 2021) {
319329
if (getDistance(amongUsHypeNight) > 0) {
320-
document.getElementById("registerBy").innerHTML = "Among Us Hype Night Starts in: " + getTime(amongUsHypeNight);
321-
}
322-
else if (getDistance(openingCermony) > 0) {
323-
document.getElementById("registerBy").innerHTML = "Opening Ceremony Starts in: " + getTime(openingCermony);
330+
document.getElementById("registerBy").innerHTML =
331+
"Among Us Hype Night Starts in: " + getTime(amongUsHypeNight);
332+
} else if (getDistance(openingCermony) > 0) {
333+
document.getElementById("registerBy").innerHTML =
334+
"Opening Ceremony Starts in: " + getTime(openingCermony);
324335
}
325336
}
326-
}, 1000);
337+
}, 1000);

0 commit comments

Comments
 (0)