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:
@@ -14,10 +14,14 @@ const BASE_DOMAIN = process.env.BASE_DOMAIN ?? "ulicraft.local";
|
||||
// is absent/empty (fresh checkout), fall back to the honest "50+" estimate.
|
||||
const MOD_COUNT_KEY = MODS.count > 0 ? `${MODS.count}` : "50+";
|
||||
|
||||
// NMSR render mode for avatar tiles (online roster + members grid). Read at
|
||||
// build time, same as BASE_DOMAIN. e.g. "headiso" | "head" | "fullbody".
|
||||
// NMSR render mode for avatar tiles. AVATAR_MODE is the ServerCard online row +
|
||||
// account preview (heads); ROSTER_AVATAR_MODE is the Members grid (full body by
|
||||
// default). Read at build time, same as BASE_DOMAIN. e.g. "headiso" | "head" |
|
||||
// "fullbody" | "fullbodyiso".
|
||||
// @ts-ignore — `process` is untyped here (no @types/node), same as BASE_DOMAIN.
|
||||
const AVATAR_MODE = process.env.AVATAR_MODE ?? "headiso";
|
||||
// @ts-ignore — `process` is untyped here (no @types/node).
|
||||
const ROSTER_AVATAR_MODE = process.env.ROSTER_AVATAR_MODE ?? "fullbodyiso";
|
||||
|
||||
// Launcher download manifest (per launcher-manifest.schema.json). The
|
||||
// custom-launcher release flow syncs launcher-manifest.json into this dir
|
||||
@@ -88,6 +92,15 @@ const LAUNCHER_MANIFEST = loadLauncherManifest();
|
||||
// render-config.sh. "invite" => the register form must collect an invite code.
|
||||
const REGISTRATION_MODE = process.env.REGISTRATION_MODE ?? "invite";
|
||||
|
||||
// REGISTRATION_SHOW_INVITE (true|false, default false=hidden) ONLY toggles the
|
||||
// visibility of the invite-code field on the register form. The backend invite
|
||||
// gate stays on Drasl's RequireInvite (driven by REGISTRATION_MODE). Decoupled on
|
||||
// purpose: invites are usually admin-minted and the field is hidden by default.
|
||||
// CAVEAT: if REGISTRATION_MODE=invite (backend requires a code) but this is
|
||||
// false, public self-registration can't supply one — set both together.
|
||||
// @ts-ignore — `process` is untyped here (no @types/node).
|
||||
const REGISTRATION_SHOW_INVITE = process.env.REGISTRATION_SHOW_INVITE ?? "false";
|
||||
|
||||
// Minecraft / pack facts, surfaced in a few places.
|
||||
const MC_VERSION = "1.21.1";
|
||||
|
||||
@@ -97,9 +110,12 @@ export const site = {
|
||||
mcVersion: MC_VERSION,
|
||||
|
||||
// Register form behaviour, driven by REGISTRATION_MODE in .env.
|
||||
// true => show the invite-code field (Drasl RequireInvite = true)
|
||||
// true => Drasl RequireInvite = true (backend gate)
|
||||
// false => open self-registration
|
||||
registrationRequiresInvite: REGISTRATION_MODE === "invite",
|
||||
// Whether the invite-code FIELD is shown on the register form (default false).
|
||||
// Independent of the backend gate above — see REGISTRATION_SHOW_INVITE note.
|
||||
registrationShowInvite: REGISTRATION_SHOW_INVITE === "true",
|
||||
|
||||
// Design knobs (replace the design's in-browser TweaksPanel). Baked at build.
|
||||
// mood: "grass" | "nether" | "end"
|
||||
@@ -127,9 +143,11 @@ export const site = {
|
||||
// Mojang/Crafatar — head URL is `${avatarUrl}/headiso/<uuid>?size=64`.
|
||||
avatarUrl: `https://avatar.${BASE_DOMAIN}`,
|
||||
|
||||
// NMSR render mode for avatar tiles (ServerCard online row + PlayerRoster
|
||||
// members grid). Avatar URL = `${avatarUrl}/${avatarMode}/<uuid>?size=N`.
|
||||
// NMSR render mode for avatar tiles. Avatar URL = `${avatarUrl}/<mode>/<uuid>?size=N`.
|
||||
// avatarMode → ServerCard online row + account preview (heads)
|
||||
// rosterAvatarMode → PlayerRoster members grid (full body)
|
||||
avatarMode: AVATAR_MODE,
|
||||
rosterAvatarMode: ROSTER_AVATAR_MODE,
|
||||
|
||||
// Uptime Kuma status page (external link in footer).
|
||||
statusUrl: `https://status.${BASE_DOMAIN}`,
|
||||
|
||||
Reference in New Issue
Block a user