From 0ada1c8c7a2235cc93cb9f32903ec4984d7f3dae Mon Sep 17 00:00:00 2001 From: Shaheer Humayun Date: Mon, 20 Jan 2025 01:49:00 +0500 Subject: [PATCH 01/14] changing usernames --- index.html | 9 +++------ script.js | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 74401a4..60ef28d 100644 --- a/index.html +++ b/index.html @@ -4,8 +4,8 @@ - 2KAbhishek's Projects - + Shaheer's Projects + All Of My Projects /> -

- Made with ❤ by - 2KAbhishek X OSS -

+ diff --git a/script.js b/script.js index 7218763..9a0f63b 100644 --- a/script.js +++ b/script.js @@ -1,4 +1,4 @@ -const username = '2KAbhishek'; +const username = 'shaheer2812'; const maxPages = 3; const hideForks = true; const repoList = document.querySelector('.repo-list'); From ce3497d25b7542b5b9f23fe271b83106d2a5eac3 Mon Sep 17 00:00:00 2001 From: Shaheer Humayun Date: Mon, 20 Jan 2025 01:51:38 +0500 Subject: [PATCH 02/14] updated username --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index 9a0f63b..548856b 100644 --- a/script.js +++ b/script.js @@ -1,4 +1,4 @@ -const username = 'shaheer2812'; +const username = 'Shaheer2812'; const maxPages = 3; const hideForks = true; const repoList = document.querySelector('.repo-list'); From b0e97ab6837131e9a6620966a3c431099e2eb083 Mon Sep 17 00:00:00 2001 From: Shaheer Humayun Date: Mon, 20 Jan 2025 15:28:55 +0500 Subject: [PATCH 03/14] maxpages changed --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index 548856b..7e6788d 100644 --- a/script.js +++ b/script.js @@ -1,5 +1,5 @@ const username = 'Shaheer2812'; -const maxPages = 3; +const maxPages = 1; const hideForks = true; const repoList = document.querySelector('.repo-list'); const reposSection = document.querySelector('.repos'); From 68e96e5e50ae650fd75ba799fbec4a13f961bd43 Mon Sep 17 00:00:00 2001 From: Shaheer <109369227+Shaheer2812@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:19:14 +0500 Subject: [PATCH 04/14] Update script.js --- script.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index 7e6788d..8ddfc6b 100644 --- a/script.js +++ b/script.js @@ -69,12 +69,27 @@ const getRepos = async () => { getRepos(); // display list of all user's public repos +// Define the repositories you want to show +const allowedRepos = [ + "GAN-Image-Synthesis ", + "word-embeddings", + "electricity-billing-system", + "Password-Strength-Checker-App", + "Stock-Price-Visualization-App", + "CS-100-VTA", + "House-Pricing-Prediction ", + "MERN-ProductManager", + "PakStay-Advisor", + +]; + const displayRepos = (repos) => { const userHome = `https://github.com/${username}`; filterInput.classList.remove('hide'); + for (const repo of repos) { - if (repo.fork && hideForks) { - continue; + if (!allowedRepos.includes(repo.name)) { + continue; // Skip this repo if it's not in the allowed list } const langUrl = `${userHome}?tab=repositories&q=&language=${repo.language}`; From 790f26fad8f84f99f1b52fd4db19bfe0e3df7ae6 Mon Sep 17 00:00:00 2001 From: Shaheer <109369227+Shaheer2812@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:21:02 +0500 Subject: [PATCH 05/14] Update script.js --- script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index 8ddfc6b..c8f5e71 100644 --- a/script.js +++ b/script.js @@ -71,13 +71,13 @@ getRepos(); // display list of all user's public repos // Define the repositories you want to show const allowedRepos = [ - "GAN-Image-Synthesis ", + "GAN-Image-Synthesis", "word-embeddings", "electricity-billing-system", "Password-Strength-Checker-App", "Stock-Price-Visualization-App", "CS-100-VTA", - "House-Pricing-Prediction ", + "House-Pricing-Prediction", "MERN-ProductManager", "PakStay-Advisor", From 3c8b44d9dc8eaacd287ebee7fcdef4125183b5eb Mon Sep 17 00:00:00 2001 From: Shaheer <109369227+Shaheer2812@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:21:59 +0500 Subject: [PATCH 06/14] Update script.js --- script.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index c8f5e71..9f5a1ff 100644 --- a/script.js +++ b/script.js @@ -82,13 +82,13 @@ const allowedRepos = [ "PakStay-Advisor", ]; - const displayRepos = (repos) => { const userHome = `https://github.com/${username}`; filterInput.classList.remove('hide'); for (const repo of repos) { - if (!allowedRepos.includes(repo.name)) { + // Convert repo names to lowercase for exact match + if (!allowedRepos.includes(repo.name.trim())) { continue; // Skip this repo if it's not in the allowed list } @@ -133,6 +133,7 @@ const displayRepos = (repos) => { } }; + // dynamic search filterInput.addEventListener('input', (e) => { const search = e.target.value; From c4b8cd5629fb3fe09901dbf69331c1123b2103ec Mon Sep 17 00:00:00 2001 From: Shaheer <109369227+Shaheer2812@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:23:46 +0500 Subject: [PATCH 07/14] Update script.js --- script.js | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/script.js b/script.js index 9f5a1ff..5beda3a 100644 --- a/script.js +++ b/script.js @@ -83,15 +83,20 @@ const allowedRepos = [ ]; const displayRepos = (repos) => { + console.log("All repos fetched:", repos.map(r => r.name)); // Debugging + console.log("Allowed repos:", allowedRepos); // Debugging + const userHome = `https://github.com/${username}`; filterInput.classList.remove('hide'); for (const repo of repos) { - // Convert repo names to lowercase for exact match if (!allowedRepos.includes(repo.name.trim())) { + console.log(`Skipping: ${repo.name}`); // Debugging: See which repos are skipped continue; // Skip this repo if it's not in the allowed list } + console.log(`Showing: ${repo.name}`); // Debugging: See which repos are displayed + const langUrl = `${userHome}?tab=repositories&q=&language=${repo.language}`; const starsUrl = `${userHome}/${repo.name}/stargazers`; const forksUrl = `${userHome}/${repo.name}/network/members`; @@ -133,23 +138,6 @@ const displayRepos = (repos) => { } }; - -// dynamic search -filterInput.addEventListener('input', (e) => { - const search = e.target.value; - const repos = document.querySelectorAll('.repo'); - const searchLowerText = search.toLowerCase(); - - for (const repo of repos) { - const lowerText = repo.innerText.toLowerCase(); - if (lowerText.includes(searchLowerText)) { - repo.classList.remove('hide'); - } else { - repo.classList.add('hide'); - } - } -}); - // for programming language icons const devicons = { Git: '', From e864d7dec78bb85b1802e797a04053a531118ad2 Mon Sep 17 00:00:00 2001 From: Shaheer <109369227+Shaheer2812@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:28:43 +0500 Subject: [PATCH 08/14] Update script.js --- script.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/script.js b/script.js index 5beda3a..a8bf328 100644 --- a/script.js +++ b/script.js @@ -21,29 +21,32 @@ const getProfile = async () => { }; getProfile(); -// display information from github profile -const displayProfile = (profile) => { +// display information from github profileconst displayProfile = (profile) => { const userInfo = document.querySelector('.user-info'); + + // Handle null values + const name = profile.name ? profile.name : profile.login; + const bio = profile.bio ? `

${profile.bio}

` : ""; + const company = profile.company ? `

Work: ${profile.company}

` : ""; + const location = profile.location ? `

Location: ${profile.location}

` : ""; + userInfo.innerHTML = `
user avatar
-

${profile.name} - ${profile.login}

-

${profile.bio}

+

${name} - ${profile.login}

+ ${bio}

- Followers: ${profile.followers} - Repos: ${profile.public_repos} - Gists: ${profile.public_gists} -

-

- Work: ${profile.company} - Location: ${profile.location} + Followers: ${profile.followers}   + Repos: ${profile.public_repos}   + Gists: ${profile.public_gists}

+ ${company} + ${location}
`; }; - // get list of user's public repos const getRepos = async () => { let repos = []; From 0e9bc329aa95e7d51df9abea1c122002fc737bd5 Mon Sep 17 00:00:00 2001 From: Shaheer <109369227+Shaheer2812@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:31:29 +0500 Subject: [PATCH 09/14] Update script.js --- script.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/script.js b/script.js index a8bf328..22d6b7f 100644 --- a/script.js +++ b/script.js @@ -17,6 +17,31 @@ const getProfile = async () => { // } ); const profile = await res.json(); +const displayProfile = (profile) => { + const userInfo = document.querySelector('.user-info'); + + // Handle null values + const name = profile.name ? profile.name : profile.login; + const bio = profile.bio ? `

${profile.bio}

` : ""; + + userInfo.innerHTML = ` +
+ user avatar +
+
+

${name} - ${profile.login}

+ ${bio} +

+ Followers: ${profile.followers}   + Repos: ${profile.public_repos}   + Gists: ${profile.public_gists} +

+
+ `; +}; + + + displayProfile(profile); }; getProfile(); From 2d182a696b12ea1558d3f5529852662f0fa6ef3a Mon Sep 17 00:00:00 2001 From: Shaheer <109369227+Shaheer2812@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:33:27 +0500 Subject: [PATCH 10/14] Update script.js --- script.js | 52 ++++++++++++---------------------------------------- 1 file changed, 12 insertions(+), 40 deletions(-) diff --git a/script.js b/script.js index 22d6b7f..5beda3a 100644 --- a/script.js +++ b/script.js @@ -17,61 +17,33 @@ const getProfile = async () => { // } ); const profile = await res.json(); -const displayProfile = (profile) => { - const userInfo = document.querySelector('.user-info'); - - // Handle null values - const name = profile.name ? profile.name : profile.login; - const bio = profile.bio ? `

${profile.bio}

` : ""; - - userInfo.innerHTML = ` -
- user avatar -
-
-

${name} - ${profile.login}

- ${bio} -

- Followers: ${profile.followers}   - Repos: ${profile.public_repos}   - Gists: ${profile.public_gists} -

-
- `; -}; - - - displayProfile(profile); }; getProfile(); -// display information from github profileconst displayProfile = (profile) => { +// display information from github profile +const displayProfile = (profile) => { const userInfo = document.querySelector('.user-info'); - - // Handle null values - const name = profile.name ? profile.name : profile.login; - const bio = profile.bio ? `

${profile.bio}

` : ""; - const company = profile.company ? `

Work: ${profile.company}

` : ""; - const location = profile.location ? `

Location: ${profile.location}

` : ""; - userInfo.innerHTML = `
user avatar
-

${name} - ${profile.login}

- ${bio} +

${profile.name} - ${profile.login}

+

${profile.bio}

- Followers: ${profile.followers}   - Repos: ${profile.public_repos}   - Gists: ${profile.public_gists} + Followers: ${profile.followers} + Repos: ${profile.public_repos} + Gists: ${profile.public_gists} +

+

+ Work: ${profile.company} + Location: ${profile.location}

- ${company} - ${location}
`; }; + // get list of user's public repos const getRepos = async () => { let repos = []; From c69967cb4e0773541bbf273660be6bcdb28e7ebf Mon Sep 17 00:00:00 2001 From: Shaheer <109369227+Shaheer2812@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:34:46 +0500 Subject: [PATCH 11/14] Update script.js --- script.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/script.js b/script.js index 5beda3a..0d4769a 100644 --- a/script.js +++ b/script.js @@ -24,26 +24,26 @@ getProfile(); // display information from github profile const displayProfile = (profile) => { const userInfo = document.querySelector('.user-info'); + + // Handle null values + const name = profile.name ? profile.name : profile.login; + const bio = profile.bio ? `

${profile.bio}

` : ""; + userInfo.innerHTML = `
- user avatar + user avatar
-

${profile.name} - ${profile.login}

-

${profile.bio}

+

${name} - ${profile.login}

+ ${bio}

- Followers: ${profile.followers} - Repos: ${profile.public_repos} - Gists: ${profile.public_gists} -

-

- Work: ${profile.company} - Location: ${profile.location} + Followers: ${profile.followers}   + Repos: ${profile.public_repos}   + Gists: ${profile.public_gists}

`; }; - // get list of user's public repos const getRepos = async () => { let repos = []; From 2f188dafdea64f74f0d1ab80f4d3156ebcd0281f Mon Sep 17 00:00:00 2001 From: Shaheer <109369227+Shaheer2812@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:36:03 +0500 Subject: [PATCH 12/14] Update index.html --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 60ef28d..7900849 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,8 @@ rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@v2.15.1/devicon.min.css" /> - + + From 05cc713bbfc37392f0ca5538a9fd2f20c1f65f07 Mon Sep 17 00:00:00 2001 From: Shaheer <109369227+Shaheer2812@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:38:22 +0500 Subject: [PATCH 13/14] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 7900849..95bf3e6 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@v2.15.1/devicon.min.css" /> - + From d73aa101dac6b21c57d8ed8e55f132cc822df3a6 Mon Sep 17 00:00:00 2001 From: Shaheer <109369227+Shaheer2812@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:38:51 +0500 Subject: [PATCH 14/14] Update script.js --- script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index 0d4769a..0530cde 100644 --- a/script.js +++ b/script.js @@ -25,9 +25,9 @@ getProfile(); const displayProfile = (profile) => { const userInfo = document.querySelector('.user-info'); - // Handle null values + // Handle null values and remove empty fields const name = profile.name ? profile.name : profile.login; - const bio = profile.bio ? `

${profile.bio}

` : ""; + const bio = profile.bio && profile.bio !== "null" ? `

${profile.bio}

` : ""; userInfo.innerHTML = `