feat(web): support portrait preset story cards on mobile
Mobile users clicking preset story cards now get portrait (9:16) scene images instead of landscape. Previously card paths hardcoded orientation to "landscape"; now they respect detectOrientation() and load from firstact-portrait/ with graceful fallback to landscape. - Add --portrait and --only flags to prebake-firstacts.mjs - Add --portrait flag to localize-firstact-images.mjs - Fix prebake STYLE_MAP extraction (moved to lib/options.ts) - Generate 60 portrait firstact JSONs + firstscene webp assets - Remove hardcoded "landscape" in play page card path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,9 +28,10 @@ import sharp from "sharp";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const WEB_ROOT = resolve(__dirname, "..");
|
||||
const FIRSTACT_DIR = resolve(WEB_ROOT, "public", "home", "firstact");
|
||||
const FIRSTSCENE_DIR = resolve(WEB_ROOT, "public", "home", "firstscene");
|
||||
const PUBLIC_LOCAL_PREFIX = "/home/firstscene/";
|
||||
const PORTRAIT = process.argv.includes("--portrait");
|
||||
const FIRSTACT_DIR = resolve(WEB_ROOT, "public", "home", PORTRAIT ? "firstact-portrait" : "firstact");
|
||||
const FIRSTSCENE_DIR = resolve(WEB_ROOT, "public", "home", PORTRAIT ? "firstscene-portrait" : "firstscene");
|
||||
const PUBLIC_LOCAL_PREFIX = PORTRAIT ? "/home/firstscene-portrait/" : "/home/firstscene/";
|
||||
const MAX_EDGE = 1600;
|
||||
const QUALITY = 80;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user