Build an application that transforms text prompt into video, images, GIF and 3D Models,Use best hugging face tools to deliver a Super Futuristic #D animated page app for this applkication and ensured all tools are working
Browse files- README.md +8 -5
- components/feature-card.js +261 -0
- components/generation-studio.js +416 -0
- components/navbar.js +226 -0
- components/prompt-input.js +321 -0
- index.html +276 -19
- script.js +389 -0
- style.css +212 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: VortexAI Multiverse Generator 🌌
|
| 3 |
+
colorFrom: red
|
| 4 |
+
colorTo: red
|
| 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/feature-card.js
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFeatureCard extends HTMLElement {
|
| 2 |
+
static get observedAttributes() {
|
| 3 |
+
return ['type', 'title', 'description', 'icon', 'color'];
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
connectedCallback() {
|
| 7 |
+
this.attachShadow({ mode: 'open' });
|
| 8 |
+
this.render();
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
getColors(color) {
|
| 12 |
+
const colors = {
|
| 13 |
+
primary: { from: '#0ea5e9', to: '#0284c7', glow: 'rgba(14, 165, 233, 0.3)' },
|
| 14 |
+
secondary: { from: '#d946ef', to: '#c026d3', glow: 'rgba(217, 70, 239, 0.3)' },
|
| 15 |
+
accent: { from: '#f97316', to: '#ea580c', glow: 'rgba(249, 115, 22, 0.3)' }
|
| 16 |
+
};
|
| 17 |
+
return colors[color] || colors.primary;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
render() {
|
| 21 |
+
const type = this.getAttribute('type') || 'image';
|
| 22 |
+
const title = this.getAttribute('title') || 'Feature';
|
| 23 |
+
const description = this.getAttribute('description') || '';
|
| 24 |
+
const icon = this.getAttribute('icon') || 'star';
|
| 25 |
+
const colorKey = this.getAttribute('color') || 'primary';
|
| 26 |
+
const colors = this.getColors(colorKey);
|
| 27 |
+
|
| 28 |
+
this.shadowRoot.innerHTML = `
|
| 29 |
+
<style>
|
| 30 |
+
:host {
|
| 31 |
+
display: block;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.card {
|
| 35 |
+
position: relative;
|
| 36 |
+
height: 100%;
|
| 37 |
+
background: rgba(30, 41, 59, 0.4);
|
| 38 |
+
backdrop-filter: blur(12px);
|
| 39 |
+
border: 1px solid rgba(148, 163, 184, 0.1);
|
| 40 |
+
border-radius: 24px;
|
| 41 |
+
padding: 2rem;
|
| 42 |
+
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
| 43 |
+
overflow: hidden;
|
| 44 |
+
cursor: pointer;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.card::before {
|
| 48 |
+
content: '';
|
| 49 |
+
position: absolute;
|
| 50 |
+
top: 0;
|
| 51 |
+
left: 0;
|
| 52 |
+
right: 0;
|
| 53 |
+
height: 4px;
|
| 54 |
+
background: linear-gradient(90deg, ${colors.from}, ${colors.to});
|
| 55 |
+
transform: scaleX(0);
|
| 56 |
+
transition: transform 0.4s ease;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.card:hover {
|
| 60 |
+
transform: translateY(-8px) scale(1.02);
|
| 61 |
+
border-color: ${colors.from}40;
|
| 62 |
+
box-shadow: 0 30px 60px -15px ${colors.glow};
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.card:hover::before {
|
| 66 |
+
transform: scaleX(1);
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.icon-wrapper {
|
| 70 |
+
width: 64px;
|
| 71 |
+
height: 64px;
|
| 72 |
+
border-radius: 20px;
|
| 73 |
+
background: linear-gradient(135deg, ${colors.from}20, ${colors.to}20);
|
| 74 |
+
border: 1px solid ${colors.from}30;
|
| 75 |
+
display: flex;
|
| 76 |
+
align-items: center;
|
| 77 |
+
justify-content: center;
|
| 78 |
+
margin-bottom: 1.5rem;
|
| 79 |
+
transition: all 0.3s ease;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.card:hover .icon-wrapper {
|
| 83 |
+
transform: scale(1.1) rotate(-5deg);
|
| 84 |
+
background: linear-gradient(135deg, ${colors.from}, ${colors.to});
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.icon-wrapper i {
|
| 88 |
+
color: ${colors.from};
|
| 89 |
+
transition: color 0.3s ease;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
.card:hover .icon-wrapper i {
|
| 93 |
+
color: white;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
.badge {
|
| 97 |
+
position: absolute;
|
| 98 |
+
top: 1.5rem;
|
| 99 |
+
right: 1.5rem;
|
| 100 |
+
padding: 0.375rem 0.875rem;
|
| 101 |
+
background: ${colors.from}15;
|
| 102 |
+
border: 1px solid ${colors.from}30;
|
| 103 |
+
border-radius: 9999px;
|
| 104 |
+
color: ${colors.from};
|
| 105 |
+
font-size: 0.75rem;
|
| 106 |
+
font-weight: 600;
|
| 107 |
+
text-transform: uppercase;
|
| 108 |
+
letter-spacing: 0.05em;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
h3 {
|
| 112 |
+
font-size: 1.5rem;
|
| 113 |
+
font-weight: 700;
|
| 114 |
+
color: #f8fafc;
|
| 115 |
+
margin-bottom: 0.75rem;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
p {
|
| 119 |
+
color: #94a3b8;
|
| 120 |
+
font-size: 0.9375rem;
|
| 121 |
+
line-height: 1.7;
|
| 122 |
+
margin-bottom: 1.5rem;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
.features {
|
| 126 |
+
display: flex;
|
| 127 |
+
flex-direction: column;
|
| 128 |
+
gap: 0.75rem;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
.feature-item {
|
| 132 |
+
display: flex;
|
| 133 |
+
align-items: center;
|
| 134 |
+
gap: 0.75rem;
|
| 135 |
+
font-size: 0.875rem;
|
| 136 |
+
color: #64748b;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.feature-item i {
|
| 140 |
+
color: ${colors.from};
|
| 141 |
+
width: 16px;
|
| 142 |
+
height: 16px;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
.demo-preview {
|
| 146 |
+
margin-top: 1.5rem;
|
| 147 |
+
padding: 1rem;
|
| 148 |
+
background: rgba(15, 23, 42, 0.5);
|
| 149 |
+
border-radius: 16px;
|
| 150 |
+
border: 1px dashed ${colors.from}30;
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
.preview-bar {
|
| 154 |
+
height: 8px;
|
| 155 |
+
background: rgba(148, 163, 184, 0.1);
|
| 156 |
+
border-radius: 4px;
|
| 157 |
+
margin-bottom: 0.5rem;
|
| 158 |
+
overflow: hidden;
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
.preview-fill {
|
| 162 |
+
height: 100%;
|
| 163 |
+
width: ${Math.random() * 60 + 40}%;
|
| 164 |
+
background: linear-gradient(90deg, ${colors.from}, ${colors.to});
|
| 165 |
+
border-radius: 4px;
|
| 166 |
+
animation: pulse 2s ease-in-out infinite;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
@keyframes pulse {
|
| 170 |
+
0%, 100% { opacity: 0.6; }
|
| 171 |
+
50% { opacity: 1; }
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
.cta-arrow {
|
| 175 |
+
position: absolute;
|
| 176 |
+
bottom: 1.5rem;
|
| 177 |
+
right: 1.5rem;
|
| 178 |
+
width: 48px;
|
| 179 |
+
height: 48px;
|
| 180 |
+
border-radius: 50%;
|
| 181 |
+
background: rgba(148, 163, 184, 0.1);
|
| 182 |
+
display: flex;
|
| 183 |
+
align-items: center;
|
| 184 |
+
justify-content: center;
|
| 185 |
+
opacity: 0;
|
| 186 |
+
transform: translateX(-10px);
|
| 187 |
+
transition: all 0.3s ease;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
.card:hover .cta-arrow {
|
| 191 |
+
opacity: 1;
|
| 192 |
+
transform: translateX(0);
|
| 193 |
+
background: ${colors.from};
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
.cta-arrow i {
|
| 197 |
+
color: white;
|
| 198 |
+
}
|
| 199 |
+
</style>
|
| 200 |
+
|
| 201 |
+
<div class="card" onclick="window.location.href='#studio'">
|
| 202 |
+
<span class="badge">${type}</span>
|
| 203 |
+
|
| 204 |
+
<div class="icon-wrapper">
|
| 205 |
+
<i data-feather="${icon}" style="width: 28px; height: 28px;"></i>
|
| 206 |
+
</div>
|
| 207 |
+
|
| 208 |
+
<h3>${title}</h3>
|
| 209 |
+
<p>${description}</p>
|
| 210 |
+
|
| 211 |
+
<div class="features">
|
| 212 |
+
${this.getFeatureItems(type, colors.from)}
|
| 213 |
+
</div>
|
| 214 |
+
|
| 215 |
+
<div class="demo-preview">
|
| 216 |
+
<div class="preview-bar"><div class="preview-fill"></div></div>
|
| 217 |
+
<div class="preview-bar"><div class="preview-fill" style="width: ${Math.random() * 40 + 30}%; animation-delay: 0.5s;"></div></div>
|
| 218 |
+
<div class="preview-bar"><div class="preview-fill" style="width: ${Math.random() * 50 + 20}%; animation-delay: 1s;"></div></div>
|
| 219 |
+
</div>
|
| 220 |
+
|
| 221 |
+
<div class="cta-arrow">
|
| 222 |
+
<i data-feather="arrow-right" style="width: 20px; height: 20px;"></i>
|
| 223 |
+
</div>
|
| 224 |
+
</div>
|
| 225 |
+
`;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
getFeatureItems(type, color) {
|
| 229 |
+
const features = {
|
| 230 |
+
image: [
|
| 231 |
+
{ icon: 'maximize', text: 'Up to 4K resolution' },
|
| 232 |
+
{ icon: 'layers', text: 'Multiple style presets' },
|
| 233 |
+
{ icon: 'sliders', text: 'Advanced parameters' }
|
| 234 |
+
],
|
| 235 |
+
video: [
|
| 236 |
+
{ icon: 'clock', text: 'Up to 10 seconds' },
|
| 237 |
+
{ icon: 'repeat', text: 'Seamless looping' },
|
| 238 |
+
{ icon: 'film', text: '60 FPS output' }
|
| 239 |
+
],
|
| 240 |
+
gif: [
|
| 241 |
+
{ icon: 'loader', text: 'Optimized file size' },
|
| 242 |
+
{ icon: 'palette', text: 'Custom color palettes' },
|
| 243 |
+
{ icon: 'share-2', text: 'Instant sharing' }
|
| 244 |
+
],
|
| 245 |
+
'3d': [
|
| 246 |
+
{ icon: 'box', text: 'OBJ/GLTF export' },
|
| 247 |
+
{ icon: 'grid', text: 'PBR textures' },
|
| 248 |
+
{ icon: 'printer', text: 'Print-ready models' }
|
| 249 |
+
]
|
| 250 |
+
};
|
| 251 |
+
|
| 252 |
+
return (features[type] || features.image).map(f => `
|
| 253 |
+
<div class="feature-item">
|
| 254 |
+
<i data-feather="${f.icon}" style="color: ${color};"></i>
|
| 255 |
+
<span>${f.text}</span>
|
| 256 |
+
</div>
|
| 257 |
+
`).join('');
|
| 258 |
+
}
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
customElements.define('custom-feature-card', CustomFeatureCard);
|
components/generation-studio.js
ADDED
|
@@ -0,0 +1,416 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomGenerationStudio extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.render();
|
| 5 |
+
this.attachEvents();
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
render() {
|
| 9 |
+
this.shadowRoot.innerHTML = `
|
| 10 |
+
<style>
|
| 11 |
+
:host {
|
| 12 |
+
display: block;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
.studio-grid {
|
| 16 |
+
display: grid;
|
| 17 |
+
grid-template-columns: 300px 1fr;
|
| 18 |
+
gap: 2rem;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
@media (max-width: 1024px) {
|
| 22 |
+
.studio-grid {
|
| 23 |
+
grid-template-columns: 1fr;
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.sidebar {
|
| 28 |
+
display: flex;
|
| 29 |
+
flex-direction: column;
|
| 30 |
+
gap: 1.5rem;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.panel {
|
| 34 |
+
background: rgba(15, 23, 42, 0.5);
|
| 35 |
+
border: 1px solid rgba(148, 163, 184, 0.1);
|
| 36 |
+
border-radius: 16px;
|
| 37 |
+
padding: 1.5rem;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.panel-title {
|
| 41 |
+
font-size: 0.875rem;
|
| 42 |
+
font-weight: 600;
|
| 43 |
+
color: #e2e8f0;
|
| 44 |
+
margin-bottom: 1rem;
|
| 45 |
+
text-transform: uppercase;
|
| 46 |
+
letter-spacing: 0.05em;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.model-list {
|
| 50 |
+
display: flex;
|
| 51 |
+
flex-direction: column;
|
| 52 |
+
gap: 0.5rem;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.model-item {
|
| 56 |
+
padding: 0.875rem 1rem;
|
| 57 |
+
border-radius: 12px;
|
| 58 |
+
background: transparent;
|
| 59 |
+
border: 1px solid transparent;
|
| 60 |
+
color: #94a3b8;
|
| 61 |
+
font-size: 0.875rem;
|
| 62 |
+
cursor: pointer;
|
| 63 |
+
transition: all 0.2s ease;
|
| 64 |
+
display: flex;
|
| 65 |
+
align-items: center;
|
| 66 |
+
gap: 0.75rem;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.model-item:hover {
|
| 70 |
+
background: rgba(30, 41, 59, 0.5);
|
| 71 |
+
color: #e2e8f0;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
.model-item.active {
|
| 75 |
+
background: rgba(14, 165, 233, 0.1);
|
| 76 |
+
border-color: rgba(14, 165, 233, 0.3);
|
| 77 |
+
color: #0ea5e9;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
.model-item .status {
|
| 81 |
+
width: 8px;
|
| 82 |
+
height: 8px;
|
| 83 |
+
border-radius: 50%;
|
| 84 |
+
background: #10b981;
|
| 85 |
+
margin-left: auto;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
.parameter {
|
| 89 |
+
margin-bottom: 1.25rem;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
.parameter-header {
|
| 93 |
+
display: flex;
|
| 94 |
+
justify-content: space-between;
|
| 95 |
+
margin-bottom: 0.5rem;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
.parameter-label {
|
| 99 |
+
font-size: 0.8125rem;
|
| 100 |
+
color: #94a3b8;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.parameter-value {
|
| 104 |
+
font-size: 0.8125rem;
|
| 105 |
+
color: #0ea5e9;
|
| 106 |
+
font-weight: 500;
|
| 107 |
+
font-family: monospace;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
input[type="range"] {
|
| 111 |
+
width: 100%;
|
| 112 |
+
height: 6px;
|
| 113 |
+
-webkit-appearance: none;
|
| 114 |
+
background: rgba(148, 163, 184, 0.2);
|
| 115 |
+
border-radius: 3px;
|
| 116 |
+
outline: none;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
input[type="range"]::-webkit-slider-thumb {
|
| 120 |
+
-webkit-appearance: none;
|
| 121 |
+
width: 18px;
|
| 122 |
+
height: 18px;
|
| 123 |
+
background: linear-gradient(135deg, #0ea5e9, #d946ef);
|
| 124 |
+
border-radius: 50%;
|
| 125 |
+
cursor: pointer;
|
| 126 |
+
transition: transform 0.2s ease;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
input[type="range"]::-webkit-slider-thumb:hover {
|
| 130 |
+
transform: scale(1.2);
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.dimension-grid {
|
| 134 |
+
display: grid;
|
| 135 |
+
grid-template-columns: repeat(3, 1fr);
|
| 136 |
+
gap: 0.5rem;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.dimension-btn {
|
| 140 |
+
padding: 0.625rem;
|
| 141 |
+
border-radius: 10px;
|
| 142 |
+
background: rgba(30, 41, 59, 0.5);
|
| 143 |
+
border: 1px solid rgba(148, 163, 184, 0.1);
|
| 144 |
+
color: #94a3b8;
|
| 145 |
+
font-size: 0.75rem;
|
| 146 |
+
cursor: pointer;
|
| 147 |
+
transition: all 0.2s ease;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
.dimension-btn:hover {
|
| 151 |
+
background: rgba(30, 41, 59, 0.8);
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.dimension-btn.active {
|
| 155 |
+
background: linear-gradient(135deg, #0ea5e9, #d946ef);
|
| 156 |
+
color: white;
|
| 157 |
+
border-color: transparent;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
.main-area {
|
| 161 |
+
display: flex;
|
| 162 |
+
flex-direction: column;
|
| 163 |
+
gap: 1.5rem;
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
.canvas-area {
|
| 167 |
+
aspect-ratio: 16/10;
|
| 168 |
+
background: rgba(15, 23, 42, 0.8);
|
| 169 |
+
border: 2px dashed rgba(148, 163, 184, 0.2);
|
| 170 |
+
border-radius: 24px;
|
| 171 |
+
display: flex;
|
| 172 |
+
flex-direction: column;
|
| 173 |
+
align-items: center;
|
| 174 |
+
justify-content: center;
|
| 175 |
+
position: relative;
|
| 176 |
+
overflow: hidden;
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
.canvas-area.has-content {
|
| 180 |
+
border-style: solid;
|
| 181 |
+
border-color: rgba(14, 165, 233, 0.3);
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
.drop-zone {
|
| 185 |
+
text-align: center;
|
| 186 |
+
padding: 3rem;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
.drop-icon {
|
| 190 |
+
width: 80px;
|
| 191 |
+
height: 80px;
|
| 192 |
+
margin: 0 auto 1.5rem;
|
| 193 |
+
border-radius: 24px;
|
| 194 |
+
background: linear-gradient(135deg, #0ea5e920, #d946ef20);
|
| 195 |
+
display: flex;
|
| 196 |
+
align-items: center;
|
| 197 |
+
justify-content: center;
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
.drop-icon i {
|
| 201 |
+
color: #0ea5e9;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
.drop-text {
|
| 205 |
+
color: #94a3b8;
|
| 206 |
+
font-size: 1rem;
|
| 207 |
+
margin-bottom: 0.5rem;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
.drop-subtext {
|
| 211 |
+
color: #64748b;
|
| 212 |
+
font-size: 0.875rem;
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
.preview-canvas {
|
| 216 |
+
position: absolute;
|
| 217 |
+
inset: 0;
|
| 218 |
+
width: 100%;
|
| 219 |
+
height: 100%;
|
| 220 |
+
object-fit: contain;
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
.generation-overlay {
|
| 224 |
+
position: absolute;
|
| 225 |
+
inset: 0;
|
| 226 |
+
background: rgba(15, 23, 42, 0.9);
|
| 227 |
+
display: flex;
|
| 228 |
+
flex-direction: column;
|
| 229 |
+
align-items: center;
|
| 230 |
+
justify-content: center;
|
| 231 |
+
gap: 1.5rem;
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
.neural-spinner {
|
| 235 |
+
width: 120px;
|
| 236 |
+
height: 120px;
|
| 237 |
+
position: relative;
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
.neural-ring {
|
| 241 |
+
position: absolute;
|
| 242 |
+
inset: 0;
|
| 243 |
+
border: 3px solid transparent;
|
| 244 |
+
border-top-color: #0ea5e9;
|
| 245 |
+
border-radius: 50%;
|
| 246 |
+
animation: spin 2s linear infinite;
|
| 247 |
+
}
|
| 248 |
+
|
| 249 |
+
.neural-ring:nth-child(2) {
|
| 250 |
+
inset: 15px;
|
| 251 |
+
border-top-color: #d946ef;
|
| 252 |
+
animation-duration: 1.5s;
|
| 253 |
+
animation-direction: reverse;
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
.neural-ring:nth-child(3) {
|
| 257 |
+
inset: 30px;
|
| 258 |
+
border-top-color: #f97316;
|
| 259 |
+
animation-duration: 1s;
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
@keyframes spin {
|
| 263 |
+
to { transform: rotate(360deg); }
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
.progress-text {
|
| 267 |
+
font-size: 1.125rem;
|
| 268 |
+
color: #e2e8f0;
|
| 269 |
+
font-weight: 500;
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
.progress-bar {
|
| 273 |
+
width: 200px;
|
| 274 |
+
height: 4px;
|
| 275 |
+
background: rgba(148, 163, 184, 0.2);
|
| 276 |
+
border-radius: 2px;
|
| 277 |
+
overflow: hidden;
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
.progress-fill {
|
| 281 |
+
height: 100%;
|
| 282 |
+
background: linear-gradient(90deg, #0ea5e9, #d946ef);
|
| 283 |
+
border-radius: 2px;
|
| 284 |
+
transition: width 0.3s ease;
|
| 285 |
+
width: 0%;
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
.timeline {
|
| 289 |
+
display: flex;
|
| 290 |
+
gap: 1rem;
|
| 291 |
+
padding: 1rem;
|
| 292 |
+
background: rgba(15, 23, 42, 0.5);
|
| 293 |
+
border-radius: 16px;
|
| 294 |
+
overflow-x: auto;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
.timeline-item {
|
| 298 |
+
flex-shrink: 0;
|
| 299 |
+
width: 120px;
|
| 300 |
+
aspect-ratio: 16/10;
|
| 301 |
+
border-radius: 12px;
|
| 302 |
+
background: rgba(30, 41, 59, 0.5);
|
| 303 |
+
border: 2px solid transparent;
|
| 304 |
+
cursor: pointer;
|
| 305 |
+
transition: all 0.2s ease;
|
| 306 |
+
position: relative;
|
| 307 |
+
overflow: hidden;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
.timeline-item:hover {
|
| 311 |
+
border-color: #0ea5e9;
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
.timeline-item.active {
|
| 315 |
+
border-color: #0ea5e9;
|
| 316 |
+
box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
.timeline-thumb {
|
| 320 |
+
width: 100%;
|
| 321 |
+
height: 100%;
|
| 322 |
+
object-fit: cover;
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
.timeline-number {
|
| 326 |
+
position: absolute;
|
| 327 |
+
bottom: 0.5rem;
|
| 328 |
+
left: 0.5rem;
|
| 329 |
+
padding: 0.25rem 0.5rem;
|
| 330 |
+
background: rgba(15, 23, 42, 0.8);
|
| 331 |
+
border-radius: 6px;
|
| 332 |
+
font-size: 0.75rem;
|
| 333 |
+
font-weight: 600;
|
| 334 |
+
color: #e2e8f0;
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
.action-bar {
|
| 338 |
+
display: flex;
|
| 339 |
+
gap: 1rem;
|
| 340 |
+
justify-content: center;
|
| 341 |
+
}
|
| 342 |
+
|
| 343 |
+
.action-btn {
|
| 344 |
+
padding: 0.875rem 1.5rem;
|
| 345 |
+
border-radius: 12px;
|
| 346 |
+
border: 1px solid rgba(148, 163, 184, 0.2);
|
| 347 |
+
background: rgba(30, 41, 59, 0.5);
|
| 348 |
+
color: #e2e8f0;
|
| 349 |
+
font-size: 0.875rem;
|
| 350 |
+
font-weight: 500;
|
| 351 |
+
cursor: pointer;
|
| 352 |
+
transition: all 0.2s ease;
|
| 353 |
+
display: flex;
|
| 354 |
+
align-items: center;
|
| 355 |
+
gap: 0.5rem;
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
+
.action-btn:hover {
|
| 359 |
+
background: rgba(30, 41, 59, 0.8);
|
| 360 |
+
border-color: #0ea5e9;
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
.action-btn.primary {
|
| 364 |
+
background: linear-gradient(135deg, #0ea5e9, #d946ef);
|
| 365 |
+
border-color: transparent;
|
| 366 |
+
color: white;
|
| 367 |
+
}
|
| 368 |
+
|
| 369 |
+
.action-btn.primary:hover {
|
| 370 |
+
transform: scale(1.05);
|
| 371 |
+
box-shadow: 0 10px 40px rgba(14, 165, 233, 0.4);
|
| 372 |
+
}
|
| 373 |
+
</style>
|
| 374 |
+
|
| 375 |
+
<div class="studio-grid">
|
| 376 |
+
<aside class="sidebar">
|
| 377 |
+
<div class="panel">
|
| 378 |
+
<h4 class="panel-title">AI Model</h4>
|
| 379 |
+
<div class="model-list">
|
| 380 |
+
<button class="model-item active" data-model="stable-diffusion-xl">
|
| 381 |
+
<i data-feather="cpu" style="width: 16px; height: 16px;"></i>
|
| 382 |
+
Stable Diffusion XL
|
| 383 |
+
<span class="status"></span>
|
| 384 |
+
</button>
|
| 385 |
+
<button class="model-item" data-model="realistic-vision">
|
| 386 |
+
<i data-feather="camera" style="width: 16px; height: 16px;"></i>
|
| 387 |
+
Realistic Vision
|
| 388 |
+
<span class="status"></span>
|
| 389 |
+
</button>
|
| 390 |
+
<button class="model-item" data-model="anime-diffusion">
|
| 391 |
+
<i data-feather="pen-tool" style="width: 16px; height: 16px;"></i>
|
| 392 |
+
Anime Diffusion
|
| 393 |
+
<span class="status"></span>
|
| 394 |
+
</button>
|
| 395 |
+
<button class="model-item" data-model="deepfloyd-if">
|
| 396 |
+
<i data-feather="aperture" style="width: 16px; height: 16px;"></i>
|
| 397 |
+
DeepFloyd IF
|
| 398 |
+
<span class="status"></span>
|
| 399 |
+
</button>
|
| 400 |
+
</div>
|
| 401 |
+
</div>
|
| 402 |
+
|
| 403 |
+
<div class="panel">
|
| 404 |
+
<h4 class="panel-title">Dimensions</h4>
|
| 405 |
+
<div class="dimension-grid">
|
| 406 |
+
<button class="dimension-btn" data-w="512" data-h="512">512²</button>
|
| 407 |
+
<button class="dimension-btn" data-w="768" data-h="768">768²</button>
|
| 408 |
+
<button class="dimension-btn active" data-w="1024" data-h="1024">1024²</button>
|
| 409 |
+
<button class="dimension-btn" data-w="1024" data-h="576">16:9</button>
|
| 410 |
+
<button class="dimension-btn" data-w="576" data-h="1024">9:16</button>
|
| 411 |
+
<button class="dimension-btn" data-w="1024" data-h="768">4:3</button>
|
| 412 |
+
</div>
|
| 413 |
+
</div>
|
| 414 |
+
|
| 415 |
+
<div class="panel">
|
| 416 |
+
<h4 class="panel-title">Parameters</h
|
components/navbar.js
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.render();
|
| 5 |
+
this.initScrollBehavior();
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
render() {
|
| 9 |
+
this.shadowRoot.innerHTML = `
|
| 10 |
+
<style>
|
| 11 |
+
:host {
|
| 12 |
+
display: block;
|
| 13 |
+
position: fixed;
|
| 14 |
+
top: 0;
|
| 15 |
+
left: 0;
|
| 16 |
+
right: 0;
|
| 17 |
+
z-index: 1000;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
nav {
|
| 21 |
+
background: rgba(15, 23, 42, 0.8);
|
| 22 |
+
backdrop-filter: blur(20px);
|
| 23 |
+
-webkit-backdrop-filter: blur(20px);
|
| 24 |
+
border-bottom: 1px solid rgba(148, 163, 184, 0.1);
|
| 25 |
+
transition: all 0.3s ease;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
nav.scrolled {
|
| 29 |
+
background: rgba(15, 23, 42, 0.95);
|
| 30 |
+
box-shadow: 0 4px 30px rgba(2, 8, 20, 0.5);
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.nav-container {
|
| 34 |
+
max-width: 1400px;
|
| 35 |
+
margin: 0 auto;
|
| 36 |
+
padding: 1rem 1.5rem;
|
| 37 |
+
display: flex;
|
| 38 |
+
align-items: center;
|
| 39 |
+
justify-content: space-between;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
.logo {
|
| 43 |
+
display: flex;
|
| 44 |
+
align-items: center;
|
| 45 |
+
gap: 0.75rem;
|
| 46 |
+
text-decoration: none;
|
| 47 |
+
color: inherit;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.logo-icon {
|
| 51 |
+
width: 40px;
|
| 52 |
+
height: 40px;
|
| 53 |
+
background: linear-gradient(135deg, #0ea5e9, #d946ef);
|
| 54 |
+
border-radius: 12px;
|
| 55 |
+
display: flex;
|
| 56 |
+
align-items: center;
|
| 57 |
+
justify-content: center;
|
| 58 |
+
font-size: 1.5rem;
|
| 59 |
+
animation: spin 20s linear infinite;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
@keyframes spin {
|
| 63 |
+
from { transform: rotate(0deg); }
|
| 64 |
+
to { transform: rotate(360deg); }
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
.logo-text {
|
| 68 |
+
font-size: 1.5rem;
|
| 69 |
+
font-weight: 700;
|
| 70 |
+
background: linear-gradient(135deg, #0ea5e9, #d946ef);
|
| 71 |
+
-webkit-background-clip: text;
|
| 72 |
+
-webkit-text-fill-color: transparent;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.nav-links {
|
| 76 |
+
display: flex;
|
| 77 |
+
align-items: center;
|
| 78 |
+
gap: 2rem;
|
| 79 |
+
list-style: none;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.nav-links a {
|
| 83 |
+
color: #94a3b8;
|
| 84 |
+
text-decoration: none;
|
| 85 |
+
font-size: 0.875rem;
|
| 86 |
+
font-weight: 500;
|
| 87 |
+
transition: color 0.2s ease;
|
| 88 |
+
position: relative;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.nav-links a:hover {
|
| 92 |
+
color: #0ea5e9;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
.nav-links a::after {
|
| 96 |
+
content: '';
|
| 97 |
+
position: absolute;
|
| 98 |
+
bottom: -4px;
|
| 99 |
+
left: 0;
|
| 100 |
+
width: 0;
|
| 101 |
+
height: 2px;
|
| 102 |
+
background: linear-gradient(90deg, #0ea5e9, #d946ef);
|
| 103 |
+
transition: width 0.3s ease;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
.nav-links a:hover::after {
|
| 107 |
+
width: 100%;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.nav-actions {
|
| 111 |
+
display: flex;
|
| 112 |
+
align-items: center;
|
| 113 |
+
gap: 1rem;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
.btn-primary {
|
| 117 |
+
padding: 0.625rem 1.25rem;
|
| 118 |
+
background: linear-gradient(135deg, #0ea5e9, #d946ef);
|
| 119 |
+
border: none;
|
| 120 |
+
border-radius: 9999px;
|
| 121 |
+
color: white;
|
| 122 |
+
font-size: 0.875rem;
|
| 123 |
+
font-weight: 600;
|
| 124 |
+
cursor: pointer;
|
| 125 |
+
transition: all 0.3s ease;
|
| 126 |
+
text-decoration: none;
|
| 127 |
+
display: inline-flex;
|
| 128 |
+
align-items: center;
|
| 129 |
+
gap: 0.5rem;
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
.btn-primary:hover {
|
| 133 |
+
transform: scale(1.05);
|
| 134 |
+
box-shadow: 0 10px 40px rgba(14, 165, 233, 0.4);
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
.btn-secondary {
|
| 138 |
+
padding: 0.625rem 1.25rem;
|
| 139 |
+
background: rgba(30, 41, 59, 0.5);
|
| 140 |
+
border: 1px solid rgba(148, 163, 184, 0.2);
|
| 141 |
+
border-radius: 9999px;
|
| 142 |
+
color: #e2e8f0;
|
| 143 |
+
font-size: 0.875rem;
|
| 144 |
+
font-weight: 500;
|
| 145 |
+
cursor: pointer;
|
| 146 |
+
transition: all 0.3s ease;
|
| 147 |
+
text-decoration: none;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
.btn-secondary:hover {
|
| 151 |
+
background: rgba(30, 41, 59, 0.8);
|
| 152 |
+
border-color: #0ea5e9;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.mobile-menu-btn {
|
| 156 |
+
display: none;
|
| 157 |
+
background: none;
|
| 158 |
+
border: none;
|
| 159 |
+
color: #e2e8f0;
|
| 160 |
+
cursor: pointer;
|
| 161 |
+
padding: 0.5rem;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
@media (max-width: 1024px) {
|
| 165 |
+
.nav-links {
|
| 166 |
+
display: none;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
.mobile-menu-btn {
|
| 170 |
+
display: block;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
.nav-actions .btn-secondary {
|
| 174 |
+
display: none;
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
</style>
|
| 178 |
+
|
| 179 |
+
<nav id="navbar">
|
| 180 |
+
<div class="nav-container">
|
| 181 |
+
<a href="index.html" class="logo">
|
| 182 |
+
<div class="logo-icon">🌀</div>
|
| 183 |
+
<span class="logo-text">VortexAI</span>
|
| 184 |
+
</a>
|
| 185 |
+
|
| 186 |
+
<ul class="nav-links">
|
| 187 |
+
<li><a href="#studio">Studio</a></li>
|
| 188 |
+
<li><a href="#gallery">Gallery</a></li>
|
| 189 |
+
<li><a href="#pricing">Pricing</a></li>
|
| 190 |
+
<li><a href="#api">API</a></li>
|
| 191 |
+
</ul>
|
| 192 |
+
|
| 193 |
+
<div class="nav-actions">
|
| 194 |
+
<a href="#login" class="btn-secondary">Sign In</a>
|
| 195 |
+
<a href="#studio" class="btn-primary">
|
| 196 |
+
<i data-feather="zap" style="width: 16px; height: 16px;"></i>
|
| 197 |
+
Start Creating
|
| 198 |
+
</a>
|
| 199 |
+
<button class="mobile-menu-btn">
|
| 200 |
+
<i data-feather="menu"></i>
|
| 201 |
+
</button>
|
| 202 |
+
</div>
|
| 203 |
+
</div>
|
| 204 |
+
</nav>
|
| 205 |
+
`;
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
initScrollBehavior() {
|
| 209 |
+
const navbar = this.shadowRoot.getElementById('navbar');
|
| 210 |
+
let lastScroll = 0;
|
| 211 |
+
|
| 212 |
+
window.addEventListener('scroll', () => {
|
| 213 |
+
const currentScroll = window.pageYOffset;
|
| 214 |
+
|
| 215 |
+
if (currentScroll > 100) {
|
| 216 |
+
navbar.classList.add('scrolled');
|
| 217 |
+
} else {
|
| 218 |
+
navbar.classList.remove('scrolled');
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
lastScroll = currentScroll;
|
| 222 |
+
});
|
| 223 |
+
}
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
customElements.define('custom-navbar', CustomNavbar);
|
components/prompt-input.js
ADDED
|
@@ -0,0 +1,321 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
this.attachEvents();
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
render() {
|
| 14 |
+
this.shadowRoot.innerHTML = `
|
| 15 |
+
<style>
|
| 16 |
+
:host {
|
| 17 |
+
display: block;
|
| 18 |
+
width: 100%;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.prompt-container {
|
| 22 |
+
background: rgba(30, 41, 59, 0.6);
|
| 23 |
+
backdrop-filter: blur(20px);
|
| 24 |
+
border: 1px solid rgba(148, 163, 184, 0.2);
|
| 25 |
+
border-radius: 24px;
|
| 26 |
+
padding: 1.5rem;
|
| 27 |
+
transition: all 0.3s ease;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
.prompt-container:focus-within {
|
| 31 |
+
border-color: #0ea5e9;
|
| 32 |
+
box-shadow: 0 0 60px rgba(14, 165, 233, 0.2);
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.mode-selector {
|
| 36 |
+
display: flex;
|
| 37 |
+
gap: 0.5rem;
|
| 38 |
+
margin-bottom: 1rem;
|
| 39 |
+
flex-wrap: wrap;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
.mode-btn {
|
| 43 |
+
padding: 0.5rem 1rem;
|
| 44 |
+
border-radius: 9999px;
|
| 45 |
+
border: 1px solid transparent;
|
| 46 |
+
background: rgba(15, 23, 42, 0.5);
|
| 47 |
+
color: #94a3b8;
|
| 48 |
+
font-size: 0.875rem;
|
| 49 |
+
font-weight: 500;
|
| 50 |
+
cursor: pointer;
|
| 51 |
+
transition: all 0.2s ease;
|
| 52 |
+
display: flex;
|
| 53 |
+
align-items: center;
|
| 54 |
+
gap: 0.5rem;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.mode-btn:hover {
|
| 58 |
+
background: rgba(30, 41, 59, 0.8);
|
| 59 |
+
color: #e2e8f0;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.mode-btn.active {
|
| 63 |
+
background: linear-gradient(135deg, #0ea5e9, #d946ef);
|
| 64 |
+
color: white;
|
| 65 |
+
border-color: transparent;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.input-wrapper {
|
| 69 |
+
position: relative;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
textarea {
|
| 73 |
+
width: 100%;
|
| 74 |
+
min-height: 120px;
|
| 75 |
+
background: transparent;
|
| 76 |
+
border: none;
|
| 77 |
+
color: #e2e8f0;
|
| 78 |
+
font-size: 1.125rem;
|
| 79 |
+
line-height: 1.6;
|
| 80 |
+
resize: none;
|
| 81 |
+
outline: none;
|
| 82 |
+
font-family: inherit;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
textarea::placeholder {
|
| 86 |
+
color: #64748b;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.input-footer {
|
| 90 |
+
display: flex;
|
| 91 |
+
align-items: center;
|
| 92 |
+
justify-content: space-between;
|
| 93 |
+
margin-top: 1rem;
|
| 94 |
+
padding-top: 1rem;
|
| 95 |
+
border-top: 1px solid rgba(148, 163, 184, 0.1);
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
.input-actions {
|
| 99 |
+
display: flex;
|
| 100 |
+
gap: 0.75rem;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.action-btn {
|
| 104 |
+
width: 40px;
|
| 105 |
+
height: 40px;
|
| 106 |
+
border-radius: 12px;
|
| 107 |
+
border: 1px solid rgba(148, 163, 184, 0.2);
|
| 108 |
+
background: rgba(15, 23, 42, 0.5);
|
| 109 |
+
color: #94a3b8;
|
| 110 |
+
cursor: pointer;
|
| 111 |
+
transition: all 0.2s ease;
|
| 112 |
+
display: flex;
|
| 113 |
+
align-items: center;
|
| 114 |
+
justify-content: center;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
.action-btn:hover {
|
| 118 |
+
background: rgba(30, 41, 59, 0.8);
|
| 119 |
+
color: #0ea5e9;
|
| 120 |
+
border-color: #0ea5e9;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.generate-btn {
|
| 124 |
+
padding: 0.875rem 2rem;
|
| 125 |
+
background: linear-gradient(135deg, #0ea5e9, #d946ef);
|
| 126 |
+
border: none;
|
| 127 |
+
border-radius: 16px;
|
| 128 |
+
color: white;
|
| 129 |
+
font-size: 1rem;
|
| 130 |
+
font-weight: 600;
|
| 131 |
+
cursor: pointer;
|
| 132 |
+
transition: all 0.3s ease;
|
| 133 |
+
display: flex;
|
| 134 |
+
align-items: center;
|
| 135 |
+
gap: 0.75rem;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
.generate-btn:hover:not(:disabled) {
|
| 139 |
+
transform: scale(1.02);
|
| 140 |
+
box-shadow: 0 20px 60px rgba(14, 165, 233, 0.4);
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.generate-btn:disabled {
|
| 144 |
+
opacity: 0.5;
|
| 145 |
+
cursor: not-allowed;
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
.generate-btn.loading {
|
| 149 |
+
background: linear-gradient(90deg, #0ea5e9, #d946ef, #0ea5e9);
|
| 150 |
+
background-size: 200% 100%;
|
| 151 |
+
animation: shimmer 1.5s infinite;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
@keyframes shimmer {
|
| 155 |
+
0% { background-position: -200% 0; }
|
| 156 |
+
100% { background-position: 200% 0; }
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
.char-count {
|
| 160 |
+
font-size: 0.75rem;
|
| 161 |
+
color: #64748b;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
.suggestions {
|
| 165 |
+
display: flex;
|
| 166 |
+
gap: 0.5rem;
|
| 167 |
+
margin-top: 1rem;
|
| 168 |
+
flex-wrap: wrap;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
.suggestion-chip {
|
| 172 |
+
padding: 0.375rem 0.875rem;
|
| 173 |
+
background: rgba(14, 165, 233, 0.1);
|
| 174 |
+
border: 1px solid rgba(14, 165, 233, 0.2);
|
| 175 |
+
border-radius: 9999px;
|
| 176 |
+
color: #7dd3fc;
|
| 177 |
+
font-size: 0.75rem;
|
| 178 |
+
cursor: pointer;
|
| 179 |
+
transition: all 0.2s ease;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
.suggestion-chip:hover {
|
| 183 |
+
background: rgba(14, 165, 233, 0.2);
|
| 184 |
+
border-color: #0ea5e9;
|
| 185 |
+
}
|
| 186 |
+
</style>
|
| 187 |
+
|
| 188 |
+
<div class="prompt-container">
|
| 189 |
+
<div class="mode-selector">
|
| 190 |
+
<button class="mode-btn ${this.mode === 'image' ? 'active' : ''}" data-mode="image">
|
| 191 |
+
<i data-feather="image" style="width: 14px; height: 14px;"></i>
|
| 192 |
+
Image
|
| 193 |
+
</button>
|
| 194 |
+
<button class="mode-btn ${this.mode === 'video' ? 'active' : ''}" data-mode="video">
|
| 195 |
+
<i data-feather="video" style="width: 14px; height: 14px;"></i>
|
| 196 |
+
Video
|
| 197 |
+
</button>
|
| 198 |
+
<button class="mode-btn ${this.mode === 'gif' ? 'active' : ''}" data-mode="gif">
|
| 199 |
+
<i data-feather="film" style="width: 14px; height: 14px;"></i>
|
| 200 |
+
GIF
|
| 201 |
+
</button>
|
| 202 |
+
<button class="mode-btn ${this.mode === '3d' ? 'active' : ''}" data-mode="3d">
|
| 203 |
+
<i data-feather="box" style="width: 14px; height: 14px;"></i>
|
| 204 |
+
3D Model
|
| 205 |
+
</button>
|
| 206 |
+
</div>
|
| 207 |
+
|
| 208 |
+
<div class="input-wrapper">
|
| 209 |
+
<textarea
|
| 210 |
+
id="prompt-input"
|
| 211 |
+
placeholder="Describe what you want to create... (e.g., 'A futuristic cityscape with flying cars and neon lights at sunset')"
|
| 212 |
+
maxlength="500"
|
| 213 |
+
></textarea>
|
| 214 |
+
</div>
|
| 215 |
+
|
| 216 |
+
<div class="input-footer">
|
| 217 |
+
<div class="input-actions">
|
| 218 |
+
<button class="action-btn" title="Upload reference image">
|
| 219 |
+
<i data-feather="upload" style="width: 18px; height: 18px;"></i>
|
| 220 |
+
</button>
|
| 221 |
+
<button class="action-btn" title="Random prompt">
|
| 222 |
+
<i data-feather="shuffle" style="width: 18px; height: 18px;"></i>
|
| 223 |
+
</button>
|
| 224 |
+
<button class="action-btn" title="Voice input">
|
| 225 |
+
<i data-feather="mic" style="width: 18px; height: 18px;"></i>
|
| 226 |
+
</button>
|
| 227 |
+
</div>
|
| 228 |
+
|
| 229 |
+
<div style="display: flex; align-items: center; gap: 1rem;">
|
| 230 |
+
<span class="char-count"><span id="char-count">0</span>/500</span>
|
| 231 |
+
<button class="generate-btn" id="generate-btn">
|
| 232 |
+
<i data-feather="sparkles" style="width: 20px; height: 20px;"></i>
|
| 233 |
+
Generate
|
| 234 |
+
</button>
|
| 235 |
+
</div>
|
| 236 |
+
</div>
|
| 237 |
+
|
| 238 |
+
<div class="suggestions">
|
| 239 |
+
<span class="suggestion-chip">Cyberpunk city</span>
|
| 240 |
+
<span class="suggestion-chip">Portrait photography</span>
|
| 241 |
+
<span class="suggestion-chip">Abstract 3D art</span>
|
| 242 |
+
<span class="suggestion-chip">Nature landscape</span>
|
| 243 |
+
<span class="suggestion-chip">Sci-fi concept</span>
|
| 244 |
+
</div>
|
| 245 |
+
</div>
|
| 246 |
+
`;
|
| 247 |
+
}
|
| 248 |
+
|
| 249 |
+
attachEvents() {
|
| 250 |
+
const textarea = this.shadowRoot.getElementById('prompt-input');
|
| 251 |
+
const charCount = this.shadowRoot.getElementById('char-count');
|
| 252 |
+
const generateBtn = this.shadowRoot.getElementById('generate-btn');
|
| 253 |
+
const modeBtns = this.shadowRoot.querySelectorAll('.mode-btn');
|
| 254 |
+
const suggestions = this.shadowRoot.querySelectorAll('.suggestion-chip');
|
| 255 |
+
|
| 256 |
+
// Character count
|
| 257 |
+
textarea.addEventListener('input', () => {
|
| 258 |
+
charCount.textContent = textarea.value.length;
|
| 259 |
+
});
|
| 260 |
+
|
| 261 |
+
// Mode selection
|
| 262 |
+
modeBtns.forEach(btn => {
|
| 263 |
+
btn.addEventListener('click', () => {
|
| 264 |
+
modeBtns.forEach(b => b.classList.remove('active'));
|
| 265 |
+
btn.classList.add('active');
|
| 266 |
+
this.mode = btn.dataset.mode;
|
| 267 |
+
});
|
| 268 |
+
});
|
| 269 |
+
|
| 270 |
+
// Generate
|
| 271 |
+
generateBtn.addEventListener('click', () => {
|
| 272 |
+
const prompt = textarea.value.trim();
|
| 273 |
+
if (!prompt) {
|
| 274 |
+
textarea.focus();
|
| 275 |
+
return;
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
generateBtn.disabled = true;
|
| 279 |
+
generateBtn.classList.add('loading');
|
| 280 |
+
generateBtn.innerHTML = `
|
| 281 |
+
<i data-feather="loader" style="width: 20px; height: 20px; animation: spin 1s linear infinite;"></i>
|
| 282 |
+
Generating...
|
| 283 |
+
`;
|
| 284 |
+
|
| 285 |
+
document.dispatchEvent(new CustomEvent('submitPrompt', {
|
| 286 |
+
detail: {
|
| 287 |
+
prompt,
|
| 288 |
+
mode: this.mode,
|
| 289 |
+
settings: window.VortexAI?.state?.settings || {}
|
| 290 |
+
}
|
| 291 |
+
}));
|
| 292 |
+
});
|
| 293 |
+
|
| 294 |
+
// Suggestions
|
| 295 |
+
suggestions.forEach(chip => {
|
| 296 |
+
chip.addEventListener('click', () => {
|
| 297 |
+
textarea.value = chip.textContent;
|
| 298 |
+
charCount.textContent = textarea.value.length;
|
| 299 |
+
textarea.focus();
|
| 300 |
+
});
|
| 301 |
+
});
|
| 302 |
+
|
| 303 |
+
// Random prompt
|
| 304 |
+
const randomBtn = this.shadowRoot.querySelector('[title="Random prompt"]');
|
| 305 |
+
const randomPrompts = [
|
| 306 |
+
'A cyberpunk samurai standing on a rooftop in Tokyo, neon lights reflecting on wet streets',
|
| 307 |
+
'An underwater city with bioluminescent architecture and manta rays swimming through',
|
| 308 |
+
'A steampunk airship battle above Victorian London at sunset',
|
| 309 |
+
'Crystalline forest with light refractions creating rainbow pathways',
|
| 310 |
+
'Mars colony interior with hydroponic gardens and Earth view through windows'
|
| 311 |
+
];
|
| 312 |
+
|
| 313 |
+
randomBtn.addEventListener('click', () => {
|
| 314 |
+
const random = randomPrompts[Math.floor(Math.random() * randomPrompts.length)];
|
| 315 |
+
textarea.value = random;
|
| 316 |
+
charCount.textContent = random.length;
|
| 317 |
+
});
|
| 318 |
+
}
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
customElements.define('custom-prompt-input', CustomPromptInput);
|
index.html
CHANGED
|
@@ -1,19 +1,276 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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PE html>
|
| 2 |
+
<html lang="en" data-theme="dark">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>VortexAI - Multiverse Generator</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🌀</text></svg>">
|
| 8 |
+
<link rel="stylesheet" href="style.css">
|
| 9 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 11 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 12 |
+
<script>
|
| 13 |
+
tailwind.config = {
|
| 14 |
+
theme: {
|
| 15 |
+
extend: {
|
| 16 |
+
colors: {
|
| 17 |
+
primary: {
|
| 18 |
+
50: '#f0f9ff',
|
| 19 |
+
100: '#e0f2fe',
|
| 20 |
+
200: '#bae6fd',
|
| 21 |
+
300: '#7dd3fc',
|
| 22 |
+
400: '#38bdf8',
|
| 23 |
+
500: '#0ea5e9',
|
| 24 |
+
600: '#0284c7',
|
| 25 |
+
700: '#0369a1',
|
| 26 |
+
800: '#075985',
|
| 27 |
+
900: '#0c4a6e',
|
| 28 |
+
950: '#082f49',
|
| 29 |
+
},
|
| 30 |
+
secondary: {
|
| 31 |
+
50: '#fdf4ff',
|
| 32 |
+
100: '#fae8ff',
|
| 33 |
+
200: '#f5d0fe',
|
| 34 |
+
300: '#f0abfc',
|
| 35 |
+
400: '#e879f9',
|
| 36 |
+
500: '#d946ef',
|
| 37 |
+
600: '#c026d3',
|
| 38 |
+
700: '#a21caf',
|
| 39 |
+
800: '#86198f',
|
| 40 |
+
900: '#701a75',
|
| 41 |
+
950: '#4a044e',
|
| 42 |
+
},
|
| 43 |
+
accent: {
|
| 44 |
+
50: '#fff7ed',
|
| 45 |
+
100: '#ffedd5',
|
| 46 |
+
200: '#fed7aa',
|
| 47 |
+
300: '#fdba74',
|
| 48 |
+
400: '#fb923c',
|
| 49 |
+
500: '#f97316',
|
| 50 |
+
600: '#ea580c',
|
| 51 |
+
700: '#c2410c',
|
| 52 |
+
800: '#9a3412',
|
| 53 |
+
900: '#7c2d12',
|
| 54 |
+
950: '#431407',
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
animation: {
|
| 58 |
+
'spin-slow': 'spin 8s linear infinite',
|
| 59 |
+
'pulse-slow': 'pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite',
|
| 60 |
+
'float': 'float 6s ease-in-out infinite',
|
| 61 |
+
'glow': 'glow 2s ease-in-out infinite alternate',
|
| 62 |
+
'morph': 'morph 8s ease-in-out infinite',
|
| 63 |
+
'shimmer': 'shimmer 2s linear infinite',
|
| 64 |
+
},
|
| 65 |
+
keyframes: {
|
| 66 |
+
float: {
|
| 67 |
+
'0%, 100%': { transform: 'translateY(0)' },
|
| 68 |
+
'50%': { transform: 'translateY(-20px)' },
|
| 69 |
+
},
|
| 70 |
+
glow: {
|
| 71 |
+
'0%': { boxShadow: '0 0 20px rgba(14, 165, 233, 0.5)' },
|
| 72 |
+
'100%': { boxShadow: '0 0 40px rgba(14, 165, 233, 0.8), 0 0 60px rgba(217, 70, 239, 0.4)' },
|
| 73 |
+
},
|
| 74 |
+
morph: {
|
| 75 |
+
'0%, 100%': { borderRadius: '60% 40% 30% 70%/60% 30% 70% 40%' },
|
| 76 |
+
'50%': { borderRadius: '30% 60% 70% 40%/50% 60% 30% 60%' },
|
| 77 |
+
},
|
| 78 |
+
shimmer: {
|
| 79 |
+
'0%': { backgroundPosition: '-200% 0' },
|
| 80 |
+
'100%': { backgroundPosition: '200% 0' },
|
| 81 |
+
}
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
</script>
|
| 87 |
+
</head>
|
| 88 |
+
<body class="bg-slate-950 text-white min-h-screen overflow-x-hidden">
|
| 89 |
+
<!-- 3D Animated Background -->
|
| 90 |
+
<div class="fixed inset-0 z-0">
|
| 91 |
+
<div class="absolute inset-0 bg-gradient-to-br from-slate-950 via-slate-900 to-slate-950"></div>
|
| 92 |
+
<div class="absolute inset-0 opacity-30">
|
| 93 |
+
<canvas id="neural-canvas"></canvas>
|
| 94 |
+
</div>
|
| 95 |
+
<div class="absolute top-20 left-10 w-72 h-72 bg-primary-500/20 rounded-full blur-3xl animate-float"></div>
|
| 96 |
+
<div class="absolute bottom-20 right-10 w-96 h-96 bg-secondary-500/20 rounded-full blur-3xl animate-float" style="animation-delay: -3s;"></div>
|
| 97 |
+
<div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-accent-500/10 rounded-full blur-3xl animate-pulse-slow"></div>
|
| 98 |
+
</div>
|
| 99 |
+
|
| 100 |
+
<!-- Navigation -->
|
| 101 |
+
<custom-navbar></custom-navbar>
|
| 102 |
+
|
| 103 |
+
<!-- Main Content -->
|
| 104 |
+
<main class="relative z-10 pt-20">
|
| 105 |
+
<!-- Hero Section -->
|
| 106 |
+
<section class="min-h-[90vh] flex items-center justify-center px-4">
|
| 107 |
+
<div class="max-w-7xl mx-auto text-center">
|
| 108 |
+
<div class="mb-8">
|
| 109 |
+
<div class="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-gradient-to-r from-primary-500/20 to-secondary-500/20 border border-primary-500/30 animate-glow">
|
| 110 |
+
<span class="w-2 h-2 rounded-full bg-primary-400 animate-pulse"></span>
|
| 111 |
+
<span class="text-sm font-medium text-primary-300">Powered by Hugging Face AI</span>
|
| 112 |
+
</div>
|
| 113 |
+
</div>
|
| 114 |
+
<h1 class="text-5xl md:text-7xl lg:text-8xl font-bold mb-6 leading-tight">
|
| 115 |
+
<span class="bg-gradient-to-r from-primary-400 via-secondary-400 to-accent-400 bg-clip-text text-transparent animate-shimmer bg-[length:200%_100%]">
|
| 116 |
+
Transform Ideas
|
| 117 |
+
</span>
|
| 118 |
+
<br>
|
| 119 |
+
<span class="text-white">Into Reality</span>
|
| 120 |
+
</h1>
|
| 121 |
+
<p class="text-xl md:text-2xl text-slate-400 max-w-3xl mx-auto mb-12">
|
| 122 |
+
Generate stunning videos, images, GIFs, and 3D models from simple text prompts using state-of-the-art AI models.
|
| 123 |
+
</p>
|
| 124 |
+
|
| 125 |
+
<!-- Quick Start -->
|
| 126 |
+
<div class="max-w-4xl mx-auto">
|
| 127 |
+
<custom-prompt-input id="hero-prompt"></custom-prompt-input>
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
</section>
|
| 131 |
+
|
| 132 |
+
<!-- Features Grid -->
|
| 133 |
+
<section class="py-20 px-4">
|
| 134 |
+
<div class="max-w-7xl mx-auto">
|
| 135 |
+
<div class="text-center mb-16">
|
| 136 |
+
<h2 class="text-3xl md:text-5xl font-bold mb-4">Four Dimensions of Creation</h2>
|
| 137 |
+
<p class="text-slate-400 text-lg">Choose your medium and let AI do the magic</p>
|
| 138 |
+
</div>
|
| 139 |
+
|
| 140 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
|
| 141 |
+
<custom-feature-card
|
| 142 |
+
type="image"
|
| 143 |
+
title="AI Images"
|
| 144 |
+
description="Generate photorealistic and artistic images from text descriptions using Stable Diffusion XL."
|
| 145 |
+
icon="image"
|
| 146 |
+
color="primary"
|
| 147 |
+
></custom-feature-card>
|
| 148 |
+
|
| 149 |
+
<custom-feature-card
|
| 150 |
+
type="video"
|
| 151 |
+
title="AI Video"
|
| 152 |
+
description="Create dynamic video content with text-to-video diffusion models and temporal coherence."
|
| 153 |
+
icon="video"
|
| 154 |
+
color="secondary"
|
| 155 |
+
></custom-feature-card>
|
| 156 |
+
|
| 157 |
+
<custom-feature-card
|
| 158 |
+
type="gif"
|
| 159 |
+
title="Animated GIFs"
|
| 160 |
+
description="Produce loopable, high-quality GIF animations perfect for web and social media."
|
| 161 |
+
icon="film"
|
| 162 |
+
color="accent"
|
| 163 |
+
></custom-feature-card>
|
| 164 |
+
|
| 165 |
+
<custom-feature-card
|
| 166 |
+
type="3d"
|
| 167 |
+
title="3D Models"
|
| 168 |
+
description="Generate textured 3D meshes and point clouds ready for games, VR, and printing."
|
| 169 |
+
icon="box"
|
| 170 |
+
color="primary"
|
| 171 |
+
></custom-feature-card>
|
| 172 |
+
</div>
|
| 173 |
+
</div>
|
| 174 |
+
</section>
|
| 175 |
+
|
| 176 |
+
<!-- Generation Studio -->
|
| 177 |
+
<section id="studio" class="py-20 px-4">
|
| 178 |
+
<div class="max-w-7xl mx-auto">
|
| 179 |
+
<div class="glass-panel rounded-3xl p-8 md:p-12">
|
| 180 |
+
<div class="text-center mb-12">
|
| 181 |
+
<h2 class="text-3xl md:text-5xl font-bold mb-4">Generation Studio</h2>
|
| 182 |
+
<p class="text-slate-400">Advanced controls for professional results</p>
|
| 183 |
+
</div>
|
| 184 |
+
|
| 185 |
+
<custom-generation-studio></custom-generation-studio>
|
| 186 |
+
</div>
|
| 187 |
+
</div>
|
| 188 |
+
</section>
|
| 189 |
+
|
| 190 |
+
<!-- Live Examples -->
|
| 191 |
+
<section class="py-20 px-4">
|
| 192 |
+
<div class="max-w-7xl mx-auto">
|
| 193 |
+
<div class="flex items-center justify-between mb-12 flex-wrap gap-4">
|
| 194 |
+
<div>
|
| 195 |
+
<h2 class="text-3xl md:text-4xl font-bold mb-2">Live Creations</h2>
|
| 196 |
+
<p class="text-slate-400">Real-time generated content from our community</p>
|
| 197 |
+
</div>
|
| 198 |
+
<custom-model-selector></custom-model-selector>
|
| 199 |
+
</div>
|
| 200 |
+
|
| 201 |
+
<custom-gallery-grid id="gallery"></custom-gallery-grid>
|
| 202 |
+
</div>
|
| 203 |
+
</section>
|
| 204 |
+
|
| 205 |
+
<!-- API Status -->
|
| 206 |
+
<section class="py-20 px-4">
|
| 207 |
+
<div class="max-w-7xl mx-auto">
|
| 208 |
+
<div class="glass-panel rounded-2xl p-8">
|
| 209 |
+
<div class="flex items-center justify-between mb-8 flex-wrap gap-4">
|
| 210 |
+
<h3 class="text-2xl font-bold">Hugging Face Integration Status</h3>
|
| 211 |
+
<div class="flex items-center gap-2">
|
| 212 |
+
<span class="w-3 h-3 rounded-full bg-emerald-500 animate-pulse"></span>
|
| 213 |
+
<span class="text-emerald-400 font-medium">All Systems Operational</span>
|
| 214 |
+
</div>
|
| 215 |
+
</div>
|
| 216 |
+
|
| 217 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4" id="api-status-grid">
|
| 218 |
+
<!-- Populated by JS -->
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
</section>
|
| 223 |
+
|
| 224 |
+
<!-- Pricing -->
|
| 225 |
+
<section id="pricing" class="py-20 px-4">
|
| 226 |
+
<div class="max-w-7xl mx-auto">
|
| 227 |
+
<div class="text-center mb-16">
|
| 228 |
+
<h2 class="text-3xl md:text-5xl font-bold mb-4">Choose Your Dimension</h2>
|
| 229 |
+
<p class="text-slate-400">Flexible plans for creators of all scales</p>
|
| 230 |
+
</div>
|
| 231 |
+
|
| 232 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
|
| 233 |
+
<custom-pricing-card
|
| 234 |
+
tier="starter"
|
| 235 |
+
price="0"
|
| 236 |
+
features='["100 generations/month","Standard quality","720p images","Community support","Public gallery"]'
|
| 237 |
+
></custom-pricing-card>
|
| 238 |
+
|
| 239 |
+
<custom-pricing-card
|
| 240 |
+
tier="creator"
|
| 241 |
+
price="29"
|
| 242 |
+
features='["Unlimited generations","4K quality","Video up to 10s","Priority processing","Private storage","API access"]'
|
| 243 |
+
popular="true"
|
| 244 |
+
></custom-pricing-card>
|
| 245 |
+
|
| 246 |
+
<custom-pricing-card
|
| 247 |
+
tier="enterprise"
|
| 248 |
+
price="99"
|
| 249 |
+
features='["Everything in Creator","Custom model training","Dedicated GPU","White-label options","SLA guarantee","24/7 support"]'
|
| 250 |
+
></custom-pricing-card>
|
| 251 |
+
</div>
|
| 252 |
+
</div>
|
| 253 |
+
</section>
|
| 254 |
+
</main>
|
| 255 |
+
|
| 256 |
+
<!-- Footer -->
|
| 257 |
+
<custom-footer></custom-footer>
|
| 258 |
+
|
| 259 |
+
<!-- Generation Modal -->
|
| 260 |
+
<custom-generation-modal id="generation-modal"></custom-generation-modal>
|
| 261 |
+
|
| 262 |
+
<!-- Scripts -->
|
| 263 |
+
<script src="components/navbar.js"></script>
|
| 264 |
+
<script src="components/prompt-input.js"></script>
|
| 265 |
+
<script src="components/feature-card.js"></script>
|
| 266 |
+
<script src="components/generation-studio.js"></script>
|
| 267 |
+
<script src="components/model-selector.js"></script>
|
| 268 |
+
<script src="components/gallery-grid.js"></script>
|
| 269 |
+
<script src="components/pricing-card.js"></script>
|
| 270 |
+
<script src="components/footer.js"></script>
|
| 271 |
+
<script src="components/generation-modal.js"></script>
|
| 272 |
+
<script src="script.js"></script>
|
| 273 |
+
<script>feather.replace();</script>
|
| 274 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 275 |
+
</body>
|
| 276 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,389 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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.co/models/',
|
| 6 |
+
models: {
|
| 7 |
+
image: {
|
| 8 |
+
'stable-diffusion-xl': 'stabilityai/stable-diffusion-xl-base-1.0',
|
| 9 |
+
'realistic-vision': 'SG161222/Realistic_Vision_V5.1_noVAE',
|
| 10 |
+
'anime-diffusion': 'Linaqruf/anything-v3.0',
|
| 11 |
+
'deepfloyd-if': 'DeepFloyd/IF-I-XL-v1.0'
|
| 12 |
+
},
|
| 13 |
+
video: {
|
| 14 |
+
'modelscope-t2v': 'damo-vilab/text-to-video-ms-1.7b',
|
| 15 |
+
'zeroscope': 'cerspense/zeroscope_v2_576w'
|
| 16 |
+
},
|
| 17 |
+
'3d': {
|
| 18 |
+
'shap-e': 'openai/shap-e',
|
| 19 |
+
'point-e': 'openai/point-e',
|
| 20 |
+
'zero123': 'cvlab-cvlab/zero123-xl-diffusers'
|
| 21 |
+
}
|
| 22 |
+
},
|
| 23 |
+
headers: (token) => ({
|
| 24 |
+
'Authorization': `Bearer ${token}`,
|
| 25 |
+
'Content-Type': 'application/json'
|
| 26 |
+
})
|
| 27 |
+
};
|
| 28 |
+
|
| 29 |
+
// Global State
|
| 30 |
+
const state = {
|
| 31 |
+
currentMode: 'image',
|
| 32 |
+
isGenerating: false,
|
| 33 |
+
queue: [],
|
| 34 |
+
history: JSON.parse(localStorage.getItem('vortex_history') || '[]'),
|
| 35 |
+
settings: {
|
| 36 |
+
width: 1024,
|
| 37 |
+
height: 1024,
|
| 38 |
+
steps: 50,
|
| 39 |
+
guidance: 7.5,
|
| 40 |
+
seed: -1,
|
| 41 |
+
model: 'stable-diffusion-xl'
|
| 42 |
+
}
|
| 43 |
+
};
|
| 44 |
+
|
| 45 |
+
// Neural Network Background Animation
|
| 46 |
+
class NeuralNetwork {
|
| 47 |
+
constructor(canvas) {
|
| 48 |
+
this.canvas = canvas;
|
| 49 |
+
this.ctx = canvas.getContext('2d');
|
| 50 |
+
this.nodes = [];
|
| 51 |
+
this.connections = [];
|
| 52 |
+
this.mouse = { x: 0, y: 0 };
|
| 53 |
+
this.init();
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
init() {
|
| 57 |
+
this.resize();
|
| 58 |
+
window.addEventListener('resize', () => this.resize());
|
| 59 |
+
|
| 60 |
+
// Create nodes
|
| 61 |
+
const nodeCount = Math.min(80, Math.floor(window.innerWidth / 20));
|
| 62 |
+
for (let i = 0; i < nodeCount; i++) {
|
| 63 |
+
this.nodes.push({
|
| 64 |
+
x: Math.random() * this.canvas.width,
|
| 65 |
+
y: Math.random() * this.canvas.height,
|
| 66 |
+
vx: (Math.random() - 0.5) * 0.5,
|
| 67 |
+
vy: (Math.random() - 0.5) * 0.5,
|
| 68 |
+
radius: Math.random() * 2 + 1,
|
| 69 |
+
pulse: Math.random() * Math.PI * 2
|
| 70 |
+
});
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
this.animate();
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
resize() {
|
| 77 |
+
this.canvas.width = window.innerWidth;
|
| 78 |
+
this.canvas.height = window.innerHeight;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
animate() {
|
| 82 |
+
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
| 83 |
+
|
| 84 |
+
// Update and draw nodes
|
| 85 |
+
this.nodes.forEach(node => {
|
| 86 |
+
node.x += node.vx;
|
| 87 |
+
node.y += node.vy;
|
| 88 |
+
node.pulse += 0.02;
|
| 89 |
+
|
| 90 |
+
// Wrap around
|
| 91 |
+
if (node.x < 0) node.x = this.canvas.width;
|
| 92 |
+
if (node.x > this.canvas.width) node.x = 0;
|
| 93 |
+
if (node.y < 0) node.y = this.canvas.height;
|
| 94 |
+
if (node.y > this.canvas.height) node.y = 0;
|
| 95 |
+
|
| 96 |
+
// Draw node with pulse
|
| 97 |
+
const pulseSize = node.radius + Math.sin(node.pulse) * 0.5;
|
| 98 |
+
const gradient = this.ctx.createRadialGradient(
|
| 99 |
+
node.x, node.y, 0,
|
| 100 |
+
node.x, node.y, pulseSize * 3
|
| 101 |
+
);
|
| 102 |
+
gradient.addColorStop(0, 'rgba(14, 165, 233, 0.6)');
|
| 103 |
+
gradient.addColorStop(0.5, 'rgba(217, 70, 239, 0.3)');
|
| 104 |
+
gradient.addColorStop(1, 'transparent');
|
| 105 |
+
|
| 106 |
+
this.ctx.beginPath();
|
| 107 |
+
this.ctx.arc(node.x, node.y, pulseSize, 0, Math.PI * 2);
|
| 108 |
+
this.ctx.fillStyle = gradient;
|
| 109 |
+
this.ctx.fill();
|
| 110 |
+
|
| 111 |
+
// Draw connections
|
| 112 |
+
this.nodes.forEach(other => {
|
| 113 |
+
const dx = other.x - node.x;
|
| 114 |
+
const dy = other.y - node.y;
|
| 115 |
+
const dist = Math.sqrt(dx * dx + dy * dy);
|
| 116 |
+
|
| 117 |
+
if (dist < 150) {
|
| 118 |
+
const opacity = (1 - dist / 150) * 0.3;
|
| 119 |
+
this.ctx.beginPath();
|
| 120 |
+
this.ctx.moveTo(node.x, node.y);
|
| 121 |
+
this.ctx.lineTo(other.x, other.y);
|
| 122 |
+
this.ctx.strokeStyle = `rgba(14, 165, 233, ${opacity})`;
|
| 123 |
+
this.ctx.lineWidth = 0.5;
|
| 124 |
+
this.ctx.stroke();
|
| 125 |
+
}
|
| 126 |
+
});
|
| 127 |
+
});
|
| 128 |
+
|
| 129 |
+
requestAnimationFrame(() => this.animate());
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
// Generation Service
|
| 134 |
+
class GenerationService {
|
| 135 |
+
static async generateImage(prompt, options = {}) {
|
| 136 |
+
const modelId = HF_CONFIG.models.image[options.model || 'stable-diffusion-xl'];
|
| 137 |
+
const payload = {
|
| 138 |
+
inputs: prompt,
|
| 139 |
+
parameters: {
|
| 140 |
+
width: options.width || 1024,
|
| 141 |
+
height: options.height || 1024,
|
| 142 |
+
num_inference_steps: options.steps || 50,
|
| 143 |
+
guidance_scale: options.guidance || 7.5,
|
| 144 |
+
seed: options.seed || Math.floor(Math.random() * 1000000)
|
| 145 |
+
}
|
| 146 |
+
};
|
| 147 |
+
|
| 148 |
+
try {
|
| 149 |
+
// Simulate API call with progressive loading
|
| 150 |
+
await this.simulateProgress();
|
| 151 |
+
|
| 152 |
+
// Return mock data for demo (replace with actual API)
|
| 153 |
+
return {
|
| 154 |
+
url: `https://static.photos/ai-generated/${options.width}x${options.height}/${payload.parameters.seed}`,
|
| 155 |
+
seed: payload.parameters.seed,
|
| 156 |
+
model: modelId
|
| 157 |
+
};
|
| 158 |
+
} catch (error) {
|
| 159 |
+
throw new Error(`Image generation failed: ${error.message}`);
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
static async generateVideo(prompt, options = {}) {
|
| 164 |
+
const modelId = HF_CONFIG.models.video['modelscope-t2v'];
|
| 165 |
+
|
| 166 |
+
try {
|
| 167 |
+
await this.simulateProgress(15000); // Longer for video
|
| 168 |
+
|
| 169 |
+
return {
|
| 170 |
+
url: `https://static.photos/video/640x360/${Date.now()}`,
|
| 171 |
+
frames: 16,
|
| 172 |
+
fps: 8,
|
| 173 |
+
duration: 2,
|
| 174 |
+
model: modelId
|
| 175 |
+
};
|
| 176 |
+
} catch (error) {
|
| 177 |
+
throw new Error(`Video generation failed: ${error.message}`);
|
| 178 |
+
}
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
static async generate3D(prompt, options = {}) {
|
| 182 |
+
try {
|
| 183 |
+
await this.simulateProgress(20000); // Longest for 3D
|
| 184 |
+
|
| 185 |
+
return {
|
| 186 |
+
url: `https://static.photos/3d/512x512/${Date.now()}`,
|
| 187 |
+
format: 'obj',
|
| 188 |
+
vertices: 5000,
|
| 189 |
+
faces: 3000,
|
| 190 |
+
model: HF_CONFIG.models['3d']['shap-e']
|
| 191 |
+
};
|
| 192 |
+
} catch (error) {
|
| 193 |
+
throw new Error(`3D generation failed: ${error.message}`);
|
| 194 |
+
}
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
static simulateProgress(duration = 5000) {
|
| 198 |
+
return new Promise((resolve) => {
|
| 199 |
+
const steps = 20;
|
| 200 |
+
const stepDuration = duration / steps;
|
| 201 |
+
let currentStep = 0;
|
| 202 |
+
|
| 203 |
+
const interval = setInterval(() => {
|
| 204 |
+
currentStep++;
|
| 205 |
+
const progress = (currentStep / steps) * 100;
|
| 206 |
+
|
| 207 |
+
document.dispatchEvent(new CustomEvent('generationProgress', {
|
| 208 |
+
detail: { progress, step: currentStep, total: steps }
|
| 209 |
+
}));
|
| 210 |
+
|
| 211 |
+
if (currentStep >= steps) {
|
| 212 |
+
clearInterval(interval);
|
| 213 |
+
resolve();
|
| 214 |
+
}
|
| 215 |
+
}, stepDuration);
|
| 216 |
+
});
|
| 217 |
+
}
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
// UI Controllers
|
| 221 |
+
const UIController = {
|
| 222 |
+
init() {
|
| 223 |
+
this.initNeuralBackground();
|
| 224 |
+
this.initApiStatus();
|
| 225 |
+
this.initEventListeners();
|
| 226 |
+
this.loadGallery();
|
| 227 |
+
},
|
| 228 |
+
|
| 229 |
+
initNeuralBackground() {
|
| 230 |
+
const canvas = document.getElementById('neural-canvas');
|
| 231 |
+
if (canvas) {
|
| 232 |
+
new NeuralNetwork(canvas);
|
| 233 |
+
}
|
| 234 |
+
},
|
| 235 |
+
|
| 236 |
+
initApiStatus() {
|
| 237 |
+
const services = [
|
| 238 |
+
{ name: 'Stable Diffusion XL', status: 'operational', latency: '124ms' },
|
| 239 |
+
{ name: 'ModelScope T2V', status: 'operational', latency: '892ms' },
|
| 240 |
+
{ name: 'Shap-E 3D', status: 'operational', latency: '2341ms' },
|
| 241 |
+
{ name: 'Realistic Vision', status: 'operational', latency: '156ms' }
|
| 242 |
+
];
|
| 243 |
+
|
| 244 |
+
const grid = document.getElementById('api-status-grid');
|
| 245 |
+
if (grid) {
|
| 246 |
+
grid.innerHTML = services.map(s => `
|
| 247 |
+
<div class="glass-card rounded-xl p-4 flex items-center justify-between">
|
| 248 |
+
<div>
|
| 249 |
+
<p class="font-medium text-sm">${s.name}</p>
|
| 250 |
+
<p class="text-xs text-slate-400">${s.latency}</p>
|
| 251 |
+
</div>
|
| 252 |
+
<span class="px-2 py-1 rounded-full text-xs font-medium ${s.status === 'operational' ? 'bg-emerald-500/20 text-emerald-400' : 'bg-amber-500/20 text-amber-400'}">
|
| 253 |
+
${s.status}
|
| 254 |
+
</span>
|
| 255 |
+
</div>
|
| 256 |
+
`).join('');
|
| 257 |
+
}
|
| 258 |
+
},
|
| 259 |
+
|
| 260 |
+
initEventListeners() {
|
| 261 |
+
// Prompt submission
|
| 262 |
+
document.addEventListener('submitPrompt', async (e) => {
|
| 263 |
+
const { prompt, mode, settings } = e.detail;
|
| 264 |
+
await this.handleGeneration(prompt, mode, settings);
|
| 265 |
+
});
|
| 266 |
+
|
| 267 |
+
// Progress updates
|
| 268 |
+
document.addEventListener('generationProgress', (e) => {
|
| 269 |
+
this.updateProgress(e.detail.progress);
|
| 270 |
+
});
|
| 271 |
+
|
| 272 |
+
// Gallery refresh
|
| 273 |
+
document.addEventListener('refreshGallery', () => {
|
| 274 |
+
this.loadGallery();
|
| 275 |
+
});
|
| 276 |
+
},
|
| 277 |
+
|
| 278 |
+
async handleGeneration(prompt, mode, settings) {
|
| 279 |
+
const modal = document.getElementById('generation-modal');
|
| 280 |
+
modal.show();
|
| 281 |
+
|
| 282 |
+
try {
|
| 283 |
+
let result;
|
| 284 |
+
switch (mode) {
|
| 285 |
+
case 'image':
|
| 286 |
+
result = await GenerationService.generateImage(prompt, settings);
|
| 287 |
+
break;
|
| 288 |
+
case 'video':
|
| 289 |
+
result = await GenerationService.generateVideo(prompt, settings);
|
| 290 |
+
break;
|
| 291 |
+
case 'gif':
|
| 292 |
+
result = await GenerationService.generateVideo(prompt, { ...settings, format: 'gif' });
|
| 293 |
+
break;
|
| 294 |
+
case '3d':
|
| 295 |
+
result = await GenerationService.generate3D(prompt, settings);
|
| 296 |
+
break;
|
| 297 |
+
default:
|
| 298 |
+
throw new Error('Unknown generation mode');
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
// Save to history
|
| 302 |
+
const entry = {
|
| 303 |
+
id: Date.now(),
|
| 304 |
+
prompt,
|
| 305 |
+
mode,
|
| 306 |
+
result,
|
| 307 |
+
timestamp: new Date().toISOString()
|
| 308 |
+
};
|
| 309 |
+
state.history.unshift(entry);
|
| 310 |
+
localStorage.setItem('vortex_history', JSON.stringify(state.history.slice(0, 50)));
|
| 311 |
+
|
| 312 |
+
modal.showResult(result, mode);
|
| 313 |
+
|
| 314 |
+
} catch (error) {
|
| 315 |
+
modal.showError(error.message);
|
| 316 |
+
}
|
| 317 |
+
},
|
| 318 |
+
|
| 319 |
+
updateProgress(progress) {
|
| 320 |
+
const modal = document.getElementById('generation-modal');
|
| 321 |
+
if (modal && modal.updateProgress) {
|
| 322 |
+
modal.updateProgress(progress);
|
| 323 |
+
}
|
| 324 |
+
},
|
| 325 |
+
|
| 326 |
+
loadGallery() {
|
| 327 |
+
const gallery = document.getElementById('gallery');
|
| 328 |
+
if (gallery) {
|
| 329 |
+
// Load from history or generate demo items
|
| 330 |
+
const items = state.history.length > 0 ? state.history : this.generateDemoGallery();
|
| 331 |
+
gallery.setItems(items.slice(0, 12));
|
| 332 |
+
}
|
| 333 |
+
},
|
| 334 |
+
|
| 335 |
+
generateDemoGallery() {
|
| 336 |
+
const prompts = [
|
| 337 |
+
'A cyberpunk city at sunset with neon lights and flying cars',
|
| 338 |
+
'Portrait of a mystical forest spirit with bioluminescent features',
|
| 339 |
+
'Abstract 3D sculpture made of liquid metal and glass',
|
| 340 |
+
'Ancient temple floating in the clouds during golden hour',
|
| 341 |
+
'Futuristic robot with human-like emotions in a garden',
|
| 342 |
+
'Interstellar spaceship docked at a massive space station'
|
| 343 |
+
];
|
| 344 |
+
|
| 345 |
+
return prompts.map((prompt, i) => ({
|
| 346 |
+
id: i,
|
| 347 |
+
prompt,
|
| 348 |
+
mode: ['image', 'video', '3d'][i % 3],
|
| 349 |
+
result: {
|
| 350 |
+
url: `https://static.photos/${['technology', 'nature', 'abstract', 'architecture', 'people', 'science'][i]}/640x360/${i + 1}`
|
| 351 |
+
},
|
| 352 |
+
timestamp: new Date(Date.now() - i * 86400000).toISOString()
|
| 353 |
+
}));
|
| 354 |
+
}
|
| 355 |
+
};
|
| 356 |
+
|
| 357 |
+
// Utility Functions
|
| 358 |
+
const Utils = {
|
| 359 |
+
formatNumber(num) {
|
| 360 |
+
return new Intl.NumberFormat('en-US', { notation: 'compact' }).format(num);
|
| 361 |
+
},
|
| 362 |
+
|
| 363 |
+
formatTime(date) {
|
| 364 |
+
return new Intl.RelativeTimeFormat('en', { numeric: 'auto' }).format(
|
| 365 |
+
Math.ceil((new Date(date) - new Date()) / 1000 / 60),
|
| 366 |
+
'minute'
|
| 367 |
+
);
|
| 368 |
+
},
|
| 369 |
+
|
| 370 |
+
debounce(fn, ms) {
|
| 371 |
+
let timeout;
|
| 372 |
+
return (...args) => {
|
| 373 |
+
clearTimeout(timeout);
|
| 374 |
+
timeout = setTimeout(() => fn(...args), ms);
|
| 375 |
+
};
|
| 376 |
+
},
|
| 377 |
+
|
| 378 |
+
randomSeed() {
|
| 379 |
+
return Math.floor(Math.random() * 1000000000);
|
| 380 |
+
}
|
| 381 |
+
};
|
| 382 |
+
|
| 383 |
+
// Initialize on DOM ready
|
| 384 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 385 |
+
UIController.init();
|
| 386 |
+
});
|
| 387 |
+
|
| 388 |
+
// Export for modules
|
| 389 |
+
window.VortexAI = { state, GenerationService, Utils, HF_CONFIG };
|
style.css
CHANGED
|
@@ -1,28 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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-
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.card {
|
| 19 |
-
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* VortexAI - Global Styles */
|
| 2 |
+
|
| 3 |
+
/* CSS Variables */
|
| 4 |
+
:root {
|
| 5 |
+
--primary-hue: 199;
|
| 6 |
+
--secondary-hue: 292;
|
| 7 |
+
--accent-hue: 24;
|
| 8 |
+
|
| 9 |
+
--color-primary: hsl(var(--primary-hue), 91%, 60%);
|
| 10 |
+
--color-secondary: hsl(var(--secondary-hue), 85%, 60%);
|
| 11 |
+
--color-accent: hsl(var(--accent-hue), 95%, 60%);
|
| 12 |
+
|
| 13 |
+
--glass-bg: rgba(15, 23, 42, 0.6);
|
| 14 |
+
--glass-border: rgba(148, 163, 184, 0.1);
|
| 15 |
+
--glass-shadow: 0 8px 32px rgba(2, 8, 20, 0.4);
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
/* Base Styles */
|
| 19 |
+
* {
|
| 20 |
+
margin: 0;
|
| 21 |
+
padding: 0;
|
| 22 |
+
box-sizing: border-box;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
html {
|
| 26 |
+
scroll-behavior: smooth;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
body {
|
| 30 |
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 31 |
+
line-height: 1.6;
|
| 32 |
+
color: #f8fafc;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
/* Glassmorphism */
|
| 36 |
+
.glass-panel {
|
| 37 |
+
background: var(--glass-bg);
|
| 38 |
+
backdrop-filter: blur(20px);
|
| 39 |
+
-webkit-backdrop-filter: blur(20px);
|
| 40 |
+
border: 1px solid var(--glass-border);
|
| 41 |
+
box-shadow: var(--glass-shadow);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.glass-card {
|
| 45 |
+
background: rgba(30, 41, 59, 0.4);
|
| 46 |
+
backdrop-filter: blur(12px);
|
| 47 |
+
-webkit-backdrop-filter: blur(12px);
|
| 48 |
+
border: 1px solid rgba(148, 163, 184, 0.1);
|
| 49 |
+
transition: all 0.3s ease;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.glass-card:hover {
|
| 53 |
+
background: rgba(30, 41, 59, 0.6);
|
| 54 |
+
border-color: rgba(14, 165, 233, 0.3);
|
| 55 |
+
transform: translateY(-4px);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
/* 3D Effects */
|
| 59 |
+
.perspective-1000 {
|
| 60 |
+
perspective: 1000px;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.preserve-3d {
|
| 64 |
+
transform-style: preserve-3d;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
/* Neural Network Canvas */
|
| 68 |
+
#neural-canvas {
|
| 69 |
+
position: absolute;
|
| 70 |
+
top: 0;
|
| 71 |
+
left: 0;
|
| 72 |
+
width: 100%;
|
| 73 |
+
height: 100%;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
/* Custom Scrollbar */
|
| 77 |
+
::-webkit-scrollbar {
|
| 78 |
+
width: 8px;
|
| 79 |
+
height: 8px;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
::-webkit-scrollbar-track {
|
| 83 |
+
background: rgba(15, 23, 42, 0.5);
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
::-webkit-scrollbar-thumb {
|
| 87 |
+
background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
|
| 88 |
+
border-radius: 4px;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
::-webkit-scrollbar-thumb:hover {
|
| 92 |
+
background: linear-gradient(180deg, var(--color-secondary), var(--color-accent));
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
/* Selection */
|
| 96 |
+
::selection {
|
| 97 |
+
background: rgba(14, 165, 233, 0.3);
|
| 98 |
+
color: #fff;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
/* Range Slider Styling */
|
| 102 |
+
input[type="range"] {
|
| 103 |
+
-webkit-appearance: none;
|
| 104 |
+
width: 100%;
|
| 105 |
+
height: 6px;
|
| 106 |
+
background: rgba(148, 163, 184, 0.2);
|
| 107 |
+
border-radius: 3px;
|
| 108 |
+
outline: none;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
input[type="range"]::-webkit-slider-thumb {
|
| 112 |
+
-webkit-appearance: none;
|
| 113 |
+
width: 18px;
|
| 114 |
+
height: 18px;
|
| 115 |
+
background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
|
| 116 |
+
border-radius: 50%;
|
| 117 |
+
cursor: pointer;
|
| 118 |
+
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
input[type="range"]::-webkit-slider-thumb:hover {
|
| 122 |
+
transform: scale(1.2);
|
| 123 |
+
box-shadow: 0 0 20px rgba(14, 165, 233, 0.5);
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
/* Loading Animations */
|
| 127 |
+
@keyframes neural-pulse {
|
| 128 |
+
0%, 100% { opacity: 0.3; transform: scale(1); }
|
| 129 |
+
50% { opacity: 1; transform: scale(1.1); }
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
.loading-neural {
|
| 133 |
+
animation: neural-pulse 1.5s ease-in-out infinite;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
/* Gradient Text */
|
| 137 |
+
.gradient-text {
|
| 138 |
+
background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-accent));
|
| 139 |
+
-webkit-background-clip: text;
|
| 140 |
+
-webkit-text-fill-color: transparent;
|
| 141 |
+
background-clip: text;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
/* Holographic Effect */
|
| 145 |
+
.holographic {
|
| 146 |
+
background: linear-gradient(
|
| 147 |
+
135deg,
|
| 148 |
+
rgba(14, 165, 233, 0.1) 0%,
|
| 149 |
+
rgba(217, 70, 239, 0.1) 25%,
|
| 150 |
+
rgba(249, 115, 22, 0.1) 50%,
|
| 151 |
+
rgba(217, 70, 239, 0.1) 75%,
|
| 152 |
+
rgba(14, 165, 233, 0.1) 100%
|
| 153 |
+
);
|
| 154 |
+
background-size: 400% 400%;
|
| 155 |
+
animation: holographic-shift 8s ease infinite;
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
@keyframes holographic-shift {
|
| 159 |
+
0%, 100% { background-position: 0% 50%; }
|
| 160 |
+
50% { background-position: 100% 50%; }
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
/* 3D Card Flip */
|
| 164 |
+
.flip-card {
|
| 165 |
+
perspective: 1000px;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
.flip-card-inner {
|
| 169 |
+
position: relative;
|
| 170 |
+
width: 100%;
|
| 171 |
+
height: 100%;
|
| 172 |
+
transition: transform 0.8s;
|
| 173 |
+
transform-style: preserve-3d;
|
| 174 |
}
|
| 175 |
|
| 176 |
+
.flip-card.flipped .flip-card-inner {
|
| 177 |
+
transform: rotateY(180deg);
|
|
|
|
| 178 |
}
|
| 179 |
|
| 180 |
+
.flip-card-front, .flip-card-back {
|
| 181 |
+
position: absolute;
|
| 182 |
+
width: 100%;
|
| 183 |
+
height: 100%;
|
| 184 |
+
backface-visibility: hidden;
|
| 185 |
+
-webkit-backface-visibility: hidden;
|
| 186 |
}
|
| 187 |
|
| 188 |
+
.flip-card-back {
|
| 189 |
+
transform: rotateY(180deg);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
}
|
| 191 |
|
| 192 |
+
/* Mesh Grid Background */
|
| 193 |
+
.mesh-grid {
|
| 194 |
+
background-image:
|
| 195 |
+
linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
|
| 196 |
+
linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
|
| 197 |
+
background-size: 50px 50px;
|
| 198 |
}
|
| 199 |
+
|
| 200 |
+
/* Glow Effects */
|
| 201 |
+
.glow-primary {
|
| 202 |
+
box-shadow: 0 0 40px rgba(14, 165, 233, 0.3);
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
.glow-secondary {
|
| 206 |
+
box-shadow: 0 0 40px rgba(217, 70, 239, 0.3);
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
/* Responsive Typography */
|
| 210 |
+
@media (max-width: 768px) {
|
| 211 |
+
html {
|
| 212 |
+
font-size: 14px;
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
/* Print Styles */
|
| 217 |
+
@media print {
|
| 218 |
+
.glass-panel, .glass-card {
|
| 219 |
+
background: white !important;
|
| 220 |
+
backdrop-filter: none !important;
|
| 221 |
+
}
|
| 222 |
+
}
|