Bestenliste
This commit is contained in:
@@ -39,6 +39,18 @@ class ScoreManager{
|
|||||||
|
|
||||||
return allSortetScores.indexOf(score) + 1;
|
return allSortetScores.indexOf(score) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getSplitedScoreCount(){
|
||||||
|
const allSortetScores = await this.getAllScores();
|
||||||
|
|
||||||
|
const count = Math.ceil(allSortetScores.lenght / 25);
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
async getSpiltedScore(count){
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = ScoreManager;
|
module.exports = ScoreManager;
|
||||||
@@ -32,6 +32,13 @@
|
|||||||
</th>
|
</th>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</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>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|||||||
@@ -8,19 +8,19 @@ class HighScoreLoader{
|
|||||||
}
|
}
|
||||||
|
|
||||||
async setup(){
|
async setup(){
|
||||||
const response = await fetch("/api/highscore");
|
// const response = await fetch("/api/highscore");
|
||||||
this.data = await response.json();
|
// this.data = await response.json();
|
||||||
|
|
||||||
for(const score of this.data.scores){
|
// for(const score of this.data.scores){
|
||||||
this.table.innerHTML += `
|
// this.table.innerHTML += `
|
||||||
<tr>
|
// <tr>
|
||||||
<td>${score.rang}</td>
|
// <td>${score.rang}</td>
|
||||||
<td>${score.user1.username}</td>
|
// <td>${score.user1.username}</td>
|
||||||
<td>${score.user2.username}</td>
|
// <td>${score.user2.username}</td>
|
||||||
<td>${score.score}</td>
|
// <td>${score.score}</td>
|
||||||
</tr>
|
// </tr>
|
||||||
`
|
// `;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,4 +65,12 @@ tr td:nth-child(3) {
|
|||||||
}
|
}
|
||||||
tr td:last-child {
|
tr td:last-child {
|
||||||
border-left: 3px solid rgba(255, 255, 255, 0.6);
|
border-left: 3px solid rgba(255, 255, 255, 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#siteSelector{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user