Bestenliste

This commit is contained in:
2025-05-02 12:38:45 +02:00
parent dad3d8826d
commit b36d7a4274
4 changed files with 40 additions and 13 deletions

View File

@@ -32,6 +32,13 @@
</th>
</thead>
</table>
<div id="siteSelector">
<label for="site">Seite</label>
<select id="site" name="site">
<option>1</option>
<option>2</option>
</select>
</div>
</div>
</div>
<div class="container">

View File

@@ -8,19 +8,19 @@ class HighScoreLoader{
}
async setup(){
const response = await fetch("/api/highscore");
this.data = await response.json();
// const response = await fetch("/api/highscore");
// this.data = await response.json();
for(const score of this.data.scores){
this.table.innerHTML += `
<tr>
<td>${score.rang}</td>
<td>${score.user1.username}</td>
<td>${score.user2.username}</td>
<td>${score.score}</td>
</tr>
`
}
// for(const score of this.data.scores){
// this.table.innerHTML += `
// <tr>
// <td>${score.rang}</td>
// <td>${score.user1.username}</td>
// <td>${score.user2.username}</td>
// <td>${score.score}</td>
// </tr>
// `;
// }
}
}

View File

@@ -65,4 +65,12 @@ tr td:nth-child(3) {
}
tr td:last-child {
border-left: 3px solid rgba(255, 255, 255, 0.6);
}
}
#siteSelector{
display: flex;
align-items: center;
justify-content: center;
}