This file provides guidance to WARP (warp.dev) when working with code in this repository.
| Command | Description |
|---|---|
npm install |
Install dependencies |
npm run dev |
Start dev server at localhost:4321 |
npm run build |
Build production site to ./dist/ |
npm run preview |
Preview production build locally |
npm run astro add <integration> |
Add Astro integrations |
npm run astro check |
Run Astro type checking |
- Framework: Astro 5.x with React 19 integration
- Language: TypeScript (strict mode via
astro/tsconfigs/strict) - Styling: Plain CSS (no Tailwind/preprocessors)
- Content: Astro Content Collections with Zod schemas
Three collections defined in src/content/config.ts with a shared schema:
photography/- Photo project entriesessays/- Text-based writingdatascience/- Data science projects
Each collection uses the same base schema:
{ title, excerpt, status: "draft" | "published", heroImage?: string }Content is filtered by status === "published" when queried.
.astrofiles: Static/server-rendered components (layouts, pages, structural components).tsxfiles: React components for client-side interactivity (useclient:loaddirective)
Example: HomeHero.astro wraps Carousel.tsx with client:load for hydration.
The homepage hero uses a scroll-driven "curtain lift" animation:
HomeHero.astro- Globs images from/public/library/originals/collection/Carousel.tsx- React component with auto-play, manual navigation, caption togglecurtain-scroll-fallback.js- JS fallback for browsers without CSSanimation-timeline: scroll().hero-statementelement slides up as user scrolls, revealing carousel beneath
Vanilla JS loaded via <script> tags (not bundled):
snow.js- Animated snowfall canvas effect with toggle button, respectsprefers-reduced-motiontextmode.js- Text-only mode togglecurtain-scroll-fallback.js- Scroll animation polyfill
- Hero images referenced via
heroImagefrontmatter field (path like/public/library/originals/...) normalizePublicPath()strips/public/prefix for browser URLshasPublicFile()checks file existence at build time before rendering<img>
Single src/styles/home.css file contains all homepage styles including:
- Site header with dynamic
--nav-bg-alphaCSS variable (controlled by scroll JS) - Carousel styles
- Project cards grid
- Responsive breakpoints
The --nav-bg-alpha variable is set by curtain-scroll-fallback.js based on scroll position, enabling smooth header background transitions.