parent
0c7c9f1973
commit
03deb66a04
17
index.html
17
index.html
@ -25,16 +25,6 @@
|
|||||||
height: 1.2em;
|
height: 1.2em;
|
||||||
border-radius: 0.6em;
|
border-radius: 0.6em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.online {
|
|
||||||
display: inline-block;
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.name {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@ -55,11 +45,8 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<tr class="row">
|
<tr class="row">
|
||||||
<td class="tdname">
|
<td class="name"></td>
|
||||||
<div class="name">
|
<td>
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="tdbar">
|
|
||||||
<div class="bar"></div>
|
<div class="bar"></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="score">42069</td>
|
<td class="score">42069</td>
|
||||||
|
@ -55,16 +55,9 @@ function render_scoreboard(data) {
|
|||||||
const color_index = ((user.uuid.hashCode() % COLORS.length) + COLORS.length) % COLORS.length;
|
const color_index = ((user.uuid.hashCode() % COLORS.length) + COLORS.length) % COLORS.length;
|
||||||
bar.style.backgroundColor = COLORS[color_index];
|
bar.style.backgroundColor = COLORS[color_index];
|
||||||
|
|
||||||
|
name.innerText = user.name;
|
||||||
score.innerText = user.score;
|
score.innerText = user.score;
|
||||||
|
|
||||||
const onlineIcon = document.createElement("img");
|
|
||||||
onlineIcon.src = "static/coin.png";
|
|
||||||
onlineIcon.classList.add("online")
|
|
||||||
const nameSpan = document.createElement("span");
|
|
||||||
nameSpan.innerText = user.name;
|
|
||||||
name.appendChild(onlineIcon);
|
|
||||||
name.appendChild(nameSpan);
|
|
||||||
|
|
||||||
tbody.appendChild(clone);
|
tbody.appendChild(clone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user