Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion docs/dev/BRANDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

Expand Down
2 changes: 2 additions & 0 deletions src/app.d.ts
Original file line number Diff line number Diff line change
@@ -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 {}
Expand Down
58 changes: 58 additions & 0 deletions src/lib/components/PhysiosharkIcon.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<script lang="ts">
// Physioshark project mark (RummerLab/physioshark-project, public/Physioshark_icon.svg).
// Colours come from --mark-light / --mark-dark so it can sit on any background.
let { size = 40 }: { size?: number } = $props();
</script>

<svg
width={size}
height={size * (172.9 / 179.51)}
viewBox="0 0 179.51 172.9"
aria-hidden="true"
focusable="false"
>
<path
class="fin-light"
d="M90.31,171.72c-4.74.4-22.91.78-30.95-8.01,0,0,9.99,3.12,9.99-1.05,0-8.26-16.5-9.38-22.83-8.52,18.19-5.1,25.35-2.02,34.3,7.79,3.16,3.47,5.8,7.56,9.5,9.79h0ZM143.9,130.05c4.65-.3,16.2-6.61,18.92-10.36l-11.8-2.82c-.29,2.19-1.96,9.66-7.12,13.18h0ZM45.34,162.27c-.53,2.72,2.04,8.52,5.73,10.63-1.58-3.69,2.33-7.83,5.12-10.08l-10.85-.55h0ZM62.67,129.49s38.47-22.59,48.57-23.13c3.44-.19-4.41,11.08-9.29,18.02-8.42,11.96-14.02,8.87-29.88,7.09,16.32-2.22,20.16-1.79,26.93-11.52,2.71-3.9,3.22-4.86-2.15-3.29-10.7,3.12-26.65,11.84-34.18,12.84h0Z"
/>
<path
class="fin-dark"
d="M26.79,150.72c11.6,1.61,16.42-10.35,11.48-15.5,9.42,1.16,22.8,7.14,28.29,14.32-5.98-2.07-11.23-1.73-16.04-.71.89-4.18-1.44-7.77-1.73-8.05.2,3.54.47,6.21-.74,8.65-1.77.46-3.47.97-5.14,1.44,4.07-5.32.92-11.17.53-11.56.37,6.65-1.42,10.27-5.62,12.8-3.73.67-7.34.6-11.03-1.39h0Z"
/>
<path
class="fin-dark"
d="M7.14,131.51c19.84-1.44,43.32.91,60.17,12.87,18.75,13.3,25.93,10.35,31.47-13.46-4.61,7.48-15.8,4.22-28.31,2.1-7.81-1.32-33.63-8.03-63.32-1.51h0Z"
/>
<path
class="fin-dark"
d="M83.22,161.09s20.28,7.23,40.24-7.07c19.96-14.31,20.59-23.89,20.59-23.89,0,0-6.6,12.57-20.9,13.68-14.31,1.1-14.93-10.85-11.32-12.73,3.61-1.89,7.86,1.1,7.86,1.1,0,0-2.2-7.39-11.63-5.03-9.43,2.36-6.12,18.96-10.06,27.35-3.94,8.39-14.78,6.6-14.78,6.6h0Z"
/>
<path
class="fin-dark"
d="M114.06,136.29c8.57,10.55,26.63-2.68,32.24-12.29,19.29-32.99-35.96-50.07-26.04-81.93-21.99,32.64,22.74,49.57,21.5,68.74-.26,3.99-3.88,7.68-12.29,5.69,10.47-.19,7.37-16.67,2.15-22.59,1.19,8.04-3.67,20.31-9.12,25.33,5.02,3.78,13.65,3.64,19.44.96-5.09,9.43-15.15,3.93-22.14,1.47-2.21,1.54-4.76,2.66-7.78,3.21,16.04.81,16.59,15.52,2.04,11.4h0Z"
/>
<path
class="fin-dark"
d="M148.91,71.2C114.18,59.42,103.07,20.03,179.51,0c-21.39,12.87-38.02,30.43-39.82,46.46l-10.3.4c3.25,1.93,6.49,3.13,10.86,4.25-1.26,3.64,3.98,17.14,8.66,20.09h0Z"
/>
<path
class="fin-dark"
d="M20.01,136.92c7.05-.05,14.59,2.46,13.24,3.58-1.35,1.12-9.95-.75-12.54-.21,3.65.68,6.2,2.96,11.6,3.65,1.86.24,3.18-.67,3.63-2.05,2.13-6.54-10.91-7.65-15.28-8.07-4.1-.39-20.03-.89-20.64,4.03-.62,5,22.87,10.42,27.87,10.32-12.93-2.78-24.02-11.13-7.87-11.25h0ZM48.11,161.48c8.81.83,16.65.28,17.35,1.15-2.33-5.47-10.08-6.24-17.29-6.34-8.03-.1-19.05-.4-27.19-4.48,4.65-1.12,6.94-3.04,6.94-3.04-4.96,1.54-13.95.3-17.03-.55,8.54,7.37,25.91,12.19,37.23,13.25h0Z"
/>
</svg>

<style>
svg {
display: block;
}
.fin-light,
.fin-dark {
fill-rule: evenodd;
}
.fin-light {
fill: var(--mark-light, #6bb4d5);
}
.fin-dark {
fill: var(--mark-dark, #30496a);
}
</style>
46 changes: 34 additions & 12 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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)));
</script>

Expand All @@ -61,7 +63,14 @@
<header class="site-header">
<div class="container bar">
<a class="brand" href="/" aria-label="Physioshark Data home">
<span class="word">PHYSIO<span class="fin" aria-hidden="true">⟆</span>SHARK</span>
<img
class="logo"
src="/logo-physioshark.png"
alt=""
width="498"
height="174"
decoding="async"
/>
<span class="data">Data</span>
</a>
<button
Expand Down Expand Up @@ -153,7 +162,7 @@
<footer class="site-footer">
<div class="container cols">
<div>
<p class="fbrand">Physioshark Data</p>
<p class="fbrand"><PhysiosharkIcon size={36} /> Physioshark Data</p>
<p>
An open window onto the Physioshark project's shark-nursery surveys in Mo'orea, French
Polynesia, led by Dr Jodie Rummer (RummerLab, James Cook University) with CRIOBE.
Expand All @@ -164,12 +173,16 @@
)}.{/if}
{#if data.importedAt}Data imported {date(data.importedAt)}.{/if}
</p>
<p class="small">
<a href={`https://github.com/RummerLab/data-stats/releases/tag/v${version}`}>v{version}</a>
</p>
</div>
<div>
<p class="fh">Physioshark</p>
<ul>
<li><a href="https://physioshark.org/">physioshark.org</a></li>
<li><a href="https://physioshark.org/#publications">Publications</a></li>
<li><a href="https://physioshark.org/#publications">Physioshark publications</a></li>
<li><a href="https://rummerlab.com/publications">RummerLab publications</a></li>
<li><a href="https://github.com/RummerLab/data-stats">Source code on GitHub</a></li>
</ul>
</div>
Expand Down Expand Up @@ -220,20 +233,24 @@
}
.brand {
display: flex;
align-items: baseline;
align-items: center;
gap: 10px;
text-decoration: none;
color: var(--ink);
}
.word {
font-weight: 300;
letter-spacing: 0.12em;
font-size: 1.05rem;
.logo {
display: block;
height: 40px;
width: auto;
}
.fin {
color: var(--accent);
font-weight: 600;
margin: 0 1px;
/* The two-tone logo is navy on transparent: show it in light ink on dark surfaces. */
@media (prefers-color-scheme: dark) {
:global(:root:not([data-theme='light'])) .logo {
filter: brightness(0) invert(0.94);
}
}
:global(:root[data-theme='dark']) .logo {
filter: brightness(0) invert(0.94);
}
.data {
font-weight: 700;
Expand Down Expand Up @@ -378,6 +395,11 @@
}
}
.fbrand {
display: flex;
align-items: center;
gap: 10px;
--mark-light: #6bb4d5;
--mark-dark: var(--on-navy);
color: var(--on-navy);
font-weight: 650;
font-size: 1.05rem;
Expand Down
6 changes: 6 additions & 0 deletions src/routes/about/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@
</li>
{/each}
</ul>
<p>
Full and up-to-date lists: <a href="https://physioshark.org/#publications"
>Physioshark publications</a
>
and <a href="https://rummerlab.com/publications">RummerLab publications</a>.
</p>
</section>

<section class="section">
Expand Down
2 changes: 1 addition & 1 deletion static/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/logo-physioshark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import adapter from '@sveltejs/adapter-node';
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { readFileSync } from 'node:fs';
import { defineConfig } from 'vite';

// Release version shown in the footer. Release workflows bump package.json before tagging.
const { version } = JSON.parse(readFileSync('package.json', 'utf8')) as { version: string };

export default defineConfig({
define: {
__APP_VERSION__: JSON.stringify(version)
},
plugins: [
tailwindcss(),
sveltekit({
Expand Down
Loading