Spaces:
Running on Zero
Running on Zero
Replace loading animation with a new plant-themed grow-loader in index.html and style.css. The updated loader features sprouting plants that bloom while the beat brews, enhancing the visual experience during loading times.
Browse files- frontend/index.html +14 -1
- frontend/style.css +96 -26
frontend/index.html
CHANGED
|
@@ -88,7 +88,20 @@
|
|
| 88 |
placeholder="rainy night in kyoto, soft piano, vinyl crackle..."
|
| 89 |
></textarea>
|
| 90 |
<div id="generating" class="hidden">
|
| 91 |
-
<div class="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
<p class="led-status">
|
| 93 |
BREWING YOUR BEAT<span class="dots">...</span>
|
| 94 |
</p>
|
|
|
|
| 88 |
placeholder="rainy night in kyoto, soft piano, vinyl crackle..."
|
| 89 |
></textarea>
|
| 90 |
<div id="generating" class="hidden">
|
| 91 |
+
<div class="grow-loader" aria-hidden="true">
|
| 92 |
+
<span class="sprout">
|
| 93 |
+
<i class="stem"></i><i class="leaf l"></i><i class="leaf r"></i><i class="bloom"></i>
|
| 94 |
+
</span>
|
| 95 |
+
<span class="sprout">
|
| 96 |
+
<i class="stem"></i><i class="leaf l"></i><i class="leaf r"></i><i class="bloom"></i>
|
| 97 |
+
</span>
|
| 98 |
+
<span class="sprout">
|
| 99 |
+
<i class="stem"></i><i class="leaf l"></i><i class="leaf r"></i><i class="bloom"></i>
|
| 100 |
+
</span>
|
| 101 |
+
<span class="sprout">
|
| 102 |
+
<i class="stem"></i><i class="leaf l"></i><i class="leaf r"></i><i class="bloom"></i>
|
| 103 |
+
</span>
|
| 104 |
+
</div>
|
| 105 |
<p class="led-status">
|
| 106 |
BREWING YOUR BEAT<span class="dots">...</span>
|
| 107 |
</p>
|
frontend/style.css
CHANGED
|
@@ -465,50 +465,120 @@ body {
|
|
| 465 |
}
|
| 466 |
}
|
| 467 |
|
| 468 |
-
|
|
|
|
|
|
|
|
|
|
| 469 |
display: flex;
|
| 470 |
-
gap:
|
| 471 |
justify-content: center;
|
| 472 |
align-items: flex-end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 473 |
height: 34px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 474 |
}
|
| 475 |
|
| 476 |
-
.
|
| 477 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 478 |
border-radius: 2px;
|
| 479 |
background: linear-gradient(#5dff8d, #1f8f4a);
|
| 480 |
box-shadow: 0 0 6px rgba(93, 255, 141, 0.5);
|
| 481 |
-
animation: eq-bounce 1s ease-in-out infinite;
|
| 482 |
}
|
| 483 |
|
| 484 |
-
.
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
}
|
| 492 |
-
.
|
| 493 |
-
|
| 494 |
-
|
|
|
|
|
|
|
| 495 |
}
|
| 496 |
-
.
|
| 497 |
-
|
| 498 |
-
|
|
|
|
|
|
|
| 499 |
}
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 503 |
}
|
| 504 |
|
| 505 |
-
@keyframes
|
| 506 |
-
0%
|
| 507 |
-
|
| 508 |
-
|
|
|
|
|
|
|
|
|
|
| 509 |
}
|
| 510 |
50% {
|
| 511 |
-
transform:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 512 |
}
|
| 513 |
}
|
| 514 |
|
|
|
|
| 465 |
}
|
| 466 |
}
|
| 467 |
|
| 468 |
+
/* cozy loader: a little row of plants that sprout, bloom, and loop while the
|
| 469 |
+
beat brews — green-on-LED to match the machine's dot-matrix screen. */
|
| 470 |
+
.grow-loader {
|
| 471 |
+
position: relative;
|
| 472 |
display: flex;
|
| 473 |
+
gap: 13px;
|
| 474 |
justify-content: center;
|
| 475 |
align-items: flex-end;
|
| 476 |
+
height: 40px;
|
| 477 |
+
}
|
| 478 |
+
|
| 479 |
+
/* a soft soil line the sprouts rise from */
|
| 480 |
+
.grow-loader::after {
|
| 481 |
+
content: "";
|
| 482 |
+
position: absolute;
|
| 483 |
+
left: 50%;
|
| 484 |
+
bottom: 0;
|
| 485 |
+
transform: translateX(-50%);
|
| 486 |
+
width: 118px;
|
| 487 |
+
height: 3px;
|
| 488 |
+
border-radius: 2px;
|
| 489 |
+
background: linear-gradient(#2aa85a, #115f30);
|
| 490 |
+
box-shadow: 0 0 6px rgba(93, 255, 141, 0.25);
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
.sprout {
|
| 494 |
+
position: relative;
|
| 495 |
+
width: 18px;
|
| 496 |
height: 34px;
|
| 497 |
+
transform-origin: 50% 100%;
|
| 498 |
+
animation: sprout-grow 2.8s ease-in-out infinite;
|
| 499 |
+
}
|
| 500 |
+
.sprout:nth-child(2) {
|
| 501 |
+
animation-delay: 0.4s;
|
| 502 |
+
}
|
| 503 |
+
.sprout:nth-child(3) {
|
| 504 |
+
animation-delay: 0.8s;
|
| 505 |
+
}
|
| 506 |
+
.sprout:nth-child(4) {
|
| 507 |
+
animation-delay: 1.2s;
|
| 508 |
}
|
| 509 |
|
| 510 |
+
.sprout .stem {
|
| 511 |
+
position: absolute;
|
| 512 |
+
left: 50%;
|
| 513 |
+
bottom: 0;
|
| 514 |
+
width: 2px;
|
| 515 |
+
height: 22px;
|
| 516 |
+
margin-left: -1px;
|
| 517 |
border-radius: 2px;
|
| 518 |
background: linear-gradient(#5dff8d, #1f8f4a);
|
| 519 |
box-shadow: 0 0 6px rgba(93, 255, 141, 0.5);
|
|
|
|
| 520 |
}
|
| 521 |
|
| 522 |
+
.sprout .leaf {
|
| 523 |
+
position: absolute;
|
| 524 |
+
bottom: 9px;
|
| 525 |
+
width: 7px;
|
| 526 |
+
height: 4px;
|
| 527 |
+
background: #43e07f;
|
| 528 |
+
box-shadow: 0 0 4px rgba(93, 255, 141, 0.4);
|
| 529 |
}
|
| 530 |
+
.sprout .leaf.l {
|
| 531 |
+
right: 50%;
|
| 532 |
+
border-radius: 60% 0 60% 0;
|
| 533 |
+
transform: rotate(22deg);
|
| 534 |
+
transform-origin: right center;
|
| 535 |
}
|
| 536 |
+
.sprout .leaf.r {
|
| 537 |
+
left: 50%;
|
| 538 |
+
border-radius: 0 60% 0 60%;
|
| 539 |
+
transform: rotate(-22deg);
|
| 540 |
+
transform-origin: left center;
|
| 541 |
}
|
| 542 |
+
|
| 543 |
+
/* a 5-dot flower head: pale centre + four green petals via box-shadow */
|
| 544 |
+
.sprout .bloom {
|
| 545 |
+
position: absolute;
|
| 546 |
+
left: 50%;
|
| 547 |
+
bottom: 19px;
|
| 548 |
+
width: 5px;
|
| 549 |
+
height: 5px;
|
| 550 |
+
margin-left: -2.5px;
|
| 551 |
+
border-radius: 50%;
|
| 552 |
+
background: #d9ffe7;
|
| 553 |
+
box-shadow:
|
| 554 |
+
0 -4px 0 #5dff8d,
|
| 555 |
+
0 4px 0 #5dff8d,
|
| 556 |
+
-4px 0 0 #5dff8d,
|
| 557 |
+
4px 0 0 #5dff8d,
|
| 558 |
+
0 0 8px rgba(93, 255, 141, 0.8);
|
| 559 |
}
|
| 560 |
|
| 561 |
+
@keyframes sprout-grow {
|
| 562 |
+
0% {
|
| 563 |
+
transform: scale(0);
|
| 564 |
+
opacity: 0;
|
| 565 |
+
}
|
| 566 |
+
12% {
|
| 567 |
+
opacity: 1;
|
| 568 |
}
|
| 569 |
50% {
|
| 570 |
+
transform: scale(1.08);
|
| 571 |
+
}
|
| 572 |
+
62% {
|
| 573 |
+
transform: scale(1);
|
| 574 |
+
}
|
| 575 |
+
88% {
|
| 576 |
+
transform: scale(1);
|
| 577 |
+
opacity: 1;
|
| 578 |
+
}
|
| 579 |
+
100% {
|
| 580 |
+
transform: scale(1);
|
| 581 |
+
opacity: 0;
|
| 582 |
}
|
| 583 |
}
|
| 584 |
|