Skip to content

Commit 8a5a215

Browse files
committed
Update score and highscore boxes in standard themes
1 parent e28e42c commit 8a5a215

File tree

4 files changed

+42
-4
lines changed

4 files changed

+42
-4
lines changed

index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
</div>
4141
<div class="score-wrap-box">
4242
<div class="score-box">
43-
<span class="score-label">Score:</span>
43+
<span class="score-label">Score</span>
4444
<span class="score" id="score"></span>
4545
</div>
4646
<div class="space"></div>
4747
<div class="highscore-box">
48-
<span class="score-label">Highscore:</span>
48+
<span class="score-label">Best</span>
4949
<span class="highscore" id="highscore"></span>
5050
</div>
5151
</div>

src/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -437,14 +437,20 @@ document.addEventListener("DOMContentLoaded", async () => {
437437
});
438438
}
439439
const welcomeText = document.querySelector(".classic-welcome-text") as HTMLElement;
440+
const scoreLabel = document.querySelector(".score-box > .score-label") as HTMLElement;
441+
const highscoreLabel = document.querySelector(".highscore-box > .score-label") as HTMLElement;
440442
if (selectedTheme === CLASSIC_THEME) {
441443
welcomeText.style.display = "block";
442444
classicTimeout = setTimeout(() => {
443445
welcomeText.style.display = "";
444446
}, 5000);
447+
scoreLabel.innerText = "Score:";
448+
highscoreLabel.innerText = "Highscore:";
445449
} else {
446450
clearTimeout(classicTimeout);
447451
welcomeText.style.display = "";
452+
scoreLabel.innerText = "Score";
453+
highscoreLabel.innerText = "Best";
448454
}
449455
};
450456

src/styles/game/menu.css

+24-2
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,32 @@
4747

4848
.top-menu > .menu-options > .score-wrap-box {
4949
display: flex;
50-
flex-direction: column;
51-
align-items: flex-end;
50+
justify-content: flex-end;
5251
}
5352

5453
.score-box {
5554
position: relative;
5655
}
56+
57+
body:not(.classic) .score-box,
58+
body:not(.classic) .highscore-box {
59+
display: flex;
60+
flex-direction: column;
61+
justify-content: center;
62+
align-items: center;
63+
padding: 4px;
64+
min-width: 50px;
65+
background-color: lightgray;
66+
}
67+
68+
body:not(.classic) .score-box > .score-label,
69+
body:not(.classic) .highscore-box > .score-label {
70+
text-transform: uppercase;
71+
font-weight: bold;
72+
font-size: 12px;
73+
color: #6b6b6b;
74+
}
75+
76+
body:not(.classic) .score-wrap-box {
77+
gap: 6px;
78+
}

src/styles/themes/dark.css

+10
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,13 @@ body.dark button.button > * {
6262
color: #f2f2f2;
6363
font-weight: bold;
6464
}
65+
66+
body.dark .score-box,
67+
body.dark .highscore-box {
68+
background-color: grey;
69+
}
70+
71+
body.dark .score-box > .score-label,
72+
body.dark .highscore-box > .score-label {
73+
color: white;
74+
}

0 commit comments

Comments
 (0)