|
3 | 3 | This repository is an Astro 5 static site with Tailwind CSS v4 (via Vite plugin), TypeScript, Biome for lint/format, and Leaflet for maps. |
4 | 4 |
|
5 | 5 | Project at a glance |
| 6 | + |
6 | 7 | - Framework: Astro 5 (static output) |
7 | 8 | - Styling: Tailwind v4 utilities in markup + a light `src/styles/global.css` |
8 | 9 | - Lint/format: Biome |
9 | 10 | - Maps: Leaflet (OpenStreetMap tiles) |
10 | 11 | - Images: Astro sharp service; assets in `src/assets` or `public` |
11 | 12 |
|
12 | 13 | Runbook |
| 14 | + |
13 | 15 | - Dev: `pnpm dev` |
14 | 16 | - Build: `pnpm build` then `pnpm preview` |
15 | 17 | - Type/lint: `pnpm check` (Astro/TS), `pnpm lint` or `pnpm lint:fix` |
16 | 18 |
|
17 | 19 | Code organization |
| 20 | + |
18 | 21 | - Pages: `src/pages/**` (route = file path) |
19 | 22 | - Layout: `src/layouts/Layout.astro` |
20 | 23 | - Components: `src/components/**` |
21 | 24 | - Styles: `src/styles/global.css` |
22 | 25 | - Static: `public/**` (served at site root) |
23 | 26 |
|
24 | 27 | Styling conventions |
| 28 | + |
25 | 29 | - Prefer Tailwind utilities directly in markup. |
26 | 30 | - Use Tailwind `@apply` and other at-rules in global CSS |
27 | 31 | - Keep UI accessible: large touch targets, visible focus states, sensible contrast. |
28 | 32 | - Remove unused or redundant CSS. |
29 | 33 |
|
30 | 34 | Accessibility and SEO |
| 35 | + |
31 | 36 | - Keep the skip link and header semantics in `Layout.astro` intact. |
32 | 37 | - Preserve `aria-expanded` on the mobile menu toggle. |
33 | 38 | - Use descriptive alt text; keep external links `target="_blank" rel="noopener noreferrer"`. |
34 | 39 | - Keep canonical URL and structured data logic in `Layout.astro`. |
35 | 40 |
|
36 | 41 | Leaflet map (Session widget) |
| 42 | + |
37 | 43 | - File: `src/components/SessionWidget.astro`. |
38 | 44 | - Z-index: keep the map and its panes at a low z-index so the header/nav stays above when scrolling. The CSS at the bottom of the file enforces this—do not remove. |
39 | 45 | - Types: we locally type the inline script and augment `window.openMarker`. Avoid reintroducing implicit `any` or global `window` warnings. |
40 | 46 | - Tiles: OSM tile URL is configured; keep attribution. |
41 | 47 |
|
42 | 48 | Content patterns and UX |
| 49 | + |
43 | 50 | - Keep copy concise and inclusive; favor plain language. |
44 | 51 | - External actions like “Join Session” should always open in a new tab. |
45 | 52 | - Header includes a desktop “Join Sessions” CTA near Donate. |
46 | 53 | - Maintain spacing rhythm established in components (use existing utility patterns). |
47 | 54 |
|
48 | 55 | Non-negotiables before merging |
| 56 | + |
49 | 57 | - No new linter errors: `pnpm lint` and `pnpm check` must be clean. |
50 | 58 | - Do not break the header-over-map stacking order. |
51 | 59 | - Validate responsive behavior at 320px, 768px, 1024px, 1280px breakpoints. |
52 | 60 |
|
53 | 61 | Common tasks |
| 62 | + |
54 | 63 | - Add/edit content: update page in `src/pages` or a component in `src/components`. |
55 | 64 | - New page: create under `src/pages`, import `Layout.astro`. |
56 | 65 | - Update social links/icons: `src/components/Footer.astro`. |
57 | 66 | - Nav changes or CTAs: `src/components/Header.astro`. |
58 | 67 |
|
59 | 68 | Notes |
| 69 | + |
60 | 70 | - Emails on Privacy/Safety currently use `contact@tuhuratech.org.nz`. Confirm before mass-updating other addresses. |
61 | 71 | - Tailwind config is implicit (v4). Reuse existing utility tokens (e.g., `text-tuhura-green`) seen in the code; don’t invent new design tokens without discussion. |
62 | 72 |
|
63 | 73 | PR checklist |
| 74 | + |
64 | 75 | - [ ] Build passes locally (`pnpm build`) |
65 | 76 | - [ ] Lint and type checks are clean (`pnpm lint`, `pnpm check`) |
66 | 77 | - [ ] Accessibility basics validated (labels, alt text, focus order) |
|
0 commit comments