Skip to content

Commit b6bd490

Browse files
committed
fix css
1 parent 7d4aac3 commit b6bd490

2 files changed

Lines changed: 68 additions & 11 deletions

File tree

about/index.html

Lines changed: 65 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,16 @@
4040
<link rel="icon" type="image/svg+xml" href="/images/favicon.svg">
4141
<link rel="preconnect" href="https://fonts.googleapis.com">
4242
<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">
4546
<link rel="stylesheet" href="/css/global.css">
4647
<style>
4748
body {
48-
font-family: 'Inter', sans-serif;
49+
font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
4950
line-height: 1.7;
5051
font-size: 16px;
52+
font-size-adjust: 0.52;
5153
}
5254

5355
#about {
@@ -103,6 +105,29 @@
103105
font-weight: 600;
104106
}
105107

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+
106131
.about-profile-img {
107132
flex: 1;
108133
display: flex;
@@ -173,7 +198,9 @@
173198
}
174199
}
175200
</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>
177204
</head>
178205
<body>
179206
<!-- About Page Schema -->
@@ -707,15 +734,45 @@ <h2><lottie-player src="/images/link.json" background="transparent" speed="1" cl
707734
return;
708735
}
709736

737+
let loaded = false;
710738
const load = function() {
739+
if (loaded) {
740+
return;
741+
}
742+
743+
loaded = true;
711744
loadDeferredScript('https://cdn.jsdelivr.net/npm/@lottiefiles/lottie-player@1.5.7/dist/lottie-player.js');
712745
};
713746

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;
718773
}
774+
775+
scheduleIdleLoad();
719776
}
720777

721778
function updateFooterYear() {

css/global.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ body.seo-layout .footer-minimal {
263263

264264
.footer-minimal p {
265265
font-size: 13px;
266-
color: #666;
266+
color: #9aa3a8;
267267
}
268268

269269
.footer-minimal .footer-container {
@@ -288,7 +288,7 @@ body.seo-layout .footer-minimal {
288288
padding: 0 14px;
289289
border: 1px solid rgba(255,255,255,0.1);
290290
border-radius: 999px;
291-
color: #9b9b9b;
291+
color: #c4ccd1;
292292
text-decoration: none;
293293
font-size: 12px;
294294
letter-spacing: 0.06em;
@@ -348,7 +348,7 @@ body.seo-layout .footer-minimal {
348348

349349
.credits-grid a {
350350
font-size: 11px;
351-
color: #444;
351+
color: #8b9398;
352352
text-decoration: none;
353353
}
354354

0 commit comments

Comments
 (0)