diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9b2a6a0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +# Preview-only 410 path artifacts (copy-410-paths.mjs). +# Deploy uses pnpm run build (no copy step); nginx serves 410 via error_page. +# These dirs exist only when running build-preview for local serve dist. +dist/pt +dist/feed +dist/2024 +dist/category +dist/comments diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..075dc6e --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +pnpm run test:ci diff --git a/AGENTS.md b/AGENTS.md index 3ea0d38..ea81e5d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,7 +10,7 @@ This file helps LLM agents work in this repo without introducing anti-patterns. ## Stack and architecture - **Framework**: SvelteKit with **adapter-static**. All routes are prerendered; there is no client-side router or hydration (`csr: false` in `src/routes/+layout.ts`). -- **Build**: `pnpm run build` = `vite build` → `node scripts/critters.mjs` → `node scripts/minify-static-js.mjs` → `node scripts/copy-410-paths.mjs`. Output is `dist/` (static files only). +- **Build**: `pnpm run build` = `vite build` → `node scripts/beasties.mjs` → `node scripts/generate-sitemap.mjs` → `node scripts/minify-static-js.mjs`. Output is `dist/` (static files only). Deploy uses this; no 410 path copies. For local preview with 410 URLs working, use `pnpm run build-preview` (adds `copy-410-paths.mjs`). The 410 path dirs are in `.dockerignore` so they are never included in the image. - **Runtime**: nginx serves `dist/` (mounted as `/usr/share/nginx/html` in the container). No Node at runtime. - **Theming**: CSS only. Light/dark follows **system preference** via `@media (prefers-color-scheme: dark)` in `src/app.css`. There is no JS theme toggle or `data-theme`; do not add one unless explicitly requested. - **Fonts**: **Local only.** Inter and Fraunces are served from `static/assets/fonts/` (e.g. `inter-v20-latin-*.woff2`, `fraunces-v38-latin-*.woff2`). Preloads are in `src/routes/+layout.svelte`. Do not add Google Fonts or other external font URLs for the main site or error pages. @@ -27,21 +27,21 @@ This file helps LLM agents work in this repo without introducing anti-patterns. | `src/lib/data/*.ts` | Content and meta (home-meta, content, experience, engagements, json-ld). Edit here for copy or SEO. | | `src/lib/seo.ts` | SEO defaults (baseUrl, theme colors, etc.) and `mergeMeta()`. | | `static/` | Copied as-is into `dist/` by SvelteKit. Favicon, robots.txt, fonts, images, **404.html**, **410.html**, and **assets/error-pages.css** live here. | -| `scripts/critters.mjs` | Post-build: inlines critical CSS into **every** `dist/*.html` (including 404 and 410). Resolves stylesheet URLs relative to `dist/`. | +| `scripts/beasties.mjs` | Post-build: inlines critical CSS into **every** `dist/*.html` (including 404 and 410). Resolves stylesheet URLs relative to `dist/`. | | `scripts/minify-static-js.mjs` | Post-build: minifies JS in `dist/assets/`. | -| `scripts/copy-410-paths.mjs` | Post-build: copies `410.html` to each 410 URL path as `index.html` so static preview (e.g. `serve dist`) shows the 410 page at those URLs; nginx still returns 410 via explicit location blocks. | +| `scripts/copy-410-paths.mjs` | Run by `build-preview` only: copies `410.html` to each 410 URL path as `index.html` so static preview (e.g. `serve dist`) shows the 410 page at those URLs. Production uses `build` (no copy); nginx returns 410 via explicit location blocks and `error_page 410 /410.html`. | | `nginx.conf` | Serves static files; `try_files $uri $uri/ /index.html` for SPA-style fallback; `error_page 404 /404.html` and `error_page 410 /410.html` for custom error pages. | ## Static error pages (404, 410) - **Files**: `static/404.html`, `static/410.html`. They are **standalone HTML** (not Svelte). Do not convert them to Svelte routes. - **Styling**: Both link to **one** shared stylesheet: ``. All error-page CSS lives in **`static/assets/error-pages.css`** (theme variables for light/dark, local `@font-face` for Inter/Fraunces, layout for `.error-page`). Do not duplicate theme tokens or add inline ` diff --git a/src/lib/components/EngagementsDl.svelte b/src/lib/components/EngagementsDl.svelte new file mode 100644 index 0000000..5810e8a --- /dev/null +++ b/src/lib/components/EngagementsDl.svelte @@ -0,0 +1,37 @@ + + +
+
+

{heading}

+ {#if intro} +

{intro}

+ {/if} +
+ {#each items as item} +
{item.term}
+
{item.definition}
+ {/each} +
+ {#if outro} +

{outro}

+ {/if} +
+
diff --git a/src/lib/components/FAQ.svelte b/src/lib/components/FAQ.svelte new file mode 100644 index 0000000..99e5432 --- /dev/null +++ b/src/lib/components/FAQ.svelte @@ -0,0 +1,51 @@ + + +
+
+

{title}

+
+ {#each faqList as { question, answer }, index (index)} +
{question}
+
{answer}
+ {/each} +
+
+
+ + diff --git a/src/lib/components/Footer.svelte b/src/lib/components/Footer.svelte index f6f2e97..1238201 100644 --- a/src/lib/components/Footer.svelte +++ b/src/lib/components/Footer.svelte @@ -7,9 +7,9 @@ @@ -56,6 +72,10 @@ max-width: 100%; } + .footer-links-wrap { + flex-wrap: wrap; + } + .link { display: flex; align-items: center; diff --git a/src/lib/components/Hero.svelte b/src/lib/components/Hero.svelte index 346115f..14b9b45 100644 --- a/src/lib/components/Hero.svelte +++ b/src/lib/components/Hero.svelte @@ -1,41 +1,58 @@ @@ -46,26 +63,20 @@ text-align: center; background-color: var(--color-bg); border-bottom: 1px solid var(--color-border); - - @media (max-width: 768px) { - padding: var(--space-xxl) 0 var(--space-xl) 0; - } - - @media (max-width: 480px) { - padding: var(--space-xl) 0 var(--space-lg) 0; - } } - .headline { + .title { margin-bottom: var(--space-lg); font-family: var(--font-family-heading); - font-size: var(--font-size-xl); - font-weight: var(--font-weight-semibold); - color: var(--color-text); - letter-spacing: -0.02em; + font-size: var(--font-size-xxl); + font-weight: var(--font-weight-bold); + letter-spacing: -0.03em; + max-width: var(--max-text-width); + margin-left: auto; + margin-right: auto; } - .subhead { + .subtitle { max-width: var(--max-narrow-width); margin: 0 auto var(--space-xl) auto; font-size: var(--font-size-large); @@ -81,8 +92,10 @@ justify-content: center; align-items: center; margin-top: var(--space-lg); + } - @media (max-width: 768px) { + @media (max-width: 768px) { + .cta-group { flex-direction: column; width: 100%; } diff --git a/src/lib/components/HowWeWork.svelte b/src/lib/components/HowWeWork.svelte deleted file mode 100644 index b0b6114..0000000 --- a/src/lib/components/HowWeWork.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - -
-
-

How We Work

- -
-
diff --git a/src/lib/components/Navigation.svelte b/src/lib/components/Navigation.svelte index bd0231b..9561c63 100644 --- a/src/lib/components/Navigation.svelte +++ b/src/lib/components/Navigation.svelte @@ -1,5 +1,23 @@