Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated details about chatbot #1182

Merged
merged 1 commit into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading