mirror of
https://github.com/lucaspalomodevelop/Party.git
synced 2026-03-15 08:44:36 +00:00
130 lines
3.4 KiB
HTML
130 lines
3.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='../static/css/style.css') }}">
|
|
<title>Game</title>
|
|
</head>
|
|
<body>
|
|
<center>
|
|
|
|
<script>
|
|
var modal = document.getElementById('id01');
|
|
|
|
// When the user clicks anywhere outside of the modal, close it
|
|
window.onclick = function(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 = function() {
|
|
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;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
</script>
|
|
<center><h1>Games</h1></center>
|
|
|
|
|
|
<div class="wrapper">
|
|
<center>
|
|
|
|
<p><span id="seconds">00</span>:<span id="tens">00</span></p>
|
|
<button id="button-start">Start</button>
|
|
<button id="button-stop">Stop</button>
|
|
<button id="button-reset">Reset</button>
|
|
<form class="modal-content animate" action="http://127.0.0.1:5000/stopuhr" method="POST">
|
|
<div class="container">
|
|
</br>
|
|
<input type="text" placeholder="Tomb Raider" name="spiel" required>
|
|
<input type="text" placeholder="parcour" name="art" required>
|
|
|
|
<button type="submit">➕</button>
|
|
<button type="submit">📁</button>
|
|
|
|
</div>
|
|
</form>
|
|
|
|
|
|
</center>
|
|
</div>
|
|
<div id="statistik">
|
|
|
|
<h1>Spiele-Statistiken</h1>
|
|
{% block content %}
|
|
|
|
|
|
{% for post in asd %}
|
|
|
|
<p>{{ asd }}</p>
|
|
|
|
<hr>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
</div>
|
|
|
|
|
|
</center>
|
|
</body>
|
|
</html> |