From 257af5d22e4cd8ba965f53387ef4b0213e7dbf20 Mon Sep 17 00:00:00 2001
From: Jonathon Wright
Date: Mon, 29 Jun 2026 18:53:35 +1000
Subject: [PATCH] home: add Writing section; fix scroll-progress snap + nav
underline reverse
- Scroll-progress bar: drive scaleX from scroll progress via callback form;
the animation form snapped the bar to 0 at the bottom (progress=1 boundary)
- Nav active-underline: recompute active section from scroll position each
frame so it tracks upward scroll too (inView-enter died on the way back up)
- Add a Writing section to the homepage with recent posts + a blog CTA
---
src/pages/index.astro | 21 ++++++++++++++++++-
src/scripts/anim.ts | 47 ++++++++++++++++++++++++++++---------------
2 files changed, 51 insertions(+), 17 deletions(-)
diff --git a/src/pages/index.astro b/src/pages/index.astro
index d18e900..56ad64a 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -5,13 +5,16 @@ import Section from "../components/Section.astro";
import About from "../components/About.astro";
import SkillGroup from "../components/SkillGroup.astro";
import ProjectCard from "../components/ProjectCard.astro";
+import PostList from "../components/PostList.astro";
import Contact from "../components/Contact.astro";
import { skills } from "../data/skills";
+import { getPosts } from "../lib/blog";
import { getCollection } from "astro:content";
const featuredProjects = (await getCollection("projects", (p) => p.data.featured)).sort(
(a, b) => a.data.order - b.data.order,
);
+const recentPosts = (await getPosts()).slice(0, 3);
---
@@ -36,7 +39,18 @@ const featuredProjects = (await getCollection("projects", (p) => p.data.featured
-