Adopt the "Carved from stone" pixel design (landing/design/) as the apex onboarding page, ported from its React/Babel-via-CDN prototype to static Astro so it works on an offline LAN. Real modded-LAN content replaces the prototype's fictional public-SMP copy. - Vendor web fonts locally (tooling/fetch-fonts.sh -> public/fonts/) so the page renders without the Google Fonts CDN at party time. - Port the design system (main.css: mood/hero/bevels) and split markup into Astro components (Creeper, PixelIcon, CopyChip, ServerListPanel). - site.ts holds language-neutral config + theme knobs (mood/hero/headFont/ dust) that replace the design's in-browser TweaksPanel; LITERALS holds never-translated product/in-game terms. - i18n: English (/), Spanish (/es/), Euskera (/eu/) generated from one [...lang].astro via getStaticPaths; copy lives in src/i18n/ui.ts. Nav has an EN/ES/EU switcher; html lang + hreflang set per page. - Status panel shows a static server-list row + honest stat tiles (no fake live count). Copy + scroll-reveal are the only client JS. Build emits to ../www (gitignored). Euskera strings pending a native review. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 lines
1.6 KiB
Bash
Executable File
45 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Vendor the landing-page web fonts locally so the apex site works on an
|
|
# offline LAN (no Google Fonts CDN at party time).
|
|
#
|
|
# Pulls woff2 + a rewritten @font-face stylesheet from Google Fonts into
|
|
# landing/public/fonts/. Re-run only when the font set changes.
|
|
#
|
|
# Halts on any error (cautious-by-default).
|
|
set -euo pipefail
|
|
|
|
here="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
out="$here/landing/public/fonts"
|
|
mkdir -p "$out"
|
|
|
|
# Modern Chrome UA → Google returns woff2 (not ttf).
|
|
UA="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0 Safari/537.36"
|
|
|
|
# Families + weights used by the landing (keep in sync with main.css --font-*).
|
|
CSS_URL="https://fonts.googleapis.com/css2"
|
|
CSS_URL+="?family=Pixelify+Sans:wght@600;700"
|
|
CSS_URL+="&family=Space+Grotesk:wght@400;500;600;700"
|
|
CSS_URL+="&family=Press+Start+2P"
|
|
CSS_URL+="&family=Silkscreen:wght@400;700"
|
|
CSS_URL+="&family=VT323"
|
|
CSS_URL+="&display=swap"
|
|
|
|
echo "→ fetching @font-face CSS"
|
|
raw="$(curl -fsSL -A "$UA" "$CSS_URL")"
|
|
|
|
echo "→ downloading woff2 files"
|
|
# Pull every gstatic woff2 URL, download to out/, dedupe by basename.
|
|
echo "$raw" | grep -oE 'https://fonts\.gstatic\.com/[^)]+\.woff2' | sort -u | while read -r url; do
|
|
fn="$(basename "$url")"
|
|
if [ ! -f "$out/$fn" ]; then
|
|
curl -fsSL -o "$out/$fn" "$url"
|
|
echo " $fn"
|
|
fi
|
|
done
|
|
|
|
echo "→ writing fonts.css (URLs rewritten to /fonts/…)"
|
|
# Rewrite absolute gstatic URLs to local /fonts/<basename>.
|
|
echo "$raw" | sed -E 's#https://fonts\.gstatic\.com/[^)]+/([^)/]+\.woff2)#/fonts/\1#g' > "$out/fonts.css"
|
|
|
|
echo "✓ fonts vendored into $out"
|