diff options
| author | Arnaud Bailly <arnaud@pankzsoft.com> | 2025-11-05 08:04:32 +0100 |
|---|---|---|
| committer | Arnaud Bailly <arnaud@pankzsoft.com> | 2025-11-05 08:04:32 +0100 |
| commit | 1909fe4a4cfd0dff9b557fb408c2c47c42681bc3 (patch) | |
| tree | e006d49b270ee78eb5b827c25e122dc3f35e42d2 | |
| parent | 72ed98c66d1585c94ee5383c19a1dec8e10bb050 (diff) | |
| download | lambda-nantes-1909fe4a4cfd0dff9b557fb408c2c47c42681bc3.tar.gz | |
fix color display for success/failure
| -rw-r--r-- | lambda-calcul/haskell/public/leaderboard.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lambda-calcul/haskell/public/leaderboard.js b/lambda-calcul/haskell/public/leaderboard.js index 15b5b42..7541701 100644 --- a/lambda-calcul/haskell/public/leaderboard.js +++ b/lambda-calcul/haskell/public/leaderboard.js @@ -14,12 +14,6 @@ const updateLeaderboard = () => { data.forEach((entry, index) => { const row = document.createElement('tr'); - if(entry.lastResult) { - row.classList.add('success'); - } else if (!entry.lastResult && entry.lastTest){ - row.classList.add('fail'); - } - const nameCell = document.createElement('td'); nameCell.textContent = entry.user; row.appendChild(nameCell); @@ -32,6 +26,12 @@ const updateLeaderboard = () => { timeCell.textContent = entry.lastTest; row.appendChild(timeCell); + if(entry.lastResult) { + timeCell.classList.add('success'); + } else if (!entry.lastResult && entry.lastTest){ + timeCell.classList.add('fail'); + } + tbody.appendChild(row); }); }) |
