feat(landing): rework — es default, 2-step join, roster + account polish

- Default language Spanish at root /, English moves to /en/ (eu unchanged):
  getStaticPaths {lang:undefined}->es + LANG_*_PATH maps swapped in ui.ts.
- Section order: hero -> join -> status -> members -> mods -> features.
- Join flow 3 -> 2 steps (drop the Connect/IP step; launcher handles the
  address). Remove the hero IP CopyChip. Header CTA renamed Play/Jugar/Jolastu
  and gains Register + Login links on all four pages.
- Account page: hide the whole login block once authenticated (not just the
  form), add an avatar Refresh button (cache-busted NMSR re-fetch), flatten the
  avatar (no bevel). New i18n key account.refresh.
- Register page: new REGISTRATION_SHOW_INVITE env (default false/hidden) toggles
  the invite-code field independently of the REGISTRATION_MODE backend gate.
- Members roster: drop the `admin` account, render full-body via a new
  ROSTER_AVATAR_MODE (default fullbodyiso); portrait tiles.
- Style: flatten emboss on feature icons (.picon) + player tiles (.roster-tile).
  PixelIcon gains optional image support (/icons/<name>.png|svg).
- Favicon now /favicon.png (committed) on all pages.
- Docs: plan/09-landing.md Assets section (logo/favicon/features-icons drop
  points) + default-language note; .env.example documents the two new vars.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 22:03:18 +02:00
parent c233b1bfbc
commit c8a6c77a8e
12 changed files with 267 additions and 207 deletions

View File

@@ -61,11 +61,15 @@ script only if the font set changes (keep families in sync with `main.css`
## Languages (i18n)
Three locales, static, build-time — **English** (default, `/`),
**Spanish** (`/es/`), **Euskera** (`/eu/`).
Three locales, static, build-time — **Spanish** (default, `/`),
**English** (`/en/`), **Euskera** (`/eu/`).
- One template `src/pages/[...lang].astro` with `getStaticPaths` emits all three
routes (`/`, `/es/`, `/eu/`). No runtime/JS routing.
routes (`/`, `/en/`, `/eu/`). No runtime/JS routing. The default locale lives at
the bare root: its `getStaticPaths` entry is `{ lang: undefined }``locale:
"es"`; en/eu get an explicit prefix. The `LANG_*_PATH` maps in `ui.ts` mirror
this (es → no prefix). Changing the default = swap which locale is `undefined`
in all four pages' `getStaticPaths` + the `LANG_*_PATH` maps.
- Translatable copy lives in `src/i18n/ui.ts` (`ui[locale]`), keyed identically
across locales. `site.ts` holds only language-neutral config (URLs, theme,
launcher files, stat/feature *structure*).
@@ -103,6 +107,30 @@ Page links to fixed names so they survive launcher version bumps:
sync** between `site.ts` and the script. Mounted so they resolve at
`/launcher/latest/…` (see Caddy `10-static.caddy`).
## Assets — where to drop images
All static images live under `landing/public/` and are referenced by an absolute
`/path` (Astro copies `public/` to the site root verbatim). After changing any,
rebuild the landing (`pnpm run build`).
- **Header / hero logo** — `landing/public/logo.png` (current 707×148). Referenced
as `/logo.png` in the hero (`[...lang].astro`, the `.hero-logo img`). Replace the
file; keep a wide transparent PNG. Update the `width`/`height` attrs if the
aspect changes.
- **Favicon** — `landing/public/favicon.png` (square, ~175×175). Referenced as
`/favicon.png` in the `<link rel="icon">` of all four pages
(`[...lang].astro`, `register`, `account`, `fjord`). Replace the file.
- **Server-status icon** — NOT a file you place here. The ServerCard pulls the
live server icon over the SLP query (`ServerCard.astro`, the favicon data-URI),
falling back to the `Creeper.astro` SVG. To change it, set `server-icon.png` on
the Minecraft server (64×64), not in the landing.
- **Features icons** — two options (`PixelIcon.astro`, fed by `site.ts` `features[]`):
1. *Procedural glyph* (default): pick `glyph ∈ shield|diamond|orb|heart` and
`gold` per feature in `site.ts`. Add a glyph by editing the 7×7 `GLYPHS` map.
2. *Custom image*: drop a file in `landing/public/icons/<name>.(png|svg)` and add
`img: "/icons/<name>.png"` to that feature's entry in `site.ts` `features[]`.
`PixelIcon` renders the image (`.picon-img`) instead of the glyph.
## Tasks
- [x] Vendor fonts (`tooling/fetch-fonts.sh`) → `public/fonts/`