|
12 | 12 | import FileSelect from './dialogItems/fileSelect.svelte'
|
13 | 13 | import FolderSelect from './dialogItems/folderSelect.svelte'
|
14 | 14 | import CodeInput from './dialogItems/codeInput.svelte'
|
| 15 | +
|
| 16 | + import HeartIcon from '../assets/heart.png' |
| 17 | + import KoFiImage from '../assets/kofi_s_tag_white.webp' |
| 18 | +
|
| 19 | + import fontUrl from '../assets/MinecraftFull.ttf' |
| 20 | + if (![...document.fonts.keys()].some(v => v.family === 'MinecraftFull')) { |
| 21 | + void new FontFace('MinecraftFull', fontUrl, {}).load().then(font => { |
| 22 | + document.fonts.add(font) |
| 23 | + }) |
| 24 | + } |
| 25 | +
|
| 26 | + localStorage.setItem('animated_java_settings_support_me_popup', 'true') |
15 | 27 | </script>
|
16 | 28 |
|
17 | 29 | <script lang="ts">
|
|
328 | 340 | return { type: 'success', message: '' }
|
329 | 341 | }
|
330 | 342 | }
|
| 343 | +
|
| 344 | + let showSupportMePopup = |
| 345 | + localStorage.getItem('animated_java_settings_support_me_popup') === 'true' |
| 346 | + function clickSupportMeXButton() { |
| 347 | + localStorage.setItem('animated_java_settings_support_me_popup', 'false') |
| 348 | + showSupportMePopup = false |
| 349 | + } |
331 | 350 | </script>
|
332 | 351 |
|
333 | 352 | <div>
|
|
590 | 609 | {/if}
|
591 | 610 | </div>
|
592 | 611 |
|
| 612 | +{#if showSupportMePopup} |
| 613 | + <div class="ko-fi-popup-container"> |
| 614 | + <div class="ko-fi-popup"> |
| 615 | + <div class="title"> |
| 616 | + <img class="heart" src={HeartIcon} alt="❤️" /> |
| 617 | + <span>Animated Java?</span> |
| 618 | + <!-- svelte-ignore a11y-click-events-have-key-events --> |
| 619 | + <i class="material-icons icon" on:click={clickSupportMeXButton}>close</i> |
| 620 | + </div> |
| 621 | + <a href="https://ko-fi.com/snavesutit" class="ko-fi-button"> |
| 622 | + <img src={KoFiImage} alt="" /> |
| 623 | + </a> |
| 624 | + </div> |
| 625 | + <div class="shadow" /> |
| 626 | + </div> |
| 627 | +{/if} |
| 628 | + |
593 | 629 | <style>
|
| 630 | + i { |
| 631 | + cursor: pointer; |
| 632 | + transition: |
| 633 | + transform 0.2s ease 0s, |
| 634 | + color 0.2s ease 0s; |
| 635 | + text-shadow: 1.5px 1.5px 0px rgba(0, 0, 0, 0.25); |
| 636 | + } |
| 637 | + i:hover { |
| 638 | + transform: scale(1.25); |
| 639 | + color: var(--color-error); |
| 640 | + } |
| 641 | +
|
| 642 | + .ko-fi-popup-container { |
| 643 | + position: absolute; |
| 644 | + top: 30px; |
| 645 | + right: -23.8vw; |
| 646 | + font-family: 'MinecraftFull'; |
| 647 | + font-size: 20px; |
| 648 | + display: flex; |
| 649 | + align-items: center; |
| 650 | + justify-content: center; |
| 651 | + flex-direction: column; |
| 652 | + color: white; |
| 653 | + overflow: hidden; |
| 654 | + } |
| 655 | + .ko-fi-popup { |
| 656 | + position: relative; |
| 657 | + display: flex; |
| 658 | + align-items: center; |
| 659 | + justify-content: center; |
| 660 | + flex-direction: column; |
| 661 | + padding: 8px; |
| 662 | + padding-right: 0px; |
| 663 | +
|
| 664 | + background-color: #00aced; |
| 665 | + border-radius: 0 8px 8px 0; |
| 666 | + box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2); |
| 667 | + animation: slideIn 0.75s; |
| 668 | + } |
| 669 | + .heart { |
| 670 | + width: 28px; |
| 671 | + height: 28px; |
| 672 | + animation: beat 2s ease infinite; |
| 673 | + } |
| 674 | + @keyframes beat { |
| 675 | + 0% { |
| 676 | + transform: scale(1); |
| 677 | + } |
| 678 | + 10% { |
| 679 | + transform: scale(1.2); |
| 680 | + } |
| 681 | + 20% { |
| 682 | + transform: scale(1); |
| 683 | + } |
| 684 | + } |
| 685 | + .ko-fi-popup span { |
| 686 | + text-shadow: 2.4px 2.4px 0px rgba(0, 0, 0, 0.25); |
| 687 | + } |
| 688 | + .ko-fi-button img { |
| 689 | + width: 100%; |
| 690 | + image-rendering: auto; |
| 691 | + border-radius: 12px; |
| 692 | + } |
| 693 | + .ko-fi-button { |
| 694 | + width: 18vw; |
| 695 | + margin-right: 1vw; |
| 696 | + margin-top: 1vw; |
| 697 | + transition: transform 0.2s ease; |
| 698 | + } |
| 699 | + .ko-fi-button:hover { |
| 700 | + transform: scale(1.05); |
| 701 | + transition: transform 0.2s ease; |
| 702 | + } |
| 703 | + .ko-fi-popup .title { |
| 704 | + display: flex; |
| 705 | + justify-content: center; |
| 706 | + gap: 0.75rem; |
| 707 | + } |
| 708 | + .shadow { |
| 709 | + position: absolute; |
| 710 | + top: 0; |
| 711 | + left: 0; |
| 712 | + height: 100%; |
| 713 | + background: linear-gradient(90deg, #00000066, #00000000); |
| 714 | + width: 0px; |
| 715 | + } |
| 716 | + @keyframes slideIn { |
| 717 | + 0% { |
| 718 | + right: 23.8vw; |
| 719 | + } |
| 720 | + 100% { |
| 721 | + right: 0px; |
| 722 | + } |
| 723 | + } |
| 724 | + @keyframes slideInPanel { |
| 725 | + 0% { |
| 726 | + right: 0vw; |
| 727 | + } |
| 728 | + 100% { |
| 729 | + right: -23.8vw; |
| 730 | + } |
| 731 | + } |
| 732 | +
|
594 | 733 | :global(.dialog_wrapper .dialog_content) {
|
595 | 734 | overflow-y: auto !important;
|
596 | 735 | }
|
|
0 commit comments