|
40 | 40 | <link rel="icon" type="image/svg+xml" href="/images/favicon.svg"> |
41 | 41 | <link rel="preconnect" href="https://fonts.googleapis.com"> |
42 | 42 | <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
43 | | - <link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Monoton&family=Poppins:wght@500&family=Raleway:wght@300&display=swap" onload="this.onload=null;this.rel='stylesheet'"> |
44 | | - <noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Monoton&family=Poppins:wght@500&family=Raleway:wght@300&display=swap"></noscript> |
| 43 | + <link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Monoton&family=Poppins:wght@500&family=Raleway:wght@300&display=optional" onload="this.onload=null;this.rel='stylesheet'"> |
| 44 | + <noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Monoton&family=Poppins:wght@500&family=Raleway:wght@300&display=optional"></noscript> |
| 45 | + <link rel="preload" href="/css/global.css" as="style"> |
45 | 46 | <link rel="stylesheet" href="/css/global.css"> |
46 | 47 | <style> |
47 | 48 | body { |
48 | | - font-family: 'Inter', sans-serif; |
| 49 | + font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif; |
49 | 50 | line-height: 1.7; |
50 | 51 | font-size: 16px; |
| 52 | + font-size-adjust: 0.52; |
51 | 53 | } |
52 | 54 |
|
53 | 55 | #about { |
|
103 | 105 | font-weight: 600; |
104 | 106 | } |
105 | 107 |
|
| 108 | + lottie-player { |
| 109 | + display: inline-block; |
| 110 | + vertical-align: middle; |
| 111 | + } |
| 112 | + |
| 113 | + .section-heading-icon { |
| 114 | + width: 20px; |
| 115 | + height: 20px; |
| 116 | + display: inline-block; |
| 117 | + vertical-align: middle; |
| 118 | + margin-right: 8px; |
| 119 | + } |
| 120 | + |
| 121 | + .contact-item-icon { |
| 122 | + width: 42px; |
| 123 | + height: 42px; |
| 124 | + } |
| 125 | + |
| 126 | + .copy-btn-icon { |
| 127 | + width: 16px; |
| 128 | + height: 16px; |
| 129 | + } |
| 130 | + |
106 | 131 | .about-profile-img { |
107 | 132 | flex: 1; |
108 | 133 | display: flex; |
|
173 | 198 | } |
174 | 199 | } |
175 | 200 | </style> |
176 | | - <link rel="stylesheet" href="/css/about.css"> |
| 201 | + <link rel="preload" href="/css/about.css" as="style"> |
| 202 | + <link rel="stylesheet" href="/css/about.css" media="print" onload="this.media='all'"> |
| 203 | + <noscript><link rel="stylesheet" href="/css/about.css"></noscript> |
177 | 204 | </head> |
178 | 205 | <body> |
179 | 206 | <!-- About Page Schema --> |
@@ -707,15 +734,45 @@ <h2><lottie-player src="/images/link.json" background="transparent" speed="1" cl |
707 | 734 | return; |
708 | 735 | } |
709 | 736 |
|
| 737 | + let loaded = false; |
710 | 738 | const load = function() { |
| 739 | + if (loaded) { |
| 740 | + return; |
| 741 | + } |
| 742 | + |
| 743 | + loaded = true; |
711 | 744 | loadDeferredScript('https://cdn.jsdelivr.net/npm/@lottiefiles/lottie-player@1.5.7/dist/lottie-player.js'); |
712 | 745 | }; |
713 | 746 |
|
714 | | - if ('requestIdleCallback' in window) { |
715 | | - window.requestIdleCallback(load, { timeout: 1500 }); |
716 | | - } else { |
717 | | - window.setTimeout(load, 1200); |
| 747 | + const scheduleIdleLoad = function() { |
| 748 | + if ('requestIdleCallback' in window) { |
| 749 | + window.requestIdleCallback(load, { timeout: 3500 }); |
| 750 | + } else { |
| 751 | + window.setTimeout(load, 3000); |
| 752 | + } |
| 753 | + }; |
| 754 | + |
| 755 | + if ('IntersectionObserver' in window) { |
| 756 | + const observer = new IntersectionObserver(function(entries) { |
| 757 | + if (entries.some(function(entry) { return entry.isIntersecting; })) { |
| 758 | + observer.disconnect(); |
| 759 | + load(); |
| 760 | + } |
| 761 | + }, { rootMargin: '200px 0px' }); |
| 762 | + |
| 763 | + document.querySelectorAll('lottie-player').forEach(function(node) { |
| 764 | + observer.observe(node); |
| 765 | + }); |
| 766 | + |
| 767 | + ['scroll', 'pointerdown', 'keydown', 'touchstart'].forEach(function(eventName) { |
| 768 | + window.addEventListener(eventName, load, { once: true, passive: true }); |
| 769 | + }); |
| 770 | + |
| 771 | + scheduleIdleLoad(); |
| 772 | + return; |
718 | 773 | } |
| 774 | + |
| 775 | + scheduleIdleLoad(); |
719 | 776 | } |
720 | 777 |
|
721 | 778 | function updateFooterYear() { |
|
0 commit comments