diff --git a/AGENTS.md b/AGENTS.md index a7f56d7..4dfc1df 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ > **Living document.** Future AI agents (and humans) should read this before changing the repo, and **update it** when they learn something new, correct a mistake, or retire outdated guidance. Prefer short, actionable notes over essays. Remove stale info rather than commenting it out. -Web app for **http://data.physioshark.org/**: thirteen seasons (2013-14 → 2025-26) of Mo'orea shark-nursery surveys from the [Physioshark project](https://physioshark.org/) (Dr Jodie Rummer, RummerLab / JCU, with CRIOBE), joined with weather, ocean, tide, climate and sun/moon data to surface interesting, quirky, fun and informative findings. Modelled on [crag-stats](https://github.com/Luen/crag-stats). +Web app for **http://data.physioshark.org/**: thirteen seasons (2013-14 → 2025-26) of Mo'orea shark-nursery surveys from the [Physioshark project](https://physioshark.org/) (Dr Jodie Rummer, RummerLab / JCU, with CRIOBE), joined with weather, ocean, tide, climate and sun/moon data to surface interesting, quirky, fun and informative findings. --- @@ -27,7 +27,7 @@ Web app for **http://data.physioshark.org/**: thirteen seasons (2013-14 → 2025 | Node | 26 (CI, Docker, `.nvmrc`, `engines`) | | Deploy | Docker multi-arch → `ghcr.io/rummerlab/data-stats`, distroless non-root runner | -Import alias: `#lib/...` → `src/lib/...`. Env vars are declared in `src/env.ts`; server code reads `process.env` (Docker/runtime). +Import alias: `#lib/...` → `src/lib/...`. The footer shows `__APP_VERSION__` (package.json version, injected by `define` in `vite.config.ts`); release workflows bump it before tagging, so it matches the GitHub release. Env vars are declared in `src/env.ts`; server code reads `process.env` (Docker/runtime). ## Repository map diff --git a/README.md b/README.md index f17cdf2..b43ae07 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **http://data.physioshark.org/** · thirteen seasons of [Physioshark](https://physioshark.org/) shark-nursery surveys in Mo'orea, French Polynesia, joined with weather, ocean, tide, climate and sun/moon data, and turned into charts, findings and profiles. -Led by Dr Jodie Rummer (RummerLab, James Cook University) in collaboration with CRIOBE. Built with SvelteKit, Drizzle and SQLite; modelled on [crag-stats](https://github.com/Luen/crag-stats). +Led by Dr Jodie Rummer (RummerLab, James Cook University) in collaboration with CRIOBE. Built with SvelteKit, Drizzle and SQLite. ## What's in it diff --git a/docs/dev/BRANDING.md b/docs/dev/BRANDING.md index 8c345b9..8efcf21 100644 --- a/docs/dev/BRANDING.md +++ b/docs/dev/BRANDING.md @@ -6,7 +6,8 @@ Matches [physioshark.org](https://physioshark.org/): clean, corporate, ocean-blu - **Inter** (variable, bundled via `@fontsource-variable/inter`; no font CDN). - Page titles 700, section titles 650, body 400 at 16 px / 1.6. Hero headline uppercase like the main site. -- Wordmark: light, letter-spaced `PHYSIO⟆SHARK` in ink with the fin glyph in accent blue, followed by a `DATA` chip (white on `#1d5fb8` in both themes for contrast). +- Logo: the Physioshark project logo (`static/logo-physioshark.png`, from [RummerLab/physioshark-project](https://github.com/RummerLab/physioshark-project)) followed by a `DATA` chip (white on `#1d5fb8` in both themes for contrast). On dark surfaces it is shown as a light monochrome (`filter`), since the navy half would vanish. +- Icon: `static/favicon.svg` is the project's shark mark (with a lighter navy under `prefers-color-scheme: dark`). `PhysiosharkIcon.svelte` inlines it with `--mark-light` / `--mark-dark` colours for the navy footer. Don't redraw or recolour the mark beyond that. ## Colour tokens (`src/app.css`) diff --git a/src/app.d.ts b/src/app.d.ts index 719a913..331ae6a 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,4 +1,6 @@ declare global { + /** package.json version, injected by Vite (`define` in vite.config.ts). */ + const __APP_VERSION__: string; namespace App { // interface Error {} // interface Locals {} diff --git a/src/lib/components/PhysiosharkIcon.svelte b/src/lib/components/PhysiosharkIcon.svelte new file mode 100644 index 0000000..ea7353a --- /dev/null +++ b/src/lib/components/PhysiosharkIcon.svelte @@ -0,0 +1,58 @@ + + + + + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index bbeee5f..8bdf842 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -4,6 +4,7 @@ import { page } from '$app/state'; import { NAV } from '#lib/nav'; import { date, season } from '#lib/format'; + import PhysiosharkIcon from '#lib/components/PhysiosharkIcon.svelte'; import type { LayoutProps } from './$types'; let { children, data }: LayoutProps = $props(); @@ -46,6 +47,7 @@ const active = (href: string) => href === '/' ? page.url.pathname === '/' : page.url.pathname.startsWith(href); + const version = __APP_VERSION__; const current = $derived(NAV.flatMap((g) => g.items).find((i) => active(i.href))); @@ -61,7 +63,14 @@