Spaces:
Running
Running
قدم منصة كاملة مثل hugginface
Browse files- README.md +7 -4
- components/footer.js +156 -0
- components/navbar.js +115 -0
- index.html +154 -19
- script.js +27 -0
- style.css +29 -19
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
colorFrom: gray
|
| 5 |
colorTo: gray
|
|
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: NeuralNest AI Playground 🪺
|
| 3 |
+
colorFrom: blue
|
|
|
|
| 4 |
colorTo: gray
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
components/footer.js
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
:host {
|
| 7 |
+
display: block;
|
| 8 |
+
background-color: #f9fafb;
|
| 9 |
+
border-top: 1px solid #e5e7eb;
|
| 10 |
+
padding: 4rem 1rem;
|
| 11 |
+
}
|
| 12 |
+
.footer-container {
|
| 13 |
+
max-width: 1280px;
|
| 14 |
+
margin: 0 auto;
|
| 15 |
+
}
|
| 16 |
+
.footer-grid {
|
| 17 |
+
display: grid;
|
| 18 |
+
grid-template-columns: repeat(2, 1fr);
|
| 19 |
+
gap: 2rem;
|
| 20 |
+
margin-bottom: 3rem;
|
| 21 |
+
}
|
| 22 |
+
.footer-logo {
|
| 23 |
+
font-weight: 700;
|
| 24 |
+
font-size: 1.25rem;
|
| 25 |
+
color: #0ea5e9;
|
| 26 |
+
display: flex;
|
| 27 |
+
align-items: center;
|
| 28 |
+
gap: 0.5rem;
|
| 29 |
+
margin-bottom: 1rem;
|
| 30 |
+
}
|
| 31 |
+
.footer-description {
|
| 32 |
+
color: #6b7280;
|
| 33 |
+
margin-bottom: 1.5rem;
|
| 34 |
+
}
|
| 35 |
+
.footer-social {
|
| 36 |
+
display: flex;
|
| 37 |
+
gap: 1rem;
|
| 38 |
+
}
|
| 39 |
+
.footer-social-link {
|
| 40 |
+
color: #6b7280;
|
| 41 |
+
transition: color 0.2s;
|
| 42 |
+
}
|
| 43 |
+
.footer-social-link:hover {
|
| 44 |
+
color: #0ea5e9;
|
| 45 |
+
}
|
| 46 |
+
.footer-heading {
|
| 47 |
+
font-weight: 600;
|
| 48 |
+
color: #111827;
|
| 49 |
+
margin-bottom: 1rem;
|
| 50 |
+
}
|
| 51 |
+
.footer-links {
|
| 52 |
+
display: flex;
|
| 53 |
+
flex-direction: column;
|
| 54 |
+
gap: 0.75rem;
|
| 55 |
+
}
|
| 56 |
+
.footer-link {
|
| 57 |
+
color: #6b7280;
|
| 58 |
+
transition: color 0.2s;
|
| 59 |
+
}
|
| 60 |
+
.footer-link:hover {
|
| 61 |
+
color: #0ea5e9;
|
| 62 |
+
}
|
| 63 |
+
.footer-bottom {
|
| 64 |
+
border-top: 1px solid #e5e7eb;
|
| 65 |
+
padding-top: 2rem;
|
| 66 |
+
display: flex;
|
| 67 |
+
flex-direction: column-reverse;
|
| 68 |
+
align-items: center;
|
| 69 |
+
gap: 1rem;
|
| 70 |
+
color: #6b7280;
|
| 71 |
+
font-size: 0.875rem;
|
| 72 |
+
}
|
| 73 |
+
.footer-legal-links {
|
| 74 |
+
display: flex;
|
| 75 |
+
gap: 1rem;
|
| 76 |
+
}
|
| 77 |
+
@media (min-width: 768px) {
|
| 78 |
+
.footer-grid {
|
| 79 |
+
grid-template-columns: repeat(4, 1fr);
|
| 80 |
+
}
|
| 81 |
+
.footer-bottom {
|
| 82 |
+
flex-direction: row;
|
| 83 |
+
justify-content: space-between;
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
</style>
|
| 87 |
+
<div class="footer-container">
|
| 88 |
+
<div class="footer-grid">
|
| 89 |
+
<div class="col-span-2 md:col-span-1">
|
| 90 |
+
<div class="footer-logo">
|
| 91 |
+
<i data-feather="cpu"></i>
|
| 92 |
+
NeuralNest
|
| 93 |
+
</div>
|
| 94 |
+
<p class="footer-description">
|
| 95 |
+
The AI collaboration platform where models, datasets, and applications come together.
|
| 96 |
+
</p>
|
| 97 |
+
<div class="footer-social">
|
| 98 |
+
<a href="#" class="footer-social-link">
|
| 99 |
+
<i data-feather="twitter"></i>
|
| 100 |
+
</a>
|
| 101 |
+
<a href="#" class="footer-social-link">
|
| 102 |
+
<i data-feather="github"></i>
|
| 103 |
+
</a>
|
| 104 |
+
<a href="#" class="footer-social-link">
|
| 105 |
+
<i data-feather="linkedin"></i>
|
| 106 |
+
</a>
|
| 107 |
+
<a href="#" class="footer-social-link">
|
| 108 |
+
<i data-feather="youtube"></i>
|
| 109 |
+
</a>
|
| 110 |
+
</div>
|
| 111 |
+
</div>
|
| 112 |
+
|
| 113 |
+
<div>
|
| 114 |
+
<h3 class="footer-heading">Product</h3>
|
| 115 |
+
<div class="footer-links">
|
| 116 |
+
<a href="#" class="footer-link">Models</a>
|
| 117 |
+
<a href="#" class="footer-link">Datasets</a>
|
| 118 |
+
<a href="#" class="footer-link">Spaces</a>
|
| 119 |
+
<a href="#" class="footer-link">Pricing</a>
|
| 120 |
+
</div>
|
| 121 |
+
</div>
|
| 122 |
+
|
| 123 |
+
<div>
|
| 124 |
+
<h3 class="footer-heading">Resources</h3>
|
| 125 |
+
<div class="footer-links">
|
| 126 |
+
<a href="#" class="footer-link">Documentation</a>
|
| 127 |
+
<a href="#" class="footer-link">Tutorials</a>
|
| 128 |
+
<a href="#" class="footer-link">API</a>
|
| 129 |
+
<a href="#" class="footer-link">Community</a>
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
|
| 133 |
+
<div>
|
| 134 |
+
<h3 class="footer-heading">Company</h3>
|
| 135 |
+
<div class="footer-links">
|
| 136 |
+
<a href="#" class="footer-link">About</a>
|
| 137 |
+
<a href="#" class="footer-link">Blog</a>
|
| 138 |
+
<a href="#" class="footer-link">Careers</a>
|
| 139 |
+
<a href="#" class="footer-link">Contact</a>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
|
| 144 |
+
<div class="footer-bottom">
|
| 145 |
+
<div>© 2023 NeuralNest. All rights reserved.</div>
|
| 146 |
+
<div class="footer-legal-links">
|
| 147 |
+
<a href="#" class="footer-link">Terms</a>
|
| 148 |
+
<a href="#" class="footer-link">Privacy</a>
|
| 149 |
+
<a href="#" class="footer-link">Cookies</a>
|
| 150 |
+
</div>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
`;
|
| 154 |
+
}
|
| 155 |
+
}
|
| 156 |
+
customElements.define('custom-footer', CustomFooter);
|
components/navbar.js
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
:host {
|
| 7 |
+
display: block;
|
| 8 |
+
width: 100%;
|
| 9 |
+
position: sticky;
|
| 10 |
+
top: 0;
|
| 11 |
+
z-index: 50;
|
| 12 |
+
background-color: white;
|
| 13 |
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
|
| 14 |
+
}
|
| 15 |
+
.nav-container {
|
| 16 |
+
max-width: 1280px;
|
| 17 |
+
margin: 0 auto;
|
| 18 |
+
padding: 1rem 1.5rem;
|
| 19 |
+
display: flex;
|
| 20 |
+
justify-content: space-between;
|
| 21 |
+
align-items: center;
|
| 22 |
+
}
|
| 23 |
+
.logo {
|
| 24 |
+
font-weight: 700;
|
| 25 |
+
font-size: 1.25rem;
|
| 26 |
+
color: #0ea5e9;
|
| 27 |
+
display: flex;
|
| 28 |
+
align-items: center;
|
| 29 |
+
gap: 0.5rem;
|
| 30 |
+
}
|
| 31 |
+
.nav-links {
|
| 32 |
+
display: none;
|
| 33 |
+
gap: 1.5rem;
|
| 34 |
+
}
|
| 35 |
+
.nav-link {
|
| 36 |
+
font-weight: 500;
|
| 37 |
+
color: #4b5563;
|
| 38 |
+
transition: color 0.2s;
|
| 39 |
+
}
|
| 40 |
+
.nav-link:hover {
|
| 41 |
+
color: #0ea5e9;
|
| 42 |
+
}
|
| 43 |
+
.mobile-menu-button {
|
| 44 |
+
display: flex;
|
| 45 |
+
align-items: center;
|
| 46 |
+
justify-content: center;
|
| 47 |
+
padding: 0.5rem;
|
| 48 |
+
border-radius: 0.375rem;
|
| 49 |
+
color: #4b5563;
|
| 50 |
+
}
|
| 51 |
+
.mobile-menu {
|
| 52 |
+
position: absolute;
|
| 53 |
+
top: 100%;
|
| 54 |
+
left: 0;
|
| 55 |
+
right: 0;
|
| 56 |
+
background-color: white;
|
| 57 |
+
padding: 1rem;
|
| 58 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
| 59 |
+
display: none;
|
| 60 |
+
flex-direction: column;
|
| 61 |
+
gap: 0.75rem;
|
| 62 |
+
}
|
| 63 |
+
.mobile-menu-link {
|
| 64 |
+
padding: 0.5rem;
|
| 65 |
+
color: #4b5563;
|
| 66 |
+
}
|
| 67 |
+
@media (min-width: 768px) {
|
| 68 |
+
.nav-links {
|
| 69 |
+
display: flex;
|
| 70 |
+
}
|
| 71 |
+
.mobile-menu-button {
|
| 72 |
+
display: none;
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
.active {
|
| 76 |
+
color: #0ea5e9;
|
| 77 |
+
}
|
| 78 |
+
</style>
|
| 79 |
+
<div class="nav-container">
|
| 80 |
+
<a href="/" class="logo">
|
| 81 |
+
<i data-feather="cpu"></i>
|
| 82 |
+
NeuralNest
|
| 83 |
+
</a>
|
| 84 |
+
|
| 85 |
+
<div class="nav-links">
|
| 86 |
+
<a href="/explore" class="nav-link">Explore</a>
|
| 87 |
+
<a href="/models" class="nav-link">Models</a>
|
| 88 |
+
<a href="/datasets" class="nav-link">Datasets</a>
|
| 89 |
+
<a href="/spaces" class="nav-link">Spaces</a>
|
| 90 |
+
<a href="/community" class="nav-link">Community</a>
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
<div class="flex items-center gap-2">
|
| 94 |
+
<a href="/search" class="p-2 text-gray-500 hover:text-gray-700">
|
| 95 |
+
<i data-feather="search"></i>
|
| 96 |
+
</a>
|
| 97 |
+
<button class="mobile-menu-button" data-mobile-menu-button>
|
| 98 |
+
<i data-feather="menu"></i>
|
| 99 |
+
</button>
|
| 100 |
+
</div>
|
| 101 |
+
|
| 102 |
+
<div class="mobile-menu hidden" data-mobile-menu>
|
| 103 |
+
<a href="/explore" class="mobile-menu-link">Explore</a>
|
| 104 |
+
<a href="/models" class="mobile-menu-link">Models</a>
|
| 105 |
+
<a href="/datasets" class="mobile-menu-link">Datasets</a>
|
| 106 |
+
<a href="/spaces" class="mobile-menu-link">Spaces</a>
|
| 107 |
+
<a href="/community" class="mobile-menu-link">Community</a>
|
| 108 |
+
<div class="border-t border-gray-200 my-2"></div>
|
| 109 |
+
<a href="/login" class="mobile-menu-link">Sign In</a>
|
| 110 |
+
</div>
|
| 111 |
+
</div>
|
| 112 |
+
`;
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
customElements.define('custom-navbar', CustomNavbar);
|
index.html
CHANGED
|
@@ -1,19 +1,154 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>NeuralNest | AI Playground</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 10 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 11 |
+
<script>
|
| 12 |
+
tailwind.config = {
|
| 13 |
+
theme: {
|
| 14 |
+
extend: {
|
| 15 |
+
colors: {
|
| 16 |
+
primary: {
|
| 17 |
+
50: '#f0f9ff',
|
| 18 |
+
100: '#e0f2fe',
|
| 19 |
+
300: '#7dd3fc',
|
| 20 |
+
500: '#0ea5e9',
|
| 21 |
+
700: '#0369a1',
|
| 22 |
+
900: '#0c4a6e',
|
| 23 |
+
},
|
| 24 |
+
secondary: {
|
| 25 |
+
50: '#f5f3ff',
|
| 26 |
+
100: '#ede9fe',
|
| 27 |
+
300: '#c4b5fd',
|
| 28 |
+
500: '#8b5cf6',
|
| 29 |
+
700: '#6d28d9',
|
| 30 |
+
900: '#4c1d95',
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
</script>
|
| 37 |
+
</head>
|
| 38 |
+
<body class="bg-gray-50 min-h-screen">
|
| 39 |
+
<custom-navbar></custom-navbar>
|
| 40 |
+
|
| 41 |
+
<main class="container mx-auto px-4 py-8">
|
| 42 |
+
<section class="mb-16">
|
| 43 |
+
<div class="text-center max-w-3xl mx-auto">
|
| 44 |
+
<h1 class="text-4xl md:text-5xl font-bold text-gray-900 mb-4">Experiment with AI Models</h1>
|
| 45 |
+
<p class="text-xl text-gray-600 mb-8">Discover, run, and share machine learning models in our collaborative ecosystem</p>
|
| 46 |
+
<div class="flex flex-col sm:flex-row justify-center gap-4">
|
| 47 |
+
<a href="/explore" class="bg-primary-500 hover:bg-primary-600 text-white font-medium py-3 px-6 rounded-lg transition duration-200 flex items-center justify-center gap-2">
|
| 48 |
+
<i data-feather="compass"></i>
|
| 49 |
+
Explore Models
|
| 50 |
+
</a>
|
| 51 |
+
<a href="/upload" class="bg-secondary-500 hover:bg-secondary-600 text-white font-medium py-3 px-6 rounded-lg transition duration-200 flex items-center justify-center gap-2">
|
| 52 |
+
<i data-feather="upload"></i>
|
| 53 |
+
Upload Model
|
| 54 |
+
</a>
|
| 55 |
+
</div>
|
| 56 |
+
</div>
|
| 57 |
+
</section>
|
| 58 |
+
|
| 59 |
+
<section class="mb-16">
|
| 60 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-6">Featured Models</h2>
|
| 61 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" id="featured-models">
|
| 62 |
+
<!-- Models will be loaded here -->
|
| 63 |
+
</div>
|
| 64 |
+
</section>
|
| 65 |
+
|
| 66 |
+
<section class="mb-16">
|
| 67 |
+
<div class="bg-gradient-to-r from-primary-500 to-secondary-500 rounded-2xl p-8 text-white">
|
| 68 |
+
<div class="max-w-2xl mx-auto text-center">
|
| 69 |
+
<h2 class="text-2xl font-bold mb-4">Join our AI Community</h2>
|
| 70 |
+
<p class="mb-6">Connect with thousands of AI researchers, developers, and enthusiasts. Share knowledge, collaborate on projects, and accelerate your AI journey.</p>
|
| 71 |
+
<a href="/signup" class="bg-white text-primary-700 hover:bg-gray-100 font-medium py-3 px-6 rounded-lg transition duration-200 inline-block">
|
| 72 |
+
Sign Up Free
|
| 73 |
+
</a>
|
| 74 |
+
</div>
|
| 75 |
+
</div>
|
| 76 |
+
</section>
|
| 77 |
+
|
| 78 |
+
<section>
|
| 79 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-6">Popular Categories</h2>
|
| 80 |
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
| 81 |
+
<a href="/categories/nlp" class="bg-white hover:bg-gray-50 border border-gray-200 rounded-lg p-6 text-center transition duration-200">
|
| 82 |
+
<div class="w-12 h-12 bg-primary-100 rounded-full flex items-center justify-center mx-auto mb-3">
|
| 83 |
+
<i data-feather="message-square" class="text-primary-500"></i>
|
| 84 |
+
</div>
|
| 85 |
+
<h3 class="font-medium">NLP</h3>
|
| 86 |
+
</a>
|
| 87 |
+
<a href="/categories/vision" class="bg-white hover:bg-gray-50 border border-gray-200 rounded-lg p-6 text-center transition duration-200">
|
| 88 |
+
<div class="w-12 h-12 bg-secondary-100 rounded-full flex items-center justify-center mx-auto mb-3">
|
| 89 |
+
<i data-feather="eye" class="text-secondary-500"></i>
|
| 90 |
+
</div>
|
| 91 |
+
<h3 class="font-medium">Computer Vision</h3>
|
| 92 |
+
</a>
|
| 93 |
+
<a href="/categories/generative" class="bg-white hover:bg-gray-50 border border-gray-200 rounded-lg p-6 text-center transition duration-200">
|
| 94 |
+
<div class="w-12 h-12 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-3">
|
| 95 |
+
<i data-feather="image" class="text-purple-500"></i>
|
| 96 |
+
</div>
|
| 97 |
+
<h3 class="font-medium">Generative AI</h3>
|
| 98 |
+
</a>
|
| 99 |
+
<a href="/categories/audio" class="bg-white hover:bg-gray-50 border border-gray-200 rounded-lg p-6 text-center transition duration-200">
|
| 100 |
+
<div class="w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-3">
|
| 101 |
+
<i data-feather="mic" class="text-green-500"></i>
|
| 102 |
+
</div>
|
| 103 |
+
<h3 class="font-medium">Audio</h3>
|
| 104 |
+
</a>
|
| 105 |
+
</div>
|
| 106 |
+
</section>
|
| 107 |
+
</main>
|
| 108 |
+
|
| 109 |
+
<custom-footer></custom-footer>
|
| 110 |
+
|
| 111 |
+
<script src="components/navbar.js"></script>
|
| 112 |
+
<script src="components/footer.js"></script>
|
| 113 |
+
<script src="script.js"></script>
|
| 114 |
+
<script>
|
| 115 |
+
feather.replace();
|
| 116 |
+
// Load featured models
|
| 117 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 118 |
+
fetch('https://api-inference.huggingface.co/models')
|
| 119 |
+
.then(response => response.json())
|
| 120 |
+
.then(data => {
|
| 121 |
+
const featuredModels = data.slice(0, 6);
|
| 122 |
+
const modelsContainer = document.getElementById('featured-models');
|
| 123 |
+
|
| 124 |
+
featuredModels.forEach(model => {
|
| 125 |
+
const modelCard = document.createElement('div');
|
| 126 |
+
modelCard.className = 'bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition duration-200';
|
| 127 |
+
modelCard.innerHTML = `
|
| 128 |
+
<div class="p-6">
|
| 129 |
+
<div class="flex justify-between items-start mb-4">
|
| 130 |
+
<h3 class="font-bold text-lg text-gray-900">${model.id.split('/').pop()}</h3>
|
| 131 |
+
<span class="bg-primary-100 text-primary-800 text-xs px-2 py-1 rounded-full">${model.pipeline_tag || 'model'}</span>
|
| 132 |
+
</div>
|
| 133 |
+
<p class="text-gray-600 text-sm mb-4 line-clamp-2">${model.description || 'No description available'}</p>
|
| 134 |
+
<div class="flex justify-between items-center">
|
| 135 |
+
<div class="flex items-center text-sm text-gray-500">
|
| 136 |
+
<i data-feather="download" class="w-4 h-4 mr-1"></i>
|
| 137 |
+
<span>${Math.round(model.downloads / 1000)}k</span>
|
| 138 |
+
</div>
|
| 139 |
+
<a href="/models/${model.id}" class="text-primary-500 hover:text-primary-600 text-sm font-medium">Try it →</a>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
`;
|
| 143 |
+
modelsContainer.appendChild(modelCard);
|
| 144 |
+
feather.replace();
|
| 145 |
+
});
|
| 146 |
+
})
|
| 147 |
+
.catch(error => {
|
| 148 |
+
console.error('Error fetching models:', error);
|
| 149 |
+
});
|
| 150 |
+
});
|
| 151 |
+
</script>
|
| 152 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 153 |
+
</body>
|
| 154 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Global utility functions
|
| 2 |
+
function debounce(func, wait) {
|
| 3 |
+
let timeout;
|
| 4 |
+
return function(...args) {
|
| 5 |
+
clearTimeout(timeout);
|
| 6 |
+
timeout = setTimeout(() => func.apply(this, args), wait);
|
| 7 |
+
};
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
// Responsive navbar toggle (will be used in navbar component)
|
| 11 |
+
function setupMobileMenu() {
|
| 12 |
+
const mobileMenuButton = document.querySelector('[data-mobile-menu-button]');
|
| 13 |
+
const mobileMenu = document.querySelector('[data-mobile-menu]');
|
| 14 |
+
|
| 15 |
+
if (mobileMenuButton && mobileMenu) {
|
| 16 |
+
mobileMenuButton.addEventListener('click', () => {
|
| 17 |
+
mobileMenu.classList.toggle('hidden');
|
| 18 |
+
});
|
| 19 |
+
}
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
// Initialize when DOM is loaded
|
| 23 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 24 |
+
setupMobileMenu();
|
| 25 |
+
|
| 26 |
+
// Add any other initialization code here
|
| 27 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,38 @@
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Base styles */
|
| 2 |
body {
|
| 3 |
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
| 4 |
+
line-height: 1.5;
|
| 5 |
}
|
| 6 |
|
| 7 |
+
/* Custom styles */
|
| 8 |
+
.line-clamp-2 {
|
| 9 |
+
display: -webkit-box;
|
| 10 |
+
-webkit-line-clamp: 2;
|
| 11 |
+
-webkit-box-orient: vertical;
|
| 12 |
+
overflow: hidden;
|
| 13 |
}
|
| 14 |
|
| 15 |
+
/* Animation for model cards */
|
| 16 |
+
@keyframes fadeIn {
|
| 17 |
+
from {
|
| 18 |
+
opacity: 0;
|
| 19 |
+
transform: translateY(10px);
|
| 20 |
+
}
|
| 21 |
+
to {
|
| 22 |
+
opacity: 1;
|
| 23 |
+
transform: translateY(0);
|
| 24 |
+
}
|
| 25 |
}
|
| 26 |
|
| 27 |
+
#featured-models > div {
|
| 28 |
+
animation: fadeIn 0.3s ease-out forwards;
|
| 29 |
+
opacity: 0;
|
|
|
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
+
/* Delay animations for each card */
|
| 33 |
+
#featured-models > div:nth-child(1) { animation-delay: 0.1s; }
|
| 34 |
+
#featured-models > div:nth-child(2) { animation-delay: 0.2s; }
|
| 35 |
+
#featured-models > div:nth-child(3) { animation-delay: 0.3s; }
|
| 36 |
+
#featured-models > div:nth-child(4) { animation-delay: 0.4s; }
|
| 37 |
+
#featured-models > div:nth-child(5) { animation-delay: 0.5s; }
|
| 38 |
+
#featured-models > div:nth-child(6) { animation-delay: 0.6s; }
|