Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
37e4ecf
Add monthly featured developer showcase
Aashish-Jha-11 Dec 17, 2025
5912f7c
Fix: Improve label readability and remove JSON indentation
Aashish-Jha-11 Dec 17, 2025
129a53d
Fix: Make stat labels fully visible with stronger styling
Aashish-Jha-11 Dec 17, 2025
5edf300
Merge branch 'main' into feature/monthly-featured-developer
Aashish-Jha-11 Dec 17, 2025
083ffff
Fix: Apply black and isort formatting to Python files
Aashish-Jha-11 Dec 17, 2025
a699a76
Add cache duration handling for JSON files
Aashish-Jha-11 Dec 17, 2025
8bf823d
Merge branch 'main' into feature/monthly-featured-developer
Aashish-Jha-11 Dec 18, 2025
e695284
Fix linter issues from code review
Aashish-Jha-11 Dec 18, 2025
e6d8604
Fix: Remove duplicate .stat-label CSS causing gray text issue
Aashish-Jha-11 Dec 18, 2025
9bd4c93
Merge upstream/main and resolve conflicts in styles.css
Aashish-Jha-11 Dec 18, 2025
1539eb6
Fix linter errors: black, prettier, ruff formatting
Aashish-Jha-11 Dec 18, 2025
e1425fc
Merge upstream/main - resolve conflicts keeping feature branch changes
Aashish-Jha-11 Dec 18, 2025
450656a
Apply all linter fixes: prettier (CSS, JS, HTML, YAML, MD), ruff format
Aashish-Jha-11 Dec 18, 2025
a0e254d
Merge upstream/main - resolve conflicts, keep feature code
Aashish-Jha-11 Dec 25, 2025
d4a08db
Fix DeepSource issues: enable jinja2 autoescape, use logging params
Aashish-Jha-11 Dec 25, 2025
ddeb7eb
Fix Python syntax errors: properly convert all logging f-strings
Aashish-Jha-11 Dec 25, 2025
3b06805
Fix final 2 Python logging f-strings
Aashish-Jha-11 Dec 25, 2025
4e08e3b
Fix JS linting: replace == with === for strict equality
Aashish-Jha-11 Dec 25, 2025
5a5343f
Merge upstream/main: add sitemap and safe_path functions
Aashish-Jha-11 Dec 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions docs/featured.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"user": {
"login": "torvalds",
"id": 1024025,
"node_id": "MDQ6VXNlcjEwMjQwMjU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1024025?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/torvalds",
"html_url": "https://github.com/torvalds",
"followers_url": "https://api.github.com/users/torvalds/followers",
"following_url": "https://api.github.com/users/torvalds/following{/other_user}",
"gists_url": "https://api.github.com/users/torvalds/gists{/gist_id}",
"starred_url": "https://api.github.com/users/torvalds/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/torvalds/subscriptions",
"organizations_url": "https://api.github.com/users/torvalds/orgs",
"repos_url": "https://api.github.com/users/torvalds/repos",
"events_url": "https://api.github.com/users/torvalds/events{/privacy}",
"received_events_url": "https://api.github.com/users/torvalds/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false,
"score": 1.0,
"followers": 266192,
"following": 0,
"location": "Portland, OR",
"name": "Linus Torvalds",
"public_repos": 9,
"public_gists": 1,
"sponsors_count": 0,
"sponsoring_count": 0,
"avatar_updated_at": "2025-11-24T04:16:14Z",
"top_languages": [
{
"name": "C",
"bytes": 1384925448,
"percent": 97.7
},
{
"name": "Assembly",
"bytes": 9727594,
"percent": 0.7
},
{
"name": "Shell",
"bytes": 5784810,
"percent": 0.4
},
{
"name": "Rust",
"bytes": 4587698,
"percent": 0.3
},
{
"name": "Python",
"bytes": 3805691,
"percent": 0.3
}
],
"total_stars": 217154,
"last_repo_pushed_at": "2025-12-16T08:05:45Z",
"last_public_commit_at": "2025-12-16T08:05:46Z",
"engagement_score": 74.97144444444444
},
"selected_at": "2025-12-17T13:51:40.820097+00:00",
"month": "December 2025"
}
80 changes: 79 additions & 1 deletion docs/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ document.addEventListener('DOMContentLoaded', initializeApp);
async function initializeApp() {
showLoadingState();
setupEventListeners();
await fetchAndPrepareUsers();
await Promise.all([
fetchAndPrepareUsers(),
loadFeaturedUser()
]);
applyFilters();
updateVisibilityAndSort();
hideLoadingState();
Expand Down Expand Up @@ -115,6 +118,81 @@ async function fetchAndPrepareUsers() {
}
}

/**
* Load and display the featured user of the month
*/
async function loadFeaturedUser() {
try {
const res = await fetch('featured.json', { cache: 'no-store' });
if (!res.ok) {
console.log('No featured user available yet');
return;
}
const data = await res.json();
const user = data.user;

if (!user || !user.login) {
return;
}

// Update featured user section
const section = document.getElementById('featuredUserSection');
const avatar = document.getElementById('featuredUserAvatar');
const link = document.getElementById('featuredUserLink');
const name = document.getElementById('featuredUserName');
const loginLink = document.getElementById('featuredUserLoginLink');
const location = document.getElementById('featuredUserLocation');
const followers = document.getElementById('featuredUserFollowers');
const stars = document.getElementById('featuredUserStars');
const repos = document.getElementById('featuredUserRepos');
const sponsors = document.getElementById('featuredUserSponsors');
const languages = document.getElementById('featuredUserLanguages');
Comment thread
Aashish-Jha-11 marked this conversation as resolved.
Outdated

// Set avatar and links
const avatarUrl = `images/faces/${user.login.toLowerCase()}.png`;
avatar.src = avatarUrl;
avatar.alt = `${user.login}'s avatar`;
link.href = user.html_url;
loginLink.href = user.html_url;
loginLink.textContent = `@${user.login}`;

// Set name
name.textContent = user.name || user.login;

// Set location
if (user.location) {
location.textContent = user.location;
location.style.display = 'flex';
} else {
location.style.display = 'none';
}

// Set stats
followers.textContent = formatDisplay(user.followers);
stars.textContent = formatDisplay(user.total_stars);
repos.textContent = formatDisplay(user.public_repos);
sponsors.textContent = formatDisplay(user.sponsors_count);

// Set languages
if (Array.isArray(user.top_languages) && user.top_languages.length > 0) {
languages.innerHTML = '';
user.top_languages.slice(0, 5).forEach(lang => {
const badge = document.createElement('div');
badge.className = 'featured-language-badge';
badge.textContent = lang.name;
languages.appendChild(badge);
});
} else {
languages.innerHTML = '';
}
Comment thread
Aashish-Jha-11 marked this conversation as resolved.
Outdated
Comment thread
jbampton marked this conversation as resolved.
Outdated

// Show the section
section.style.display = 'block';
} catch (err) {
console.error('Failed to load featured user:', err);
}
}

function prepareUserFromJson(user) {
const getNum = (v, def = 0) => (v === 'N/A' || v == null ? def : parseInt(v, 10));
const safeLower = v => (v ? String(v).toLowerCase() : '');
Expand Down
Loading