Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjay-kv committed Aug 28, 2024
2 parents edcd4b3 + 4f12e9e commit a4d7b24
Show file tree
Hide file tree
Showing 11 changed files with 399 additions and 30 deletions.
2 changes: 2 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Contributor Covenant Code of Conduct

We follow the [Code of Conduct](https://recodehive.github.io/awesome-github-profiles/pages/exploremore.html#) to ensure a welcoming and inclusive community. Please read and adhere to the guidelines.

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
Expand Down
1 change: 1 addition & 0 deletions Website/assets/Images/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Website/assets/Images/machine-learning-repos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Website/assets/Images/recodehive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Website/assets/Images/scrape-ml.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 71 additions & 3 deletions Website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,34 @@ <h3>Recommendation Models</h3>
</div>
</section>


<!-- GitHub Repositories Section -->
<section class="github-section">
<h2>Here are some of our active GitHub repositories</h2>
<p>Everyone is welcome to come and contribute to our open source projects.</p>

<div class="github-container">
<!-- Repository Buttons -->
<div class="github-buttons">
<button onclick="changeImage('assets/Images/awesome-github-profiles.png')">Awesome GitHub Profiles</button>
<button onclick="changeImage('assets/Images/machine-learning-repos.png')">Machine Learning Repo</button>
<button onclick="changeImage('assets/Images/scrape-ml.png')">Scrape ML</button>
</div>

<!-- Image Display -->
<div class="github-image">
<img id="repoImage" src="assets/Images/recodehive.png" alt="GitHub Repository">
</div>
</div>
</section>

<script>
function changeImage(image) {
document.getElementById('repoImage').src = image;
}
</script>


</main>

<!-- Chatbot Button -->
Expand Down Expand Up @@ -244,8 +272,42 @@ <h3>Recommendation Models</h3>
</svg>
</button>




<!-- Side Icons -->

<div class="side-icons">
<div class="icon-content">
<a href="https://www.facebook.com/recodehive" target="_blank" aria-label="Facebook" data-social="facebook">
<i class="fab fa-facebook-f"></i>
<div class="filled"></div>
</a>
</div>
<div class="icon-content">
<a href="https://www.linkedin.com/in/sanjay-k-v/" target="_blank" aria-label="LinkedIn" data-social="linkedin">
<i class="fab fa-linkedin-in"></i>
<div class="filled"></div>
</a>
</div>
<div class="icon-content">
<a href="https://twitter.com/sanjay_kv" target="_blank" aria-label="Twitter" data-social="twitter">
<i class="fab fa-twitter"></i>
<div class="filled"></div>
</a>
</div>
<div class="icon-content">
<a href="https://youtube.com" target="_blank" aria-label="YouTube" data-social="youtube">
<i class="fab fa-youtube"></i>
<div class="filled"></div>
</a>
</div>
<div class="icon-content">
<a href="https://github.com/recodehive" target="_blank" aria-label="GitHub" data-social="github">
<i class="fab fa-github"></i>
<div class="filled"></div>
</a>
</div>
</div>


<footer class="footer">
<div>&copy; <span id="year"></span> Machine Learning Repos - <a href="https://github.com/recodehive" id="footer-link">RecodeHive</a>. All rights reserved.</div>
Expand All @@ -257,5 +319,11 @@ <h3>Recommendation Models</h3>
</script>

<script src="js/script.js"></script>

<script>
function changeImage(image) {
document.getElementById('repoImage').src = image;
}
</script>
</body>
</html>
</html>
38 changes: 38 additions & 0 deletions Website/js/models.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Function to fetch and display subdirectories (models) of the selected directory
async function fetchSubdirectories() {
const params = new URLSearchParams(window.location.search);
const directoryName = params.get('directory');
const subdirectoriesList = document.getElementById('subdirectories');

try {
const response = await fetch(`https://api.github.com/repos/recodehive/machine-learning-repos/contents/${directoryName}`);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
const subdirectories = data.filter(item => item.type === 'dir');

subdirectories.forEach(subdirectory => {
const li = document.createElement('li');
li.classList.add('card');

const h3 = document.createElement('h3');
h3.textContent = subdirectory.name;

const a = document.createElement('a');
a.href = subdirectory.html_url;
a.textContent = 'View Repository';
a.classList.add('btn-view-repo');

li.appendChild(h3);
li.appendChild(a);
subdirectoriesList.appendChild(li);
});
} catch (error) {
console.error('Error fetching subdirectories:', error);
subdirectoriesList.innerHTML = '<li class="card">Failed to load models.</li>';
}
}

// Call the function when the page loads
document.addEventListener('DOMContentLoaded', fetchSubdirectories);
55 changes: 28 additions & 27 deletions Website/js/script.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
document.addEventListener('DOMContentLoaded', function() {
// Function to fetch and display directories
async function fetchDirectories() {
const directoriesList = document.getElementById('directories');
try {
const response = await fetch('/api/github/repos');
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
const directories = data.filter(item => item.type === 'dir' && item.name !== 'Website' && item.name !== '.github');
// Function to fetch and display directories
async function fetchDirectories() {
const directoriesList = document.getElementById('directories');
try {
const response = await fetch('/api/github/repos');
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
const directories = data.filter(item => item.type === 'dir' && item.name !== 'Website' && item.name !== '.github');

directories.forEach(directory => {
const li = document.createElement('li');
li.classList.add('card');
directories.forEach(directory => {
const li = document.createElement('li');
li.classList.add('card');

const h3 = document.createElement('h3');
h3.textContent = directory.name;
const h3 = document.createElement('h3');
h3.textContent = directory.name;

const a = document.createElement('a');
a.href = directory.html_url;
a.textContent = 'View Repository';
a.classList.add('btn-view-repo');
const a = document.createElement('a');
a.href = `models.html?directory=${encodeURIComponent(directory.name)}`;
a.textContent = 'View Models';
a.classList.add('btn-view-repo');

li.appendChild(h3);
li.appendChild(a);
directoriesList.appendChild(li);
});
} catch (error) {
console.error('Error fetching directories:', error);
directoriesList.innerHTML = '<li class="card">Failed to load directories.</li>';
}
li.appendChild(h3);
li.appendChild(a);
directoriesList.appendChild(li);
});
} catch (error) {
console.error('Error fetching directories:', error);
directoriesList.innerHTML = '<li class="card">Failed to load directories.</li>';
}
}

// Function to fetch and count subdirectories for each directory
async function fetchSubdirectoryCounts() {
try {
Expand Down
62 changes: 62 additions & 0 deletions Website/models.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Models</title>
<link rel="stylesheet" href="styles.css">
<link rel="icon" href="/assets/recode-hive.png" type="image/png"> <!-- Added favicon -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
</head>
<body class="dark-mode">
<div class="loading-container" id="loading-animation">
<div class="loader"></div>
</div>
<header>
<nav class="navbar">
<a class="logo-container" href="/">
<img src="assets/recode-hive.png" alt="Recode Hive Icon" class="logo-icon">
<span class="logo-text">Recode Hive</span>
</a>
<ul class="nav-links">
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
<li><a href="/organization">Organization</a></li>
<li><a href="/faq">FAQ</a></li>
<li><a href="/contact">Contact</a></li>
<div class="nav-icons">
<li>
<a href="https://github.com/recodehive/machine-learning-repos" target="_blank">
<img src="assets/images.png" alt="GitHub"> <!-- GitHub Icon -->
</a>
</li>
<li>
<button id="toggle-dark-mode">
<i class="fas fa-moon"></i>
</button>
</li>
</div>
</ul>
<div class="line" id="line">
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
</div>
</nav>
</header>
<section id="model-list">
<h2>Explore Our Models</h2>
<ul id="subdirectories"></ul>
</section>
<footer class="footer">
<div>&copy; <span id="year"></span> Machine Learning Repos - <a href="https://github.com/recodehive" id="footer-link">RecodeHive</a>. All rights reserved.</div>
</footer>

<script>
const year = new Date().getFullYear();
document.getElementById("year").textContent = year;
</script>
<script src="js/models.js"></script>
<script src="js/script.js"></script>
</body>
</html>
Loading

0 comments on commit a4d7b24

Please sign in to comment.