diff --git a/static/js/control.js b/static/js/control.js new file mode 100644 index 0000000..49881a2 --- /dev/null +++ b/static/js/control.js @@ -0,0 +1,3 @@ +function save() { + +} diff --git a/static/js/game.js b/static/js/game.js new file mode 100644 index 0000000..9250c10 --- /dev/null +++ b/static/js/game.js @@ -0,0 +1,54 @@ +var modal = document.getElementById('id01'); + // When the user clicks anywhere outside of the modal, close it + window.onclick = (event) => + if (event.target == modal) + modal.style.display = "none"; + + window.onload = function () { + var seconds = 00; + var tens = 00; + var appendTens = document.getElementById("tens") + var appendSeconds = document.getElementById("seconds") + var buttonStart = document.getElementById('button-start'); + var buttonStop = document.getElementById('button-stop'); + var buttonReset = document.getElementById('button-reset'); + var Interval ; + var time = seconds + tens; + + buttonStart.onclick = function() { + clearInterval(Interval); + Interval = setInterval(startTimer, 10); + } + + buttonStop.onclick = () => + clearInterval(Interval); + + buttonReset.onclick = function() { + clearInterval(Interval); + tens = "00"; + seconds = "00"; + appendTens.innerHTML = tens; + appendSeconds.innerHTML = seconds; + } + + function startTimer () { + tens++; + + if(tens <= 9) + appendTens.innerHTML = "0" + tens; + + if (tens > 9) + appendTens.innerHTML = tens; + + if (tens > 99) { + console.log("seconds"); + seconds++; + appendSeconds.innerHTML = "0" + seconds; + tens = 0; + appendTens.innerHTML = "0" + 0; + } + + if (seconds > 9) + appendSeconds.innerHTML = seconds; + } +} diff --git a/templates/session.html b/templates/session.html index 455632a..7afa219 100644 --- a/templates/session.html +++ b/templates/session.html @@ -11,8 +11,100 @@
- - + + + +{{ asd }}
+Füge ein Event ein
+ + + +00:00
+ + + + +{{ asd }}
+
+ {% block content %}
+ {{das}}
+{{der}}
+ +{{er}}
+
+
+ An dieser Stelle sollen später die User angezeigt werden, und der Session Admin kann diese dann verwalten
+