diff --git a/index.html b/index.html
index 6ed26f60..2f8fce2d 100644
--- a/index.html
+++ b/index.html
@@ -465,7 +465,7 @@
A growing community of student developers working together to improve the platform.
diff --git a/pages/pr-contribution/pr-contributors.html b/pages/pr-contribution/pr-contributors.html
index 5c2ae455..41eafa70 100644
--- a/pages/pr-contribution/pr-contributors.html
+++ b/pages/pr-contribution/pr-contributors.html
@@ -1,9 +1,11 @@
+
+
-
+
@@ -19,9 +21,12 @@
-
+
+
+
+
@@ -118,11 +124,9 @@
© 2025 Nitra Mitra. All Rights Reserved.
-
-
-
+
+
-
@@ -149,7 +153,8 @@
modeToggle.addEventListener('click', () => {
body.classList.toggle('dark-mode');
const isDarkMode = body.classList.contains('dark-mode');
- modeToggle.src = isDarkMode ? 'images/sun.png' : 'images/moon.png';
+ modeToggle.src = isDarkMode ? '../../images/sun.png' : '../../images/moon.png';
+
});
}
@@ -343,7 +348,7 @@
}
// If no cache, fetch from API
- contentDiv.innerHTML = `🔄 Fetching fresh data from ${repo}... br>Getting all contributor details - this may take a moment
`;
+ contentDiv.innerHTML = `🔄 Fetching fresh data from ${repo}... Getting all contributor details - this may take a moment
`;
try {
const headers = {
@@ -545,19 +550,20 @@
contentDiv.innerHTML = statsHTML + contributorsHTML + prsHTML;
}
- function displayContributors() {
- const excludedUsers = ['VAIBHAVBABELE', 'dependabot[bot]'];
- const sortedContributors = Array.from(contributors.values())
- .filter(c => !excludedUsers.includes(c.name))
- .sort((a, b) => {
- if (a.score !== b.score) return b.score - a.score;
- return b.totalPRs - a.totalPRs;
- });
+function displayContributors() {
+ // Exclude repo owner + bots
+ const excludedUsers = ['VAIBHAVBABELE', 'dependabot[bot]'];
+ const sortedContributors = Array.from(contributors.values())
+ .filter(c => !excludedUsers.includes(c.name))
+ .sort((a, b) => {
+ if (a.score !== b.score) return b.score - a.score;
+ return b.totalPRs - a.totalPRs; // tie-breaker
+ });
- const topThree = sortedContributors.slice(0, 3);
- const restContributors = sortedContributors.slice(3);
+ const topThree = sortedContributors.slice(0, 3);
+ const restContributors = sortedContributors.slice(3);
- const podiumHTML = `
+ const podiumHTML = `
${topThree.length > 1 ? `
@@ -576,11 +582,10 @@
${topThree[1].linkedinUrl ? `
` : ''}
@@ -603,11 +608,9 @@
${topThree[0].linkedinUrl ? ` ` : ''}
@@ -630,11 +633,9 @@
${topThree[2].linkedinUrl ? ` ` : ''}
@@ -642,59 +643,56 @@
`;
- const listHTML = restContributors.map((contributor, index) => {
- const rank = index + 4;
- const levelClass = `level-${contributor.level}`;
- const levelBadgeClass = `level-${contributor.level}-badge`;
- const levelText = ['Beginner', 'Intermediate', 'Advanced'][contributor.level - 1];
+ const listHTML = restContributors.map((contributor, index) => {
+ const rank = index + 4;
+ const levelClass = `level-${contributor.level}`;
+ const levelBadgeClass = `level-${contributor.level}-badge`;
+ const levelText = ['Beginner', 'Intermediate', 'Advanced'][contributor.level - 1];
- return `
-
-
${rank}
-
-
-
-
-
${contributor.name}
-
- Level ${contributor.level} - ${levelText}
-
- ${contributor.bio ? `
${contributor.bio.substring(0, 100)}${contributor.bio.length > 100 ? '...' : ''}
` : ''}
+ return `
+
+
${rank}
+
+
+
+
+
${contributor.name}
+
+ Level ${contributor.level} - ${levelText}
⭐ ${contributor.score}
📊 ${contributor.totalPRs} PRs
-
-
-
-
-
- ${contributor.linkedinUrl ? `
` : ''}
-
-
-
+ ${contributor.bio ? `
${contributor.bio.substring(0, 100)}${contributor.bio.length > 100 ? '...' : ''}
` : ''}
- `;
- }).join('');
-
- return `
-
-
🏆 Top Contributors Ranking
- ${podiumHTML}
-
- ${listHTML}
+
+
+
+
+
+ ${contributor.linkedinUrl ? `
` : ''}
+
+
+
`;
+ }).join('');
+
+ return `
+
+
🏆 Top Contributors Ranking
+ ${podiumHTML}
+
+ ${listHTML}
- `;
- }
+
`;
+}
+
function displayPRs(prs) {
const prsHTML = prs.slice(0, 10).map(pr => {
@@ -748,11 +746,13 @@
📋 Recent Merged Pull Requests
// Initialize the app
window.addEventListener('load', () => {
fetchPRs();
- addRefreshButton();
+ // addRefreshButton();
});
-
\ No newline at end of file
+