|
21 | 21 | let hasSetup = false; |
22 | 22 |
|
23 | 23 | let showInactiveSocials = $state(false); |
| 24 | + let interactedInactiveSocials = $state(false); |
24 | 25 | let isTwitterX = $state(false); |
25 | 26 | let isTwitterXTimeout = 0; |
26 | 27 | let isTwitterXAudio: HTMLAudioElement | null = null; |
|
75 | 76 |
|
76 | 77 | function toggleInactiveSocials() { |
77 | 78 | showInactiveSocials = !showInactiveSocials; |
| 79 | + interactedInactiveSocials = true; |
78 | 80 | } |
79 | 81 |
|
80 | 82 | function handleMelonlandForum(e: Event) { |
|
181 | 183 | <StatusCafeStat /> |
182 | 184 | </a> |
183 | 185 | </li> |
184 | | - <li class="link-tile" class:active={showInactiveSocials} aria-label={showInactiveSocials ? "hide inactive links" : "show inactive links"}> |
| 186 | + <li class="link-tile inactive-link-tile" class:active={showInactiveSocials} aria-label={showInactiveSocials ? "hide inactive links" : "show inactive links"}> |
185 | 187 | <button class="pop-out-btn" onclick={() => toggleInactiveSocials()}> |
186 | | - <Icon icon={showInactiveSocials ? "tabler:chevron-down" : "tabler:chevron-left"} /> |
| 188 | + <Icon icon="tabler:chevron-left" /> |
187 | 189 | <h3>other links...</h3> |
188 | 190 | </button> |
189 | 191 | </li> |
190 | | - <li class="inactive-links live-tiles-folder" class:active={showInactiveSocials} aria-label="inactive links"> |
| 192 | + <li class="inactive-links live-tiles-folder" aria-label="inactive links" |
| 193 | + class:active={showInactiveSocials} class:interacted={interactedInactiveSocials} |
| 194 | + > |
191 | 195 | <ul class="widget-box live-tiles" style="width: 100%" > |
| 196 | + <li class="link-tile" aria-label="youtube"> |
| 197 | + <a class="pop-out-btn" href="https://www.youtube.com/@duduneko" rel="me"> |
| 198 | + <Tooltip> |
| 199 | + <p>@duduneko</p> |
| 200 | + <p class="tooltip-action touch-only">(click again to view profile)</p> |
| 201 | + </Tooltip> |
| 202 | + <Icon icon="bi:youtube" /> |
| 203 | + <h3>youtube</h3> |
| 204 | + </a> |
| 205 | + </li> |
192 | 206 | <li class="link-tile" aria-label="newgrounds"> |
193 | 207 | <a class="pop-out-btn" href="https://ducdat0507.newgrounds.com" rel="me"> |
194 | 208 | <Tooltip> |
|
209 | 223 | <h3>mspfa</h3> |
210 | 224 | </a> |
211 | 225 | </li> |
| 226 | + <li class="link-tile" aria-label="melonland forum"> |
| 227 | + <a class="pop-out-btn" href="https://www.tumblr.com/ducdat0507" rel="me" |
| 228 | + onclick={handleMelonlandForum}> |
| 229 | + <Tooltip> |
| 230 | + <p>@duducat</p> |
| 231 | + <p class="tooltip-action touch-only">(click again to view profile)</p> |
| 232 | + </Tooltip> |
| 233 | + <Icon icon="ri:tumblr-fill" /> |
| 234 | + <h3>tumblr</h3> |
| 235 | + </a> |
| 236 | + </li> |
212 | 237 | <li class="link-tile" aria-label="melonland forum"> |
213 | 238 | <a class="pop-out-btn" href="https://forum.melonland.net/index.php?action=profile;u=2958" rel="me" |
214 | 239 | onclick={handleMelonlandForum}> |
|
454 | 479 | } |
455 | 480 | } |
456 | 481 |
|
| 482 | +
|
| 483 | +
|
457 | 484 | .link-tile.active > :first-child { |
458 | 485 | background: white; |
459 | 486 | color: black; |
460 | 487 | } |
| 488 | + .inactive-link-tile :global(svg) { |
| 489 | + transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); |
| 490 | + } |
| 491 | + .inactive-link-tile.active :global(svg) { |
| 492 | + transform: rotate(-90deg); |
| 493 | + } |
461 | 494 | .inactive-links { |
462 | | - display: none; |
| 495 | + height: 0; |
| 496 | + opacity: 0; |
| 497 | + margin-bottom: -8px; |
| 498 | + overflow: hidden; |
463 | 499 | } |
464 | 500 | .inactive-links.active { |
| 501 | + height: auto; |
| 502 | + opacity: 1; |
| 503 | + margin-bottom: 0; |
465 | 504 | display: block; |
466 | 505 | } |
| 506 | + .inactive-links.interacted { |
| 507 | + animation: 0.3s inactive-tiles-outro; |
| 508 | + } |
| 509 | + .inactive-links.interacted > ul { |
| 510 | + animation: 0.4s inactive-tiles-outro-child; |
| 511 | + } |
| 512 | + .inactive-links.interacted > ul > li:nth-child(1) { |
| 513 | + animation: 0.5s 0s inactive-tiles-outro-tile; |
| 514 | + } |
| 515 | + .inactive-links.interacted > ul > li:nth-child(2) { |
| 516 | + animation: 0.6s inactive-tiles-outro-tile; |
| 517 | + } |
| 518 | + .inactive-links.interacted > ul > li:nth-child(3) { |
| 519 | + animation: 0.7s inactive-tiles-outro-tile; |
| 520 | + } |
| 521 | + .inactive-links.interacted > ul > li:nth-child(4) { |
| 522 | + animation: 0.8s inactive-tiles-outro-tile; |
| 523 | + } |
| 524 | + .inactive-links.interacted > ul > li:nth-child(5) { |
| 525 | + animation: 0.9s inactive-tiles-outro-tile; |
| 526 | + } |
| 527 | + .inactive-links.interacted > ul > li:nth-child(n+6) { |
| 528 | + animation: 1s inactive-tiles-outro-tile; |
| 529 | + } |
| 530 | + .inactive-links.interacted.active { |
| 531 | + animation: 0.3s inactive-tiles-intro; |
| 532 | + } |
| 533 | + .inactive-links.interacted.active > ul { |
| 534 | + animation: 0.3s inactive-tiles-intro-child; |
| 535 | + } |
| 536 | + .inactive-links.interacted.active > ul > li:nth-child(1) { |
| 537 | + animation: 0.8s 0s inactive-tiles-intro-tile; |
| 538 | + } |
| 539 | + .inactive-links.interacted.active > ul > li:nth-child(2) { |
| 540 | + animation: 0.9s -0.1s inactive-tiles-intro-tile; |
| 541 | + } |
| 542 | + .inactive-links.interacted.active > ul > li:nth-child(3) { |
| 543 | + animation: 1s -0.2s inactive-tiles-intro-tile; |
| 544 | + } |
| 545 | + .inactive-links.interacted.active > ul > li:nth-child(4) { |
| 546 | + animation: 1.1s -0.3s inactive-tiles-intro-tile; |
| 547 | + } |
| 548 | + .inactive-links.interacted.active > ul > li:nth-child(5) { |
| 549 | + animation: 1.2s -0.4s inactive-tiles-intro-tile; |
| 550 | + } |
| 551 | + .inactive-links.interacted.active > ul > li:nth-child(n+6) { |
| 552 | + animation: 1.3s -0.5s inactive-tiles-intro-tile; |
| 553 | + } |
| 554 | +
|
| 555 | + @keyframes inactive-tiles-intro { |
| 556 | + from { |
| 557 | + overflow: hidden; |
| 558 | + height: 0; |
| 559 | + padding-bottom: 0; |
| 560 | + animation-timing-function: cubic-bezier(0.87, 0, 0.13, 1); |
| 561 | + } 50% { |
| 562 | + height: 0; |
| 563 | + padding-bottom: 2em; |
| 564 | + margin-bottom: 0; |
| 565 | + } 50.01% { |
| 566 | + height: fit-content; |
| 567 | + padding-bottom: 0; |
| 568 | + margin-bottom: -2em; |
| 569 | + } to { |
| 570 | + padding-bottom: 4px; |
| 571 | + height: fit-content; |
| 572 | + opacity: 1; |
| 573 | + } |
| 574 | + } |
| 575 | +
|
| 576 | + @keyframes inactive-tiles-intro-child { |
| 577 | + from { |
| 578 | + transform: translateY(-100%); |
| 579 | + animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); |
| 580 | + } 50% { |
| 581 | + transform: translateY(-100%); |
| 582 | + } to { |
| 583 | + transform: 0; |
| 584 | + } |
| 585 | + } |
| 586 | +
|
| 587 | + @keyframes inactive-tiles-intro-tile { |
| 588 | + from { |
| 589 | + transform: translateY(-6em); |
| 590 | + animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); |
| 591 | + } to { |
| 592 | + transform: 0; |
| 593 | + } |
| 594 | + } |
| 595 | +
|
| 596 | + @keyframes inactive-tiles-outro { |
| 597 | + from { |
| 598 | + opacity: 1; |
| 599 | + margin-bottom: 0; |
| 600 | + height: fit-content; |
| 601 | + animation-timing-function: cubic-bezier(0.87, 0, 0.13, 1); |
| 602 | + } 50% { |
| 603 | + height: fit-content; |
| 604 | + margin-bottom: -2em; |
| 605 | + padding-block: 0 |
| 606 | + } 50.01% { |
| 607 | + height: 0; |
| 608 | + padding-block: 2em; |
| 609 | + margin-bottom: 0; |
| 610 | + } to { |
| 611 | + padding-block: 0; |
| 612 | + margin-bottom: 0; |
| 613 | + height: 0; |
| 614 | + opacity: 1; |
| 615 | + } |
| 616 | + } |
| 617 | +
|
| 618 | + @keyframes inactive-tiles-outro-child { |
| 619 | + from { |
| 620 | + transform: 0; |
| 621 | + animation-timing-function: cubic-bezier(0.87, 0, 0.13, 1); |
| 622 | + } 50% { |
| 623 | + transform: translateY(-100%); |
| 624 | + } to { |
| 625 | + transform: translateY(-100%); |
| 626 | + } |
| 627 | + } |
| 628 | +
|
| 629 | + @keyframes inactive-tiles-outro-tile { |
| 630 | + from { |
| 631 | + transform: 0l; |
| 632 | + animation-timing-function: cubic-bezier(0.87, 0, 0.13, 1); |
| 633 | + } to { |
| 634 | + transform: translateY(-3em); |
| 635 | + } |
| 636 | + } |
| 637 | +
|
| 638 | + |
467 | 639 |
|
468 | 640 | .twitter-x { |
469 | | - animation: twitter-x-shaking 0.1s linear infinite; |
| 641 | + animation: twitter-x-shaking 0.1s linear infinite !important; |
470 | 642 | } |
471 | 643 | .twitter-x > :first-child { |
472 | 644 | background: red !important; |
|
0 commit comments