Give top results gold/silver/bronze treatment

This commit is contained in:
2026-02-03 01:57:56 +01:00
parent f1d7b8cd1b
commit 70ab51ba44
2 changed files with 15 additions and 1 deletions

View File

@@ -227,8 +227,11 @@ export function renderResults() {
const tbody = table.querySelector("tbody");
state.results.forEach((r, idx) => {
const row = document.createElement("tr");
const podiumClass = idx === 0 ? "podium podium-1" : idx === 1 ? "podium podium-2" : idx === 2 ? "podium podium-3" : "";
row.className = podiumClass;
const medal = idx === 0 ? "🥇" : idx === 1 ? "🥈" : idx === 2 ? "🥉" : `${idx + 1}`;
row.innerHTML = `
<td>${idx + 1}</td>
<td class="rank-cell"><span class="medal">${medal}</span></td>
<td class="game-cell">
${r.screenshotUrl ? `<img class="thumb clickable-thumb" src="${r.screenshotUrl}" alt="${r.name}">` : ''}
<div class="game-meta">