Add leaderboard component to UI and API endpoint to fetch player rankings.

This commit is contained in:
IM23a-spirgif
2025-06-20 19:43:15 +02:00
parent 754422d043
commit 3893c144bf
4 changed files with 122 additions and 11 deletions
+48
View File
@@ -136,4 +136,52 @@ button.logout {
height: 100vh;
background: transparent;
pointer-events: none;
}
.leaderboard {
position: absolute;
top: 100px;
left: 20px;
background: rgba(0, 0, 0, 0.7);
border: 2px solid #0f0;
border-radius: 10px;
padding: 20px;
width: 200px;
color: #0f0;
font-family: monospace;
box-shadow: 0 0 10px #0f0;
z-index: 1;
}
.leaderboard h3 {
margin-top: 0;
font-size: 18px;
text-align: center;
text-shadow: 0 0 5px #0f0;
}
.leaderboard ul {
list-style: none;
padding: 0;
margin: 0;
}
.leaderboard li {
margin: 5px 0;
font-size: 14px;
text-shadow: 0 0 3px #0f0;
}
.leaderboard li.you {
font-weight: bold;
color: #ff0;
text-shadow: 0 0 5px #ff0;
}
.your-rank {
margin-top: 10px;
font-size: 14px;
color: #fff;
text-align: center;
text-shadow: 0 0 3px #0f0;
}