From c44a3de1c0ac95a6b04e340bc05cade0486aa0ff Mon Sep 17 00:00:00 2001 From: mpax235 Date: Mon, 30 Dec 2024 21:19:19 -0800 Subject: [PATCH] we wish you a merry christmas, we wish you a merry christmas, we wish you a merry christmas, and a happy new year! --- css/index.css | 30 +++++++++++++++++++++++++++++- index.html | 6 ++++++ js/index.js | 26 +++++++++++++++++++++++++- 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/css/index.css b/css/index.css index 95ffeaf..fa49912 100644 --- a/css/index.css +++ b/css/index.css @@ -34,6 +34,33 @@ body { color: #00ffff; } +#time { + font-size: 35px; +} + +#happynewyear { + background-color: #ff000015; + backdrop-filter: blur(7px); + color: #ff0000; + border-radius: 12px; + border: 1px solid rgba(255, 0, 0, 0.18); + animation: newyear 1.5s ease-in-out infinite; +} + +@keyframes newyear { + 0% { + color: #ff0000; + } + + 50% { + color: #ff000000; + } + + 100% { + color: #ff0000; + } +} + button { background-color: #161616; border: none; @@ -387,4 +414,5 @@ td, th { .columninnertext h5 { font-weight: normal; -} \ No newline at end of file +} + diff --git a/index.html b/index.html index a1dbd7a..a179002 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,12 @@

The footer is back, but as always, welcome to my website!

+
+ Time until 2025 starts +
+ Please wait... +
+
Welcome! This is the official website of mpax235!

This website is currently a W.I.P, so for more stuff come back soon.

diff --git a/js/index.js b/js/index.js index 912b03c..0b92cd4 100644 --- a/js/index.js +++ b/js/index.js @@ -1,3 +1,27 @@ //setTimeout(function() { // window.location.href = "https://mpax235.github.io/maintenance.html"; -//}, 0); \ No newline at end of file +//}, 0); + +function updateCountdown() { + const now = new Date(); + const targetDate = new Date('January 1, 2025 00:00:00'); + const timeDifference = targetDate - now; + + if (timeDifference <= 0) { + document.getElementById('time').innerHTML = '
HAPPY NEW YEAR!
'; + clearInterval(interval); + return; + } + + const days = Math.floor(timeDifference / (1000 * 60 * 60 * 24)).toString().padStart(2, '0'); + const hours = Math.floor((timeDifference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)).toString().padStart(2, '0'); + const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60)).toString().padStart(2, '0'); + const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000).toString().padStart(2, '0'); + + document.getElementById('time').innerHTML = ` +
${days}:${hours}:${minutes}:${seconds}
+ `; +} + +const interval = setInterval(updateCountdown, 1000); +updateCountdown(); \ No newline at end of file