mirror of
https://codeberg.org/JasterV/MEMORY-CARD-GAME.git
synced 2026-04-26 18:20:03 +00:00
🎠👂 Checkpoint
./index.html:18108127/5 ./script.js:18108127/191 ./style.css:18108127/60
This commit is contained in:
parent
88bc37a046
commit
b38a58bcaf
3 changed files with 9 additions and 4 deletions
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="congrats-container">
|
||||
<div class="congrats-container hide">
|
||||
<h1>
|
||||
You win! 🎉
|
||||
</h1>
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ function scoreBarController(barId) {
|
|||
setUserTime(username, seconds) {
|
||||
if (this.hasUser(username)) {
|
||||
let userContainer = this.getUser(username);
|
||||
userContainer.lastElementChild.textContent = `${seconds} seconds`;
|
||||
userContainer.lastElementChild.innerHTML = `<i class="fas fa-stopwatch"></i> ${Math.floor(seconds)} seconds`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -174,7 +174,7 @@ function isGameEnd(discoveredCards, cards) {
|
|||
function finishGame(username) {
|
||||
let finalTimeSpan = document.getElementById("user-seconds");
|
||||
let totalSeconds = (Date.now() - startTime) / 1000;
|
||||
finalTimeSpan.textContent = `${totalSeconds} seconds`;
|
||||
finalTimeSpan.textContent = `${Math.floor(totalSeconds)} seconds`;
|
||||
|
||||
scoresController.setUserTime(username, totalSeconds);
|
||||
|
||||
|
|
|
|||
|
|
@ -233,9 +233,14 @@ strong {
|
|||
width: 35px;
|
||||
}
|
||||
|
||||
.fa-stopwatch {
|
||||
font-size: 18px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
@media (max-height: 865px) {
|
||||
#user-scores {
|
||||
max-height: 73%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue