Spaces:
Running
Running
Update index.html
Browse files- index.html +57 -19
index.html
CHANGED
|
@@ -35,6 +35,8 @@
|
|
| 35 |
|
| 36 |
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
|
| 37 |
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
|
|
|
|
|
|
|
| 38 |
|
| 39 |
body {
|
| 40 |
font-family: var(--app-font);
|
|
@@ -65,15 +67,34 @@
|
|
| 65 |
height: 100%;
|
| 66 |
z-index: 1;
|
| 67 |
}
|
| 68 |
-
|
| 69 |
position: relative;
|
| 70 |
z-index: 2;
|
| 71 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
h1 {
|
| 74 |
font-size: 2.8rem;
|
| 75 |
font-weight: 800;
|
| 76 |
-
margin: 0
|
| 77 |
background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
|
| 78 |
-webkit-background-clip: text;
|
| 79 |
-webkit-text-fill-color: transparent;
|
|
@@ -149,7 +170,7 @@
|
|
| 149 |
.status-message.error { border-left: 4px solid var(--danger-color); color: var(--danger-color); }
|
| 150 |
.status-icon { width: 18px; height: 18px; }
|
| 151 |
|
| 152 |
-
/* ---
|
| 153 |
#aiLoader { align-items: center; justify-content: center; }
|
| 154 |
.generator-container {
|
| 155 |
position: relative; width: 400px; max-width: 100%; height: 300px;
|
|
@@ -177,7 +198,7 @@
|
|
| 177 |
.text-overlay { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); font-size: 24px; font-weight: 700; text-shadow: 0 0 20px rgba(56, 189, 248, 0.8); animation: glow-text 7s infinite ease-in-out; font-family: var(--app-font); width: 90%; text-align: center;}
|
| 178 |
@keyframes glow-text { 0% { opacity: 0.7; } 50% { opacity: 1; } 100% { opacity: 0.7; } }
|
| 179 |
.progress-bar { position: absolute; bottom: 0; left: 0; width: 0%; height: 6px; background: linear-gradient(to right, #38bdf8, #bb86fc, #facc15); transition: width 0.4s ease; }
|
| 180 |
-
/* --- END OF
|
| 181 |
|
| 182 |
/* Video Output Styling */
|
| 183 |
#outputVideo { width: 100%; max-width: 500px; border-radius: var(--radius-input); margin: 1rem auto; display: block; background-color: #000; box-shadow: var(--shadow-md); }
|
|
@@ -207,8 +228,33 @@
|
|
| 207 |
<div class="container">
|
| 208 |
<header>
|
| 209 |
<canvas id="neural-network-canvas"></canvas>
|
| 210 |
-
<
|
| 211 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
</header>
|
| 213 |
|
| 214 |
<main>
|
|
@@ -564,7 +610,7 @@
|
|
| 564 |
if (data.progress_data?.[0]) {
|
| 565 |
const progress = Math.round((data.progress_data[0].progress || 0) * 100);
|
| 566 |
if(loaderProgressBar) {
|
| 567 |
-
loaderProgressBar.style.animation = 'none';
|
| 568 |
loaderProgressBar.style.width = `${progress}%`;
|
| 569 |
}
|
| 570 |
}
|
|
@@ -634,17 +680,9 @@
|
|
| 634 |
document.addEventListener('DOMContentLoaded', initializeForm);
|
| 635 |
|
| 636 |
imageDropZone.addEventListener('click', () => imageFileInput.click());
|
| 637 |
-
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
|
| 638 |
-
|
| 639 |
-
});
|
| 640 |
-
['dragenter', 'dragover'].forEach(eventName => {
|
| 641 |
-
imageDropZone.addEventListener(eventName, () => {
|
| 642 |
-
if (!imageDropZone.classList.contains('has-image')) { imageDropZone.classList.add('drag-over'); }
|
| 643 |
-
});
|
| 644 |
-
});
|
| 645 |
-
['dragleave', 'drop'].forEach(eventName => {
|
| 646 |
-
imageDropZone.addEventListener(eventName, () => { imageDropZone.classList.remove('drag-over'); });
|
| 647 |
-
});
|
| 648 |
imageDropZone.addEventListener('drop', e => {
|
| 649 |
if (!imageDropZone.classList.contains('has-image') && e.dataTransfer.files.length > 0) {
|
| 650 |
imageFileInput.files = e.dataTransfer.files;
|
|
@@ -765,7 +803,7 @@
|
|
| 765 |
resultContainer.classList.add('active');
|
| 766 |
statusSection.classList.add('active');
|
| 767 |
aiLoader.style.display = 'block';
|
| 768 |
-
if(loaderProgressBar) loaderProgressBar.style.animation = ''; // Re-enable CSS animation if needed
|
| 769 |
outputSection.classList.remove('active');
|
| 770 |
|
| 771 |
const [ratioW_str, ratioH_str] = autoSelectedAspectRatio.split(':');
|
|
|
|
| 35 |
|
| 36 |
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
|
| 37 |
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
|
| 38 |
+
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
|
| 39 |
+
@keyframes pulse-icon { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
|
| 40 |
|
| 41 |
body {
|
| 42 |
font-family: var(--app-font);
|
|
|
|
| 67 |
height: 100%;
|
| 68 |
z-index: 1;
|
| 69 |
}
|
| 70 |
+
.header-content {
|
| 71 |
position: relative;
|
| 72 |
z-index: 2;
|
| 73 |
}
|
| 74 |
+
|
| 75 |
+
.studio-logo {
|
| 76 |
+
display: inline-flex;
|
| 77 |
+
flex-direction: column;
|
| 78 |
+
align-items: center;
|
| 79 |
+
gap: 1rem;
|
| 80 |
+
margin-bottom: 1.5rem;
|
| 81 |
+
animation: float 4s ease-in-out infinite;
|
| 82 |
+
}
|
| 83 |
+
.logo-icon {
|
| 84 |
+
width: 70px;
|
| 85 |
+
height: 70px;
|
| 86 |
+
filter: drop-shadow(0 8px 16px rgba(74, 108, 250, 0.3));
|
| 87 |
+
}
|
| 88 |
+
.logo-icon svg {
|
| 89 |
+
width: 100%;
|
| 90 |
+
height: 100%;
|
| 91 |
+
animation: pulse-icon 2.5s ease-in-out infinite;
|
| 92 |
+
}
|
| 93 |
|
| 94 |
h1 {
|
| 95 |
font-size: 2.8rem;
|
| 96 |
font-weight: 800;
|
| 97 |
+
margin: 0;
|
| 98 |
background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
|
| 99 |
-webkit-background-clip: text;
|
| 100 |
-webkit-text-fill-color: transparent;
|
|
|
|
| 170 |
.status-message.error { border-left: 4px solid var(--danger-color); color: var(--danger-color); }
|
| 171 |
.status-icon { width: 18px; height: 18px; }
|
| 172 |
|
| 173 |
+
/* --- LOADING ANIMATION (FROM PHOTOSHOP CODE) --- */
|
| 174 |
#aiLoader { align-items: center; justify-content: center; }
|
| 175 |
.generator-container {
|
| 176 |
position: relative; width: 400px; max-width: 100%; height: 300px;
|
|
|
|
| 198 |
.text-overlay { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); font-size: 24px; font-weight: 700; text-shadow: 0 0 20px rgba(56, 189, 248, 0.8); animation: glow-text 7s infinite ease-in-out; font-family: var(--app-font); width: 90%; text-align: center;}
|
| 199 |
@keyframes glow-text { 0% { opacity: 0.7; } 50% { opacity: 1; } 100% { opacity: 0.7; } }
|
| 200 |
.progress-bar { position: absolute; bottom: 0; left: 0; width: 0%; height: 6px; background: linear-gradient(to right, #38bdf8, #bb86fc, #facc15); transition: width 0.4s ease; }
|
| 201 |
+
/* --- END OF LOADING ANIMATION --- */
|
| 202 |
|
| 203 |
/* Video Output Styling */
|
| 204 |
#outputVideo { width: 100%; max-width: 500px; border-radius: var(--radius-input); margin: 1rem auto; display: block; background-color: #000; box-shadow: var(--shadow-md); }
|
|
|
|
| 228 |
<div class="container">
|
| 229 |
<header>
|
| 230 |
<canvas id="neural-network-canvas"></canvas>
|
| 231 |
+
<div class="header-content">
|
| 232 |
+
<div class="studio-logo">
|
| 233 |
+
<div class="logo-icon">
|
| 234 |
+
<svg viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
| 235 |
+
<defs>
|
| 236 |
+
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
|
| 237 |
+
<stop offset="0%" style="stop-color:#4A6CFA;stop-opacity:1" />
|
| 238 |
+
<stop offset="50%" style="stop-color:#667eea;stop-opacity:1" />
|
| 239 |
+
<stop offset="100%" style="stop-color:#0FD4A8;stop-opacity:1" />
|
| 240 |
+
</linearGradient>
|
| 241 |
+
<linearGradient id="grad2" x1="0%" y1="0%" x2="100%" y2="100%">
|
| 242 |
+
<stop offset="0%" style="stop-color:#667eea;stop-opacity:1" />
|
| 243 |
+
<stop offset="100%" style="stop-color:#764ba2;stop-opacity:1" />
|
| 244 |
+
</linearGradient>
|
| 245 |
+
</defs>
|
| 246 |
+
<rect x="25" y="35" width="35" height="30" rx="4" fill="url(#grad1)" opacity="0.8"/>
|
| 247 |
+
<circle cx="42.5" cy="50" r="12" fill="url(#grad2)" opacity="0.9"/>
|
| 248 |
+
<circle cx="42.5" cy="50" r="8" stroke="white" stroke-width="2" fill="none"/>
|
| 249 |
+
<circle cx="42.5" cy="50" r="4" fill="white" opacity="0.8"/>
|
| 250 |
+
<rect x="58" y="42" width="8" height="16" rx="2" fill="url(#grad1)" opacity="0.7"/>
|
| 251 |
+
<polygon points="75,45 85,50 75,55" fill="white" opacity="0.9"/>
|
| 252 |
+
</svg>
|
| 253 |
+
</div>
|
| 254 |
+
<h1>استودیو ویدیو هوش مصنوعی</h1>
|
| 255 |
+
</div>
|
| 256 |
+
<p class="subtitle">تصاویر خود را با قدرت هوش مصنوعی به ویدیو سینمایی تبدیل کنید</p>
|
| 257 |
+
</div>
|
| 258 |
</header>
|
| 259 |
|
| 260 |
<main>
|
|
|
|
| 610 |
if (data.progress_data?.[0]) {
|
| 611 |
const progress = Math.round((data.progress_data[0].progress || 0) * 100);
|
| 612 |
if(loaderProgressBar) {
|
| 613 |
+
loaderProgressBar.style.animation = 'none';
|
| 614 |
loaderProgressBar.style.width = `${progress}%`;
|
| 615 |
}
|
| 616 |
}
|
|
|
|
| 680 |
document.addEventListener('DOMContentLoaded', initializeForm);
|
| 681 |
|
| 682 |
imageDropZone.addEventListener('click', () => imageFileInput.click());
|
| 683 |
+
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => { e.addEventListener(eventName, ev => { ev.preventDefault(); ev.stopPropagation(); }); });
|
| 684 |
+
['dragenter', 'dragover'].forEach(eventName => { imageDropZone.addEventListener(eventName, () => { if (!imageDropZone.classList.contains('has-image')) { imageDropZone.classList.add('drag-over'); } }); });
|
| 685 |
+
['dragleave', 'drop'].forEach(eventName => { imageDropZone.addEventListener(eventName, () => { imageDropZone.classList.remove('drag-over'); }); });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 686 |
imageDropZone.addEventListener('drop', e => {
|
| 687 |
if (!imageDropZone.classList.contains('has-image') && e.dataTransfer.files.length > 0) {
|
| 688 |
imageFileInput.files = e.dataTransfer.files;
|
|
|
|
| 803 |
resultContainer.classList.add('active');
|
| 804 |
statusSection.classList.add('active');
|
| 805 |
aiLoader.style.display = 'block';
|
| 806 |
+
if(loaderProgressBar) loaderProgressBar.style.animation = ''; // Re-enable CSS animation for progress if needed
|
| 807 |
outputSection.classList.remove('active');
|
| 808 |
|
| 809 |
const [ratioW_str, ratioH_str] = autoSelectedAspectRatio.split(':');
|