Skip to content

Commit 7295f4f

Browse files
authored
Website Update
1 parent 183236b commit 7295f4f

3 files changed

Lines changed: 40 additions & 10 deletions

File tree

docs/assets/css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ a {
20752075
}
20762076

20772077
.discipline-stack-shell {
2078-
--discipline-card-width: min(100%, 24.1rem);
2078+
--discipline-card-width: min(calc(100% - 2.35rem), 24.1rem);
20792079
--discipline-card-height: clamp(25.8rem, 84vw, 30.4rem);
20802080
}
20812081

docs/assets/js/shell.js

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
const body = document.body;
55
const base = (body?.getAttribute('data-base') || '.').trim();
6-
const assetVersion = '20260410s';
6+
const assetVersion = '20260410t';
77
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
88
const SETTLE_PASS_DELAYS = [0, 140, 320, 560];
99
const simpleIcon = (name) => `https://cdn.jsdelivr.net/npm/simple-icons@v11/icons/${name}.svg`;
@@ -1038,27 +1038,57 @@
10381038
return;
10391039
}
10401040

1041+
const revealElement = (element, observer) => {
1042+
if (element.classList.contains("is-visible")) {
1043+
return;
1044+
}
1045+
element.classList.add("is-visible");
1046+
observer?.unobserve?.(element);
1047+
};
1048+
1049+
const inView = (element) => {
1050+
const rect = element.getBoundingClientRect();
1051+
const vh = window.innerHeight || document.documentElement.clientHeight;
1052+
const vw = window.innerWidth || document.documentElement.clientWidth;
1053+
return rect.bottom > 0 && rect.right > 0 && rect.top < vh && rect.left < vw;
1054+
};
1055+
10411056
const observer = new IntersectionObserver(
10421057
(entries, obs) => {
10431058
entries.forEach((entry) => {
10441059
if (!entry.isIntersecting) {
10451060
return;
10461061
}
1047-
entry.target.classList.add("is-visible");
1048-
obs.unobserve(entry.target);
1062+
revealElement(entry.target, obs);
10491063
});
10501064
},
10511065
{
1052-
rootMargin: "0px 0px -10% 0px",
1053-
threshold: 0.12
1066+
root: null,
1067+
rootMargin: "0px 0px -1% 0px",
1068+
threshold: 0
10541069
}
10551070
);
10561071

10571072
revealElements.forEach((element) => observer.observe(element));
1073+
const revealVisibleNow = () => {
1074+
revealElements.forEach((element) => {
1075+
if (!element.classList.contains("is-visible") && inView(element)) {
1076+
revealElement(element, observer);
1077+
}
1078+
});
1079+
};
1080+
requestAnimationFrame(revealVisibleNow);
10581081
settleHeroReveal(observer);
10591082
requestAnimationFrame(() => settleHeroReveal(observer));
1060-
window.setTimeout(() => settleHeroReveal(observer), 120);
1061-
window.addEventListener("pageshow", () => settleHeroReveal(observer));
1083+
window.setTimeout(() => {
1084+
settleHeroReveal(observer);
1085+
revealVisibleNow();
1086+
}, 120);
1087+
window.addEventListener("resize", revealVisibleNow);
1088+
window.addEventListener("pageshow", () => {
1089+
settleHeroReveal(observer);
1090+
revealVisibleNow();
1091+
});
10621092
}
10631093

10641094
function initHeroIntro() {

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<link rel="preconnect" href="https://fonts.googleapis.com">
99
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1010
<link href="https://fonts.googleapis.com/css2?family=Rock+Salt&family=Space+Grotesk:wght@400;500;600;700&family=Unbounded:wght@500;700;800&display=swap" rel="stylesheet">
11-
<link rel="stylesheet" href="assets/css/style.css?v=20260410s">
11+
<link rel="stylesheet" href="assets/css/style.css?v=20260410t">
1212

1313
<link rel="icon" type="image/svg+xml" href="favicon.svg">
1414
<link rel="icon" sizes="192x192" href="android-chrome-192x192.png">
@@ -185,6 +185,6 @@ <h2>A <span class="tagline-script">Closer Look</span> At The Path</h2>
185185

186186
<div id="footer-slot"></div>
187187

188-
<script src="assets/js/shell.js?v=20260410s" defer></script>
188+
<script src="assets/js/shell.js?v=20260410t" defer></script>
189189
</body>
190190
</html>

0 commit comments

Comments
 (0)