diff --git a/site/vue/css/style.css b/site/vue/css/style.css index 562333a..e2032df 100644 --- a/site/vue/css/style.css +++ b/site/vue/css/style.css @@ -267,4 +267,8 @@ hr{ max-width: 95%; margin:2%; transition: 1.5s; +} +.fa-star{ + font-size: 10vh; + cursor: default; } \ No newline at end of file diff --git a/site/vue/index.html b/site/vue/index.html index db3144f..f774488 100644 --- a/site/vue/index.html +++ b/site/vue/index.html @@ -111,7 +111,14 @@

Niveau max :


Entrez votre pseudo :

- +
+
+
+

+ + + +

diff --git a/site/vue/js/timer.js b/site/vue/js/timer.js index 84fda48..4b0b1a0 100644 --- a/site/vue/js/timer.js +++ b/site/vue/js/timer.js @@ -28,10 +28,19 @@ timer.addEventListener('secondsUpdated', function (e) { function endTime() { if(!isTuto){ document.querySelector("#mainPage").style.display = 'block'; - document.querySelector("#playPage").style.display = 'none'; - document.querySelector("#scoreTotGameOver").innerHTML = (niveauActuel * (50 / timeTot)).toFixed(2); - document.querySelector("#niveauGameOver").innerHTML = niveauActuel; - document.querySelector("#TempsTotGameOver").innerHTML = timeTot; + var score = (niveauActuel * (50 / timeTot)).toFixed(2); + document.querySelector("#playPage").style.display = 'none'; + document.querySelector("#scoreTotGameOver").innerHTML = score; + document.querySelector("#niveauGameOver").innerHTML = niveauActuel; + document.querySelector("#TempsTotGameOver").innerHTML = timeTot; + //calcul stars + if(score < 10){ + document.querySelector("#star1").style.color = "#fe8a71"; + }else if(score > 10 || score < 50){ + document.querySelector("#star2").style.color = "#fe8a71"; + }else if(score > 10 || score < 50){ + document.querySelector("#star2").style.color = "#fe8a71"; + } openModal('gameOver'); }