WIP: feat: Cosmetic title replaces clickable username on leaderboard #145
@ -262,6 +262,7 @@
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
min-width: 80px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@ -279,11 +280,12 @@
|
||||
color: var(--accent);
|
||||
font-size: 0.7rem;
|
||||
font-style: italic;
|
||||
display: block;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100%;
|
||||
max-width: 100px;
|
||||
margin-left: 0.25em;
|
||||
}
|
||||
|
||||
.game-lb-score {
|
||||
@ -570,3 +572,4 @@
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
|
||||
@ -386,9 +386,9 @@ export class GameFarm {
|
||||
const board = this.board || "score";
|
||||
list.innerHTML = data.entries
|
||||
.map((entry) => {
|
||||
const title = entry.title ? `<span class="game-lb-title">${entry.title}</span>` : "";
|
||||
const titleHtml = entry.title ? ` <span class="game-lb-title">${entry.title}</span>` : "";
|
||||
const value = this._leaderboardValue(board, entry);
|
||||
return `<li class="game-lb-row${entry.username === this.username ? " game-lb-self" : ""}"><span class="game-lb-rank">#${entry.rank}</span><div class="game-lb-name-group"><a class="game-lb-name" href="/game/farm/${entry.username}">${entry.username}</a>${title}</div><span class="game-lb-level">Lv ${entry.level}</span><span class="game-lb-score">${value}</span></li>`;
|
||||
return `<li class="game-lb-row${entry.username === this.username ? " game-lb-self" : ""}"><span class="game-lb-rank">#${entry.rank}</span><a class="game-lb-name" href="/game/farm/${entry.username}">${entry.username}${titleHtml}</a><span class="game-lb-level">Lv ${entry.level}</span><span class="game-lb-score">${value}</span></li>`;
|
||||
})
|
||||
.join("");
|
||||
} catch (error) {
|
||||
@ -402,3 +402,4 @@ export class GameFarm {
|
||||
return Format.exact(entry.score);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user