sweep the last typographic punctuation out of the components and data files
build-and-deploy / build (push) Failing after 14m21s

This commit is contained in:
2026-08-17 23:21:38 +10:00
parent 3cfd59a464
commit 43188589ab
35 changed files with 159 additions and 159 deletions
+12 -12
View File
@@ -1,9 +1,9 @@
/* Motion (motion.dev) the site's unified animation layer.
/* Motion (motion.dev) - the site's unified animation layer.
*
* Imported by an Astro-PROCESSED <script> in Layout.astro, so Vite bundles it
* into a self-hosted /_astro/[hash].js → stays within CSP `script-src 'self'`
* (no inline, no CDN). Motion sets styles via JS (WAAPI / element.style), which
* is allowed under `style-src` so no `unsafe-inline` is introduced.
* is allowed under `style-src` - so no `unsafe-inline` is introduced.
*
* Progressive enhancement: every animated element is VISIBLE with JS off. The
* pre-paint head script (site.js) adds `html.js`; only THEN does CSS hide the
@@ -13,7 +13,7 @@
import { animate, inView, scroll, stagger } from "motion";
const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
// easeOutExpo-ish confident, decelerating; good for entrances/reveals.
// easeOutExpo-ish - confident, decelerating; good for entrances/reveals.
const EASE = [0.16, 1, 0.3, 1] as const;
if (!reduce) {
@@ -28,7 +28,7 @@ if (!reduce) {
}
function run(): void {
/* 1. Hero staggered fade-up on load. */
/* 1. Hero - staggered fade-up on load. */
const heroEls = document.querySelectorAll<HTMLElement>(".hero__inner > *");
if (heroEls.length) {
animate(
@@ -38,7 +38,7 @@ function run(): void {
);
}
/* 2. Scroll reveals section heads, skill cards (+ staggered chips), CTAs.
/* 2. Scroll reveals - section heads, skill cards (+ staggered chips), CTAs.
* inView fires as each [data-reveal] enters; re-fires on re-entry. */
inView(
"[data-reveal]",
@@ -56,7 +56,7 @@ function run(): void {
{ amount: 0.2 },
);
/* 3. Backdrop parallax drive --bg-shift from scroll progress (replaces the
/* 3. Backdrop parallax - drive --bg-shift from scroll progress (replaces the
* hand-rolled rAF listener; Motion throttles via ScrollTimeline/rAF). */
const bg = document.querySelectorAll<HTMLElement>(".site-bg__img");
if (bg.length) {
@@ -66,7 +66,7 @@ function run(): void {
});
}
/* 4. Top scroll-progress bar cross-browser (replaces the Chromium-only CSS
/* 4. Top scroll-progress bar - cross-browser (replaces the Chromium-only CSS
* animation-timeline). Drive scaleX STRAIGHT from scroll progress via the
* callback form: scroll(animate(...)) snapped the bar back to 0 at the very
* bottom (the progress=1 boundary); the callback maps 0→1 cleanly both ways. */
@@ -83,10 +83,10 @@ function run(): void {
setBar();
}
/* 5. Nav animated active-section underline + tactile hover. */
/* 5. Nav - animated active-section underline + tactile hover. */
initNav();
/* 6. Buttons spring lift on hover, press on tap. */
/* 6. Buttons - spring lift on hover, press on tap. */
initButtons();
}
@@ -119,9 +119,9 @@ function initNav(): void {
for (const a of links) {
a.addEventListener("pointerenter", () => under(a, true));
// On leave, keep the underline only if this link IS the active scroll-spy
// section. Guard on activeIdx >= 0 so that when nothing is active e.g. the
// section. Guard on activeIdx >= 0 so that when nothing is active - e.g. the
// Projects/Blog pages, where none of these sections exist and activeIdx stays
// -1 a hovered tab doesn't stick lit via the -1 === indexOf(non-member) -1.
// -1 - a hovered tab doesn't stick lit via the -1 === indexOf(non-member) -1.
a.addEventListener("pointerleave", () =>
under(a, activeIdx >= 0 && sectioned.indexOf(a) === activeIdx),
);
@@ -141,7 +141,7 @@ function initNav(): void {
if (sec && sec.getBoundingClientRect().top <= ref) idx = i;
});
// At the very bottom the last (often short) section may never push its top
// above the line force it so the final item lights up.
// above the line - force it so the final item lights up.
if (window.scrollY + vh >= document.documentElement.scrollHeight - 4) {
idx = sectioned.length - 1;
}