-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: DefinetlyNotAI <[email protected]>
- Loading branch information
1 parent
9912c1d
commit 9eb785e
Showing
7 changed files
with
28 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
const themeRevealDate = new Date("December 1, 2024 00:00:00").getTime(); | ||
const hackathonStartDate = new Date("December 13, 2024 00:00:00").getTime(); | ||
const hackathonEndDate = new Date("December 15, 2024 00:00:00").getTime(); | ||
const RegisterDate = new Date("December 1, 2024 00:00:00").getTime(); | ||
const StartDate = new Date("December 13, 2024 00:00:00").getTime(); | ||
const EndDate = new Date("December 15, 2024 00:00:00").getTime(); | ||
|
||
const countdownTimer = setInterval(() => { | ||
const now = Date.now(); | ||
let message; | ||
let extraMessage = ""; | ||
|
||
if (now < themeRevealDate) { | ||
const timeLeft = themeRevealDate - now; | ||
message = `Theme reveal in ${Math.floor(timeLeft / (1000 * 60 * 60 * 24))} days, ${Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))} hours, ${Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60))} minutes, and ${Math.floor((timeLeft % (1000 * 60)) / 1000)} seconds.`; | ||
} else if (now < hackathonStartDate) { | ||
const timeLeft = hackathonStartDate - now; | ||
<!-- What are you lookin here for?? We aint leakin the theme lil bro --> | ||
message = `The theme is NAHHH! Start Practicing 🤗!`; | ||
extraMessage = `Competition in ${Math.floor(timeLeft / (1000 * 60 * 60 * 24))} days, ${Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))} hours, ${Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60))} minutes, and ${Math.floor((timeLeft % (1000 * 60)) / 1000)} seconds.<br><br>Very important, DO NOT finish the project! You won't be allowed to enter the competition if you do. You are allowed to finish the project up to 60% - This will be decided by the organisers.`; | ||
} else if (now <= hackathonEndDate) { | ||
message = "The Official Wesgreen Hackathon has begun!"; | ||
if (now < RegisterDate) { | ||
const timeLeft = RegisterDate - now; | ||
message = `WesMun Registration Start in ${Math.floor(timeLeft / (1000 * 60 * 60 * 24))} days, ${Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))} hours, ${Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60))} minutes, and ${Math.floor((timeLeft % (1000 * 60)) / 1000)} seconds.`; | ||
} else if (now < StartDate) { | ||
const timeLeft = StartDate - now; | ||
message = `WesMun Start in ${Math.floor(timeLeft / (1000 * 60 * 60 * 24))} days, ${Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))} hours, ${Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60))} minutes, and ${Math.floor((timeLeft % (1000 * 60)) / 1000)} seconds.`; | ||
} else if (now <= EndDate) { | ||
message = "The Official WesMun has begun!"; | ||
} else { | ||
message = "The Official Wesgreen Hackathon has ended."; | ||
message = "The Official WesMun has ended."; | ||
} | ||
|
||
document.getElementById("countdown").innerHTML = message + (extraMessage ? `<br>${extraMessage}` : ""); | ||
|
||
if (now > hackathonEndDate) clearInterval(countdownTimer); | ||
if (now > EndDate) clearInterval(countdownTimer); | ||
}, 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters