diff --git a/bbc_60sec.mp3 b/bbc_60sec.mp3 new file mode 100644 index 0000000..49afa4b Binary files /dev/null and b/bbc_60sec.mp3 differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..b5c7b80 --- /dev/null +++ b/index.html @@ -0,0 +1,24 @@ + + + + + + + + + The News at X + + + + + + +

0

+ + + + \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..f590198 --- /dev/null +++ b/script.js @@ -0,0 +1,28 @@ +/* +© (copyright) 2021. Available under the GPLv3. See LICENSE for details. +*/ + +window.onload = function () { + var counter = document.getElementById('count'); + var starter = document.getElementById('start'); + var audio = document.getElementById('audio'); + + starter.onclick = function () { + // let's go! + audio.play(); + starter.disabled = true; + document.title = ("The News at " + new Date().getHours() + ":" + (new Date().getMinutes() + 1)); + }; + + audio.onended = function () { + starter.disabled = false; + document.title = "The News at X"; + }; + + setInterval(function () { + counter.innerHTML = 60 - new Date().getSeconds(); + if (audio.paused == true) { + audio.currentTime = new Date().getSeconds(); + } + }, 10); +}; \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..587771a --- /dev/null +++ b/style.css @@ -0,0 +1,57 @@ +/* +© (copyright) 2021. Available under the GPLv3. See LICENSE for details. +*/ + +@import url('https://rsms.me/inter/inter.css'); + +html { + font-family: 'Inter', sans-serif; + font-feature-settings: "tnum", "cv03", "cv04", "cv09"; + font-style: italic; + background-color: black; + color: white; + text-align: center; +} + +p#count { + font-weight: 600; + font-size: 500px; + line-height: 100vh; + height: 100vh; + margin: 0; +} + +button { + color: white; + background-color: black; + border: 2px white solid; + border-radius: 10px; + font-family: 'Inter', sans-serif; + font-weight: 500; + font-size: 20px; + padding: 10px 15px; + position: fixed; + bottom: 10px; + left: 0; + right: 0; + width: 500px; + margin: 0px auto; + transition: 0.5s all; + cursor: pointer; +} + +button:hover { + color: black; + background-color: white; +} + +button:disabled { + opacity: 10%; + cursor: not-allowed; +} + +button:disabled:hover { + color: white; + background-color: black; + opacity: 10%; +} \ No newline at end of file