From b9048e331ac453a3e4309fc42121009013ef77e5 Mon Sep 17 00:00:00 2001 From: jenseni-git Date: Sat, 17 Aug 2024 04:07:59 +1000 Subject: [PATCH 1/5] Re-formats indentation. No changes. --- static/hackathon_countdown.html | 382 ++++++++++++++++---------------- 1 file changed, 194 insertions(+), 188 deletions(-) diff --git a/static/hackathon_countdown.html b/static/hackathon_countdown.html index c98b6a8..5bdbef8 100644 --- a/static/hackathon_countdown.html +++ b/static/hackathon_countdown.html @@ -1,191 +1,197 @@ - - - Hackathon Countdown - - - - - -
- - - - - -
-
-

Announcements

-
-
- - - - - + + #announcements { + display: none; + /* Toggled with JS */ + } + + #announcements h1 { + margin: 0 0 var(--padding) 0; + font-size: 2em; + font-weight: bold; + font-family: Lucida Console, monospace; + } + + #announcements div { + border: none; + height: fit-content; + width: 100%; + resize: none; + overflow: hidden; + font-family: Lucida Console, monospace; + font-size: 1.2em; + } + + #timer { + --size: 8em; + position: fixed; + font-family: Lucida Console, monospace; + font-size: var(--size); + font-weight: bold; + text-shadow: + 3px 3px 0 #FFF, + -3px 3px 0 #FFF, + -3px -3px 0 #FFF, + 3px -3px 0 #FFF; + top: 50%; + left: 50%; + /* bring your own prefixes */ + transform: translate(-50%, -50%); + } + + Hackathon Countdown + + + + + +
+ + + + + +
+
+

Announcements

+
+
+ + + + + \ No newline at end of file From 63db8eca04d993a6ecf3c7d525b7a5c869e7ed69 Mon Sep 17 00:00:00 2001 From: jenseni-git Date: Sat, 17 Aug 2024 04:10:23 +1000 Subject: [PATCH 2/5] iframe with youtube is disabled, preventing accidental clicking. --- static/hackathon_countdown.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/hackathon_countdown.html b/static/hackathon_countdown.html index 5bdbef8..a050004 100644 --- a/static/hackathon_countdown.html +++ b/static/hackathon_countdown.html @@ -101,7 +101,7 @@
- - - - - + + + + + + + + + + + + + +

Announcements

From 159ab403adda0a32af1a834cf211b07d9384fab0 Mon Sep 17 00:00:00 2001 From: jenseni-git Date: Sat, 17 Aug 2024 13:49:29 +1000 Subject: [PATCH 4/5] Adds hourly gong --- static/hackathon_countdown.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/hackathon_countdown.html b/static/hackathon_countdown.html index f782fb5..7201b16 100644 --- a/static/hackathon_countdown.html +++ b/static/hackathon_countdown.html @@ -184,6 +184,11 @@

Announcements

let minutes = Math.floor(time_diff / (1000 * 60)) % 60; let seconds = Math.floor(time_diff / 1000) % 60; text = "" + leftpad_with_zeros(hours, 2) + ":" + leftpad_with_zeros(minutes, 2) + ":" + leftpad_with_zeros(seconds, 2); + + if (hours <= 24 && minutes == 0 && seconds == 0) { + let audio = new Audio('https://vetinari.net/bell.mp3'); + audio.play(); + } } timer.textContent = text; }, 1000); From 6345ac9ed5c8fa4cd37fc355f41facb729960da7 Mon Sep 17 00:00:00 2001 From: jenseni-git Date: Sat, 17 Aug 2024 13:50:46 +1000 Subject: [PATCH 5/5] increases refresh rate of timer --- static/hackathon_countdown.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/hackathon_countdown.html b/static/hackathon_countdown.html index 7201b16..8f71e94 100644 --- a/static/hackathon_countdown.html +++ b/static/hackathon_countdown.html @@ -191,7 +191,7 @@

Announcements

} } timer.textContent = text; - }, 1000); + }, 100); const announcements_option = document.getElementById("show-announcements"); const announcements_element = document.getElementById("announcements");