Skip to content

Commit

Permalink
leaderboard updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ShvetankPrakash authored Jan 9, 2025
1 parent ef73ba4 commit 1c91879
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions js/label_leaderboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
'sprakash': 'Harvard University',
'vjreddi': 'Harvard University',
'shreyasgrampurohit': 'IIT Bombay',
'npadilla': 'Univ. Nac. de Tucuman',
'zishenwan': 'Georgia Tech',
'Unknown User': 'N/A'
};

Expand All @@ -133,16 +135,16 @@
function getBadges(contributionCount) {
const badges = [];

if (contributionCount > 1000) {
if (contributionCount >= 1000) {
badges.push('<i class="fas fa-medal" style="color: gold;" title="Gold Contributor"></i>');
}
else if (contributionCount > 100) {
else if (contributionCount >= 100) {
badges.push('<i class="fas fa-award" style="color: silver;" title="Silver Contributor"></i>');
}
else if (contributionCount > 10) {
else if (contributionCount >= 10) {
badges.push('<i class="fas fa-trophy" style="color: bronze;" title="Bronze Contributor"></i>');
}
else if (contributionCount > 1) {
else if (contributionCount >= 1) {
badges.push('<i class="fas fa-star" style="color: green;" title="First-Time Contributor"></i>');
}

Expand All @@ -157,9 +159,9 @@

legend.innerHTML = `
<div style="display: flex; justify-content: center; gap: 20px;">
<span><i class="fas fa-medal" style="color: gold;"></i> Gold Contributor (>1000 Labels) </span>
<span><i class="fas fa-award" style="color: silver;"></i> Silver Contributor (>100 Labels) </span>
<span><i class="fas fa-trophy" style="color: bronze;"></i> Bronze Contributor (>10 Labels) </span>
<span><i class="fas fa-medal" style="color: gold;"></i> Gold Contributor (1000+ Labels) </span>
<span><i class="fas fa-award" style="color: silver;"></i> Silver Contributor (100+ Labels) </span>
<span><i class="fas fa-trophy" style="color: bronze;"></i> Bronze Contributor (10+ Labels) </span>
<span><i class="fas fa-star" style="color: green;"></i> First-Time Contributor! </span>
</div>
`;
Expand Down

0 comments on commit 1c91879

Please sign in to comment.