Progressbar added

This commit is contained in:
Felix Homa 2022-08-10 18:55:59 +02:00
parent 744ed0a1d6
commit 4ef7e30cfc
Signed by: felix.homa
GPG Key ID: 43610F311720D3DA
1 changed files with 9 additions and 1 deletions

View File

@ -22,6 +22,7 @@
<h1 align="center" id="titleh1">Klausurhelfer</h1>
</div>
<div id="clock_div">
<progress style="width: 100vw;height: 3vh; background-color: #fff;" value="0" max="100" id="timebar">&nbsp;</progress>
<h1 id="clock" class="time" style="text-align: center">...</h1>
</div>
<div id="left">
@ -286,7 +287,14 @@
/*
* "Große"-Uhr aktualisieren
*/
document.getElementById("clock").innerHTML = now.getHours() + ":" + (now.getMinutes()<10?"0":"")+now.getMinutes();
document.getElementById("clock").innerHTML = (now.getHours()<10?"&nbsp;":"")+now.getHours() + ":" + (now.getMinutes()<10?"0":"")+now.getMinutes();
if(endTime!=null) {
var dur = endTime-startTime;
var rem = endTime-now;
var per = 100-(rem/dur*100);
document.getElementById("timebar").value=per;
document.getElementById("timebar").max=100;
}
/*
* Hintergrund signalisierung: