diff --git a/main/static/assets/css/common.css b/main/static/assets/css/common.css index 4fc86e2..5efbc22 100644 --- a/main/static/assets/css/common.css +++ b/main/static/assets/css/common.css @@ -115,7 +115,7 @@ body { text-align: right; } .overlay p { - font-size: 20px; + font-size: 16px; color: #FFFFFF; margin: 0 auto; } diff --git a/main/templates/minesweeper.html b/main/templates/minesweeper.html index 77d7731..01c056f 100644 --- a/main/templates/minesweeper.html +++ b/main/templates/minesweeper.html @@ -47,7 +47,7 @@

CHECKMATE 18_

- 0 Seconds + 01:00:00 @@ -161,13 +161,22 @@

CHECKMATE 18_

var timeleft2 = timeleft1-1; var downloadTimer = setInterval(function(){ document.getElementById("progressBar").value = 7200 - --timeleft1; - document.getElementById("countdowntimer").textContent = timeleft2--; + timeleft2--; + var seconds = (timeleft2%60); + var minutes = Math.floor((timeleft2/60)%60); + var hours = Math.floor((timeleft2/3600)) + var timeText = pad(hours) + " : " + pad(minutes) + " : " + pad(seconds); + // console.log(timeleft2) + document.getElementById("countdowntimer").textContent = timeText; if(timeleft1 <= 0){ clearInterval(downloadTimer); gameOver(); } },1000); + function pad(text){ + return ("00" + text).slice(-2); + } function openInst(){ window.location.href = "/main/welcome"