init
This commit is contained in:
commit
ce1095bb24
27 changed files with 621 additions and 0 deletions
31
app/static/js/main.js
Normal file
31
app/static/js/main.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
function startCountdown() {
|
||||
const beep = new Audio("/static/sounds/beep.wav");
|
||||
const go = new Audio("/static/sounds/go.wav");
|
||||
|
||||
setTimeout(() => {
|
||||
document.getElementById("licht1").classList.add("aktiv");
|
||||
beep.play();
|
||||
}, 1000);
|
||||
|
||||
setTimeout(() => {
|
||||
document.getElementById("licht2").classList.add("aktiv");
|
||||
beep.play();
|
||||
}, 2000);
|
||||
|
||||
setTimeout(() => {
|
||||
document.getElementById("licht3").classList.add("aktiv");
|
||||
beep.play();
|
||||
}, 3000);
|
||||
|
||||
setTimeout(() => {
|
||||
document.querySelectorAll(".licht").forEach(el => {
|
||||
el.classList.remove("rot");
|
||||
el.classList.add("gruen");
|
||||
});
|
||||
go.play();
|
||||
}, 4000);
|
||||
|
||||
setTimeout(() => {
|
||||
window.location.href = "/rennen";
|
||||
}, 7000);
|
||||
}
|
||||
Reference in a new issue