Skip to content

Commit

Permalink
Merge pull request #1182 from UppuluriKalyani/main
Browse files Browse the repository at this point in the history
updated details about chatbot
  • Loading branch information
sanjay-kv authored Aug 25, 2024
2 parents 9b6e672 + ca77f69 commit 101d995
Show file tree
Hide file tree
Showing 3 changed files with 921 additions and 881 deletions.
2 changes: 1 addition & 1 deletion Website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ <h3>Recommendation Models</h3>
</footer>
<script src="js/script.js"></script>
</body>
</html>
</html>
42 changes: 42 additions & 0 deletions Website/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,4 +285,46 @@ async function fetchSubdirectoryCounts() {
fetchRepoStats();
toggleStatsSection();
});
document.addEventListener("DOMContentLoaded", function() {
fetchContributors();

function fetchContributors() {
const repoOwner = 'recodehive'; // Replace with your repository owner
const repoName = 'machine-learning-repos'; // Replace with your repository name
const apiUrl = `https://api.github.com/repos/${repoOwner}/${repoName}/contributors`;

fetch(apiUrl)
.then(response => response.json())
.then(contributors => {
const contributorsGrid = document.getElementById('contributors-grid');

contributors.forEach(contributor => {
const contributorDiv = document.createElement('div');
contributorDiv.className = 'contributor';

contributorDiv.innerHTML = `
<img src="${contributor.avatar_url}" alt="${contributor.login}" class="contributor-image">
<div class="contributor-info">
<a href="${contributor.html_url}" target="_blank" class="contributor-github">GitHub Profile</a>
</div>
`;

contributorsGrid.appendChild(contributorDiv);
});
})
.catch(error => {
console.error('Error fetching contributors:', error);
});
}
});

const toggleDarkModeButton = document.getElementById('toggle-dark-mode');
const body = document.body;

toggleDarkModeButton.addEventListener('click', () => {
body.classList.toggle('dark-mode');
// Change icon based on dark mode status
const icon = toggleDarkModeButton.querySelector('i');
icon.classList.toggle('fa-moon');
icon.classList.toggle('fa-sun');
});
Loading

0 comments on commit 101d995

Please sign in to comment.