Spaces:
Running
Running
Update index.html
Browse files- index.html +29 -21
index.html
CHANGED
|
@@ -198,31 +198,36 @@
|
|
| 198 |
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
| 199 |
#result-container.loading #loading-placeholder { display: flex; }
|
| 200 |
|
| 201 |
-
/* --- NEW:
|
| 202 |
-
.
|
| 203 |
-
width:
|
| 204 |
-
height:
|
| 205 |
position: relative;
|
| 206 |
}
|
| 207 |
-
|
| 208 |
-
.loading-spinner svg {
|
| 209 |
width: 100%;
|
| 210 |
height: 100%;
|
|
|
|
| 211 |
}
|
| 212 |
-
.
|
| 213 |
fill: none;
|
| 214 |
-
stroke-width:
|
| 215 |
stroke-linecap: round;
|
| 216 |
transform-origin: 50% 50%;
|
| 217 |
-
animation: spin-loader
|
| 218 |
}
|
| 219 |
-
.
|
| 220 |
-
|
| 221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
}
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
|
|
|
| 226 |
}
|
| 227 |
|
| 228 |
.loading-text { font-weight: 500; color: #64748b; }
|
|
@@ -315,10 +320,14 @@
|
|
| 315 |
</h2>
|
| 316 |
<div id="result-container">
|
| 317 |
<div id="loading-placeholder">
|
| 318 |
-
<div class="
|
| 319 |
-
|
| 320 |
-
<
|
| 321 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 322 |
</svg>
|
| 323 |
</div>
|
| 324 |
<p class="loading-text">هوش مصنوعی در حال خلق اثر شماست...</p>
|
|
@@ -341,8 +350,7 @@
|
|
| 341 |
</div>
|
| 342 |
|
| 343 |
<script>
|
| 344 |
-
// The JavaScript logic remains unchanged
|
| 345 |
-
// It correctly handles the 'loading' class which now triggers the new SVG animation.
|
| 346 |
const API_URL = 'https://alfa-editor-worker.onrender.com/api/edit';
|
| 347 |
const dropZone = document.getElementById('drop-zone');
|
| 348 |
const dropZoneContent = document.getElementById('drop-zone-content');
|
|
|
|
| 198 |
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
| 199 |
#result-container.loading #loading-placeholder { display: flex; }
|
| 200 |
|
| 201 |
+
/* --- NEW & IMPROVED: Creative Loading Spinner --- */
|
| 202 |
+
.creative-loader {
|
| 203 |
+
width: 100px;
|
| 204 |
+
height: 100px;
|
| 205 |
position: relative;
|
| 206 |
}
|
| 207 |
+
.creative-loader svg {
|
|
|
|
| 208 |
width: 100%;
|
| 209 |
height: 100%;
|
| 210 |
+
transform-origin: center;
|
| 211 |
}
|
| 212 |
+
.creative-loader .arc {
|
| 213 |
fill: none;
|
| 214 |
+
stroke-width: 4;
|
| 215 |
stroke-linecap: round;
|
| 216 |
transform-origin: 50% 50%;
|
| 217 |
+
animation: spin-loader 2s linear infinite;
|
| 218 |
}
|
| 219 |
+
.creative-loader .arc1 { stroke: var(--primary-color-start); animation-duration: 2.2s; }
|
| 220 |
+
.creative-loader .arc2 { stroke: var(--primary-color-end); animation-duration: 1.8s; animation-direction: reverse; }
|
| 221 |
+
.creative-loader .arc3 { stroke: #8b5cf6; animation-duration: 2s; }
|
| 222 |
+
.creative-loader .star {
|
| 223 |
+
fill: var(--primary-color-end);
|
| 224 |
+
transform-origin: center;
|
| 225 |
+
animation: pulse-star 1.5s ease-in-out infinite;
|
| 226 |
}
|
| 227 |
+
@keyframes spin-loader { to { transform: rotate(360deg); } }
|
| 228 |
+
@keyframes pulse-star {
|
| 229 |
+
0%, 100% { transform: scale(0.9); opacity: 0.8; }
|
| 230 |
+
50% { transform: scale(1.1); opacity: 1; }
|
| 231 |
}
|
| 232 |
|
| 233 |
.loading-text { font-weight: 500; color: #64748b; }
|
|
|
|
| 320 |
</h2>
|
| 321 |
<div id="result-container">
|
| 322 |
<div id="loading-placeholder">
|
| 323 |
+
<div class="creative-loader">
|
| 324 |
+
<svg viewBox="0 0 50 50">
|
| 325 |
+
<g>
|
| 326 |
+
<circle class="arc arc1" cx="25" cy="25" r="22" stroke-dasharray="60 150"></circle>
|
| 327 |
+
<circle class="arc arc2" cx="25" cy="25" r="18" stroke-dasharray="60 150"></circle>
|
| 328 |
+
<circle class="arc arc3" cx="25" cy="25" r="14" stroke-dasharray="60 150"></circle>
|
| 329 |
+
<path class="star" d="M25,21 L26.9,24.1 L30,25 L26.9,25.9 L25,29 L23.1,25.9 L20,25 L23.1,24.1 Z"></path>
|
| 330 |
+
</g>
|
| 331 |
</svg>
|
| 332 |
</div>
|
| 333 |
<p class="loading-text">هوش مصنوعی در حال خلق اثر شماست...</p>
|
|
|
|
| 350 |
</div>
|
| 351 |
|
| 352 |
<script>
|
| 353 |
+
// The JavaScript logic remains unchanged. It correctly handles the 'loading' class which now triggers the new SVG animation.
|
|
|
|
| 354 |
const API_URL = 'https://alfa-editor-worker.onrender.com/api/edit';
|
| 355 |
const dropZone = document.getElementById('drop-zone');
|
| 356 |
const dropZoneContent = document.getElementById('drop-zone-content');
|