Skip to content

💃 Free CC0 mannequin pose reference library for AI image tools (Nano Banana, ChatGPT, ComfyUI, Midjourney) — 250+ poses × 5 angles in line art, names in ja/zh/en/ko

feat(web): pose pages, share button, in-site changelog and SEO tags

wquguru7361016cd138
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c7567c96..4fdf0114 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,7 +8,7 @@ jobs:
- uses: actions/setup-python@v5
with: { python-version: "3.12" }
- run: python3 tools/verify.py
- - run: python3 tools/build_site.py --link-images
+ - run: python3 tools/build_site.py --link-images --no-og
- uses: actions/setup-node@v4
with: { node-version: "22" }
- - run: node --check web/app.js && node --check web/i18n.js
+ - run: node --check web/app.js && node --check web/i18n.js && node --check web/common.js
diff --git a/.gitignore b/.gitignore
index 349768d5..9bb26b0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,5 @@
# full-size originals live in Release assets, never in git (docs/DECISIONS.md D-02)
/images/*/full/
/site/
+# share-card render cache (tools/og_cards.py)
+/build/
diff --git a/tools/build_site.py b/tools/build_site.py
index 16a44d97..79aadc3d 100755
--- a/tools/build_site.py
+++ b/tools/build_site.py
@@ -1,12 +1,26 @@
#!/usr/bin/env python3
-"""Build the static gallery into site/ from web/ and data/catalog.json.
+"""Build the static site into site/ from web/, data/catalog.json and web/changelog.yaml.
-Usage: python3 tools/build_site.py [--repo URL] [--link-images] [--out site]
---link-images symlinks images/ instead of copying (fast local preview).
+Writes, per language (zh unprefixed, ja/ en/ ko/): the gallery home, one page per pose, the changelog and its Atom
+feed; plus share cards (og/), sitemap.xml, robots.txt, 404.html, manifest and icons. Fails on a bad changelog entry,
+a page without its share tags, or a relative link that points nowhere.
+
+Usage: python3 tools/build_site.py [--site URL] [--repo URL] [--link-images] [--no-og] [--out site]
+--site absolute URL the site is served from (canonical, og:image, sitemap); default $SHISEI_SITE_URL or
+ the GitHub Pages address, see docs/DECISIONS.md D-05
+--link-images symlink images/ instead of copying (fast local preview)
+--no-og skip rendering share cards (no Chrome needed); og:image falls back to the pose's front line art
"""
-import argparse, json, pathlib, re, shutil
+import argparse, datetime, json, os, pathlib, re, shutil, subprocess, sys
+from html.parser import HTMLParser
+
+sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) # -I drops the script dir from sys.path
+import og_cards, site_pages # noqa: E402
+from site_pages import CAT_KEYS, HTML_LANG, LOCS, NAME_KEY, PREFIX, TINT, VIEWS, Site, esc, fill # noqa: E402
ROOT = pathlib.Path(__file__).resolve().parent.parent
+DEFAULT_SITE = "https://wquguru.github.io/shisei"
+TODAY = datetime.date.today().isoformat()
def version() -> str:
@@ -14,12 +28,157 @@ def version() -> str:
return m.group(1) if m else "0.0.0"
+def strings():
+ """The strict-JSON block in web/i18n.js (window.I18N_PAGES), so page strings live in one place with the UI's."""
+ s = (ROOT / "web/i18n.js").read_text()
+ return json.loads(s.split("// BEGIN-JSON", 1)[1].split("// END-JSON", 1)[0])
+
+
+def git_day(path):
+ try:
+ out = subprocess.run(["git", "log", "-1", "--format=%cs", "--", path], cwd=ROOT, capture_output=True, text=True)
+ return out.stdout.strip() or TODAY
+ except OSError:
+ return TODAY
+
+
+# ---- web/changelog.yaml: `entries:` then `- key: value` items, scalar values only
+TAGS = ("new", "improve", "announce", "removed")
+TEXT = ("title", "desc", "cta")
+NEED = ["date", "tag", "link"] + [k if l == "en" else f"{k}_{l}" for l in ("en", "zh", "ja", "ko") for k in TEXT]
+# CJK says the same in roughly half the characters.
+MAX = {"en": (60, 200), "zh": (30, 100), "ja": (36, 110), "ko": (40, 130)}
+# Readers get "what you can see now", not how it was built.
+JARGON = re.compile(r"\b(refactor(ed)?|lint|CI|WIP|verify\.py|build_site|catalog\.json|KNOWN_GAPS)\b", re.I)
+
+
+def parse_changelog(text):
+ entries, errs, cur, seen = [], [], None, False
+ for i, raw in enumerate(text.split("\n"), 1):
+ line = raw.rstrip()
+ if not line.strip() or line.lstrip().startswith("#"):
+ continue
+ if line == "entries:":
+ seen = True
+ continue
+ m = re.match(r"^(\s*)(- )?([a-z_]+):(?: (.*))?$", line)
+ if not seen or not m or (not m[2] and cur is None):
+ errs.append(f"line {i}: cannot parse {line.strip()!r}")
+ continue
+ if m[2]:
+ cur = {"line": i}
+ entries.append(cur)
+ if m[3] in cur:
+ errs.append(f"line {i}: duplicate key {m[3]}")
+ cur[m[3]] = (m[4] or "").strip()
+ if not seen:
+ errs.append('missing top-level "entries:"')
+ return entries, errs
+
+
+def audit_changelog(entries, pose_ids):
+ bad = []
+ for e in entries:
+ at = f"line {e['line']} {e.get('title', '')!r}"
+ for k in NEED:
+ if not e.get(k):
+ bad.append(f"{at}: missing {k}")
+ for k in e:
+ if k != "line" and k not in NEED:
+ bad.append(f"{at}: unknown key {k}")
+ d = e.get("date", "")
+ try:
+ datetime.date.fromisoformat(d)
+ if d > TODAY:
+ bad.append(f"{at}: date {d} is in the future")
+ except ValueError:
+ bad.append(f"{at}: bad date {d!r} (want YYYY-MM-DD)")
+ if e.get("tag") and e["tag"] not in TAGS:
+ bad.append(f"{at}: unknown tag {e['tag']} (want {' | '.join(TAGS)})")
+ for l, (tmax, dmax) in MAX.items():
+ sfx = "" if l == "en" else f"_{l}"
+ for k, mx in (("title", tmax), ("desc", dmax)):
+ if len(e.get(k + sfx, "")) > mx:
+ bad.append(f"{at}: {k}{sfx} is {len(e[k + sfx])} chars (max {mx})")
+ for k in TEXT:
+ hit = JARGON.search(e.get(k + sfx, ""))
+ if hit:
+ bad.append(f"{at}: {k}{sfx} uses internal term {hit[0]!r}")
+ link = e.get("link", "")
+ path = re.split(r"[?#]", link, 1)[0]
+ ok = path in ("/", "/changelog/") or (re.fullmatch(r"/pose/(P\d{3})/", path) and path[6:10] in pose_ids)
+ if link and not ok:
+ bad.append(f"{at}: link {link} is not a site page (/, /changelog/ or /pose/<id>/ of a catalog pose)")
+ return bad
+
+
+def changelog_entries(pose_ids):
+ entries, errs = parse_changelog((ROOT / "web/changelog.yaml").read_text())
+ bad = errs + audit_changelog(entries, pose_ids) + ([] if entries else ["no entries"])
+ if bad:
+ sys.exit("web/changelog.yaml:\n " + "\n ".join(bad))
+ slug = lambda s: re.sub(r"[^a-z0-9]+", "-", s.lower()).strip("-")[:48]
+ for k, e in enumerate(entries):
+ e["id"], e["i"] = f"{e['date']}-{slug(e['title'])}", k
+ return sorted(entries, key=lambda e: (-int(e["date"].replace("-", "")), e["i"]))
+
+
+# ---- checks on the output
+class Refs(HTMLParser):
+ def __init__(self):
+ super().__init__()
+ self.refs, self.meta, self.links = [], {}, {}
+
+ def handle_starttag(self, tag, attrs):
+ a = dict(attrs)
+ for k in ("href", "src"):
+ if a.get(k):
+ self.refs.append(a[k])
+ for part in (a.get("srcset") or "").split(","):
+ if part.strip():
+ self.refs.append(part.split()[0])
+ if tag == "meta" and (a.get("property") or a.get("name")):
+ self.meta[a.get("property") or a.get("name")] = a.get("content")
+ if tag == "link" and a.get("rel"):
+ self.links[a["rel"]] = a.get("href")
+
+
+def check_site(out, site):
+ bad = []
+ for f in out.rglob("*.html"):
+ if f.name == "404.html":
+ continue
+ doc = f.read_text()
+ r = Refs()
+ r.feed(doc)
+ where = f.relative_to(out)
+ for need in ("og:title", "og:description", "og:image", "og:url", "twitter:card", "description"):
+ if not r.meta.get(need):
+ bad.append(f"{where}: no {need}")
+ if not (r.links.get("canonical") or "").startswith(site):
+ bad.append(f"{where}: canonical missing or not on {site}")
+ if (r.meta.get("og:image") or "") and not r.meta["og:image"].startswith(site):
+ bad.append(f"{where}: og:image is not absolute on {site}")
+ for ref in r.refs:
+ if re.match(r"^(?:[a-z]+:|#|//|__)", ref):
+ continue
+ target = (f.parent / re.split(r"[?#]", ref, 1)[0]).resolve()
+ if ref.split("#")[0].split("?")[0].endswith("/") or ref in (".", "./") or target.is_dir():
+ target = target / "index.html"
+ if not target.exists():
+ bad.append(f"{where}: broken link {ref}")
+ return bad
+
+
def main() -> None:
ap = argparse.ArgumentParser()
+ ap.add_argument("--site", default=os.environ.get("SHISEI_SITE_URL", DEFAULT_SITE))
ap.add_argument("--repo", default="https://github.com/wquguru/shisei")
ap.add_argument("--out", default="site")
ap.add_argument("--link-images", action="store_true")
+ ap.add_argument("--no-og", action="store_true")
args = ap.parse_args()
+ site_url = args.site.rstrip("/")
out = ROOT / args.out
if out.is_symlink() or out.is_file():
@@ -28,25 +187,118 @@ def main() -> None:
shutil.rmtree(out)
out.mkdir()
- catalog = (ROOT / "data/catalog.json").read_text()
- compact = json.dumps(json.loads(catalog), ensure_ascii=False, separators=(",", ":"))
+ catalog_text = (ROOT / "data/catalog.json").read_text()
+ catalog = json.loads(catalog_text)
+ # Pose pages, share cards and the sitemap cover the published std series only: other series are still being
+ # imported and reviewed, and a new series needs a human OK (AGENTS.md §8) before it gets indexable pages.
+ # Suggestive poses never get indexable pages or share cards; a pose with no usable view is hidden.
+ poses = [dict(p, ci=CAT_KEYS.index(p["class_en"]) if p["class_en"] in CAT_KEYS else 0,
+ line=[p["views"].get(v) for v in VIEWS])
+ for p in catalog if p.get("series", "std") == "std" and p.get("rating", "general") == "general"
+ and any(p["views"].values())]
+ S = strings()
+ for T in S.values(): # pose counts in titles follow the catalog
+ for k in ("metaTitle", "metaDesc", "ogLine"):
+ T[k] = fill(T[k], n=len(poses))
ver = version()
- html = (ROOT / "web/index.html").read_text()
- # "</" would end the inline <script>; the catalog never needs a literal one.
- html = html.replace("__CATALOG__", compact.replace("</", "<\\/"))
- html = html.replace("__REPO__", args.repo.rstrip("/")).replace("__VERSION__", ver)
- (out / "index.html").write_text(html)
+ entries = changelog_entries({p["id"] for p in poses})
+
+ # Share cards first: pages point at them only when they exist.
+ chrome = None if args.no_og else og_cards.find_chrome()
+ if not args.no_og and not chrome:
+ print("warning: no Chrome found (set CHROME=...); share cards skipped, og:image falls back to line art",
+ file=sys.stderr)
+ if chrome:
+ jobs = []
+ picks_src = [p for p in poses if p["orig_id"]][:3] + [p for p in poses if not p["orig_id"]][:3]
+ for loc in LOCS:
+ T = S[loc]
+ picks = [(TINT[p["ci"]], p["line"][1] or next(f for f in p["line"] if f)) for p in picks_src]
+ jobs.append((og_cards.home_card(loc, T, picks), out / f"og/{loc}/home.png", 1200, 630))
+ for p in poses:
+ card = dict(p, name=p["name_" + NAME_KEY[loc]])
+ jobs.append((og_cards.pose_card(loc, card, T, TINT[p["ci"]], p["class_" + NAME_KEY[loc]], p["line"]),
+ out / f"og/{loc}/{p['id']}.png", 1200, 630))
+ jobs.append((og_cards.icon_page(180), out / "apple-touch-icon.png", 180, 180))
+ jobs.append((og_cards.icon_page(512), out / "icon-512.png", 512, 512))
+ fresh = og_cards.render(jobs, chrome)
+ print(f"share cards: {len(jobs)} ({fresh} rendered, {len(jobs) - fresh} cached)")
+
+ site = Site(site_url, args.repo.rstrip("/"), ver, S, poses, og=bool(chrome))
+ write = lambda page, doc: ((out / page).mkdir(parents=True, exist_ok=True), (out / page / "index.html").write_text(doc))
+ # Gallery home per language
+ tpl = (ROOT / "web/index.html").read_text()
+ compact = json.dumps(catalog, ensure_ascii=False, separators=(",", ":")).replace("</", "<\\/")
+ for loc in LOCS:
+ T = S[loc]
+ rel = Site.rel(PREFIX[loc])
+ home = site.abs(PREFIX[loc])
+ ld = {"@context": "https://schema.org", "@graph": [
+ {"@type": "WebSite", "name": "Shisei", "alternateName": "Shisei 姿勢", "url": home, "inLanguage": HTML_LANG[loc],
+ "description": T["metaDesc"],
+ "potentialAction": {"@type": "SearchAction", "target": home + "?q={search_term_string}#all",
+ "query-input": "required name=search_term_string"}},
+ {"@type": "Dataset", "name": T["metaTitle"], "description": T["metaDesc"], "url": home,
+ "inLanguage": HTML_LANG[loc], "version": ver, "license": site_pages.LICENSE,
+ "distribution": [{"@type": "DataDownload", "encodingFormat": "application/json",
+ "contentUrl": site.abs("catalog.json")}]}]}
+ head = site.head(loc, "", T["metaTitle"], T["metaDesc"], site.og_image(loc, "home"), T["ogAlt"], ld,
+ feed=f"{rel}{PREFIX[loc]}changelog/changelog.xml")
+ noscript = "<noscript><nav class=\"wrap section\"><ul>" + "".join(
+ f'<li><a href="{rel}{PREFIX[loc]}pose/{p["id"]}/">{p["id"]} {esc(p["name_" + NAME_KEY[loc]])}</a></li>'
+ for p in poses) + "</ul></nav></noscript>"
+ doc = (tpl.replace("__HEAD__", head).replace("__HTMLLANG__", HTML_LANG[loc]).replace("__LOC__", loc)
+ .replace("__SKIP__", esc(T["skip"])).replace("__NOSCRIPT__", noscript)
+ .replace("__CHANGELOG__", f"{rel}{PREFIX[loc]}changelog/").replace("__BASE__", rel)
+ .replace("__CATALOG__", compact).replace("__REPO__", site.repo).replace("__VERSION__", ver))
+ write(PREFIX[loc], doc)
+
+ for i in range(len(poses)):
+ write(*site.pose_page(loc, i))
+ write(*site.changelog_page(loc, entries))
+ (out / PREFIX[loc] / "changelog/changelog.xml").write_text(site.atom(loc, entries))
+
+ (out / "404.html").write_text(site.not_found())
+
+ # Static files
for f in (ROOT / "web").iterdir():
- if f.name != "index.html" and f.is_file():
+ if f.is_file() and f.name not in ("index.html", "changelog.yaml"):
shutil.copy2(f, out / f.name)
shutil.copy2(ROOT / "data/catalog.json", out / "catalog.json")
-
if args.link_images:
(out / "images").symlink_to(ROOT / "images", target_is_directory=True)
else:
shutil.copytree(ROOT / "images", out / "images", ignore=shutil.ignore_patterns("full"))
- print(f"built {out.relative_to(ROOT)}/ v{ver} ({len(json.loads(catalog))} poses)")
+ icons = [{"src": "favicon.svg", "sizes": "any", "type": "image/svg+xml"}]
+ if chrome:
+ icons += [{"src": "apple-touch-icon.png", "sizes": "180x180", "type": "image/png"},
+ {"src": "icon-512.png", "sizes": "512x512", "type": "image/png"}]
+ (out / "manifest.webmanifest").write_text(json.dumps({
+ "name": "Shisei 姿勢", "short_name": "Shisei", "start_url": "./", "scope": "./", "display": "standalone",
+ "background_color": "#F5F2ED", "theme_color": "#F5F2ED", "icons": icons}, ensure_ascii=False, indent=1))
+ (out / ".nojekyll").write_text("") # GitHub Pages: serve files as they are
+
+ # sitemap.xml with hreflang alternates and the line art as image entries; robots.txt
+ cat_day, cl_day = git_day("data/catalog.json"), entries[0]["date"]
+ rows = []
+ for key, day, imgs in ([("", cat_day, []), ("changelog/", cl_day, [])] +
+ [(f"pose/{p['id']}/", cat_day, [f for f in p["line"] if f]) for p in poses]):
+ alts = "".join(f'<xhtml:link rel="alternate" hreflang="{HTML_LANG[l]}" href="{esc(site.abs(PREFIX[l] + key))}"/>'
+ for l in LOCS) + f'<xhtml:link rel="alternate" hreflang="x-default" href="{esc(site.abs(key))}"/>'
+ im = "".join(f"<image:image><image:loc>{esc(site.abs('images/line/w900/' + f))}</image:loc></image:image>" for f in imgs)
+ rows += [f" <url><loc>{esc(site.abs(PREFIX[l] + key))}</loc><lastmod>{day}</lastmod>{alts}{im}</url>" for l in LOCS]
+ (out / "sitemap.xml").write_text(
+ '<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" '
+ 'xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">\n'
+ + "\n".join(rows) + "\n</urlset>\n")
+ (out / "robots.txt").write_text(f"User-agent: *\nAllow: /\n\nSitemap: {site.abs('sitemap.xml')}\n")
+
+ bad = check_site(out, site_url)
+ if bad:
+ sys.exit("site check failed:\n " + "\n ".join(bad[:40]) + (f"\n … {len(bad) - 40} more" if len(bad) > 40 else ""))
+ print(f"built {out.relative_to(ROOT)}/ v{ver} for {site_url}: {len(poses)} poses × {len(LOCS)} languages, "
+ f"{len(entries)} changelog entries, {len(rows)} sitemap URLs")
if __name__ == "__main__":
diff --git a/tools/og_cards.py b/tools/og_cards.py
new file mode 100644
index 00000000..70074f91
--- /dev/null
+++ b/tools/og_cards.py
@@ -0,0 +1,122 @@
+"""Share cards (1200×630 PNG) and app icons for the static site, rendered with headless Chrome.
+
+Chrome is the only compositor this repo can count on (no PIL, no ImageMagick), and a card is just HTML: line art
+multiplied onto its category colour, the same look as the gallery. Renders are cached in build/og-cache/ under a
+hash of the card's HTML and the image files it uses, so a rebuild only renders what changed. Only line art goes on
+cards (photo renders wait on docs/DECISIONS.md D-03).
+"""
+import concurrent.futures, hashlib, html, os, pathlib, shutil, subprocess, tempfile
+
+ROOT = pathlib.Path(__file__).resolve().parent.parent
+CACHE = ROOT / "build/og-cache"
+W, H = 1200, 630
+
+FONTS = {
+ "zh": "'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Noto Sans SC'",
+ "ja": "'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP'",
+ "en": "'Helvetica Neue', 'Inter', 'Noto Sans'",
+ "ko": "'Apple SD Gothic Neo', 'Noto Sans CJK KR', 'Noto Sans KR'",
+}
+LOGO = ('<svg width="{s}" height="{s}" viewBox="0 0 100 100"><rect width="100" height="100" rx="24" fill="#18181B"/>'
+ '<circle cx="60" cy="23" r="8" fill="none" stroke="#F5F2ED" stroke-width="6"/>'
+ '<path d="M57 37C38 52 42 68 64 82" fill="none" stroke="#E07A52" stroke-width="11" stroke-linecap="round"/></svg>')
+
+
+def find_chrome():
+ cands = [os.environ.get("CHROME"), "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
+ shutil.which("google-chrome"), shutil.which("google-chrome-stable"), shutil.which("chromium"),
+ shutil.which("chromium-browser")]
+ return next((c for c in cands if c and pathlib.Path(c).exists()), None)
+
+
+def _img(f):
+ return (ROOT / "images/line/w900" / f).as_uri()
+
+
+def _page(loc, body, w=W, h=H):
+ return f"""<!doctype html><meta charset="utf-8"><style>
+html,body{{margin:0;width:{w}px;height:{h}px;overflow:hidden;background:#F5F2ED;color:#18181B;
+ font-family:{FONTS[loc]},'PingFang SC','Hiragino Sans','Apple SD Gothic Neo',sans-serif;-webkit-font-smoothing:antialiased}}
+.l{{position:absolute;left:64px;top:56px;bottom:56px;width:470px;display:flex;flex-direction:column}}
+.brand{{display:flex;align-items:center;gap:14px;font:800 30px/1 'Helvetica Neue',sans-serif;letter-spacing:-0.02em}}
+.meta{{margin-top:auto;font:500 24px/1.3 Menlo,monospace;color:#6B6862}}
+.name{{margin:14px 0 0;font-size:54px;line-height:1.16;font-weight:800;letter-spacing:-0.02em;
+ display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}
+.chips{{display:flex;gap:10px;flex-wrap:wrap;margin-top:28px}}
+.chip{{height:40px;padding:0 18px;border-radius:999px;display:inline-flex;align-items:center;font-size:20px;font-weight:600;
+ background:#ECE7DF;color:#3F3D39}}
+.chip.y{{background:#F2F08A;color:#18181B}}
+.r{{position:absolute;right:56px;top:56px;bottom:56px;width:584px;display:grid;gap:14px}}
+.t{{border-radius:28px;overflow:hidden;display:flex;align-items:center;justify-content:center}}
+.t img{{width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}}
+.big{{font:800 92px/1 'Helvetica Neue',sans-serif;letter-spacing:-0.05em;text-shadow:3px 4px 0 #EDB79C;margin-top:auto}}
+.line{{margin-top:22px;font-size:40px;font-weight:800;letter-spacing:-0.01em}}
+.sub{{margin-top:14px;font-size:24px;line-height:1.45;color:#55534E}}
+</style><body>{body}</body>"""
+
+
+def pose_card(loc, p, T, tint, cat, views):
+ """views: the pose's line files in VIEWS order (None for a gap). Big tile is the front, two small ones diag/side."""
+ have = [f for f in views if f]
+ big = views[0] or have[0]
+ small = [f for f in (views[1], views[2], views[3], views[4]) if f and f != big][:2]
+ tiles = (f'<div class="t" style="background:{tint};grid-row:1/3"><img src="{_img(big)}"></div>' +
+ "".join(f'<div class="t" style="background:{tint}"><img src="{_img(f)}"></div>' for f in small))
+ chips = f'<span class="chip y">{html.escape(T["anglesN"].format(n=len(have)))}</span>' + "".join(
+ f'<span class="chip">{html.escape(v)}</span>' for v, f in zip(T["views"], views) if f)
+ body = (f'<div class="l"><div class="brand">{LOGO.format(s=52)}Shisei</div>'
+ f'<div class="meta">{p["id"]} · {html.escape(cat)}</div>'
+ f'<h1 class="name">{html.escape(p["name"])}</h1><div class="chips">{chips}</div></div>'
+ f'<div class="r" style="grid-template-columns:388px 182px;grid-template-rows:1fr 1fr">{tiles}</div>')
+ return _page(loc, body)
+
+
+def home_card(loc, T, picks):
+ """picks: six (tint, file) pairs for the 3×2 tile grid."""
+ tiles = "".join(f'<div class="t" style="background:{t}"><img src="{_img(f)}"></div>' for t, f in picks)
+ body = (f'<div class="l"><div class="brand">{LOGO.format(s=64)}</div><div class="big">Shisei</div>'
+ f'<div class="line">{html.escape(T["ogLine"])}</div><div class="sub">{html.escape(T["ogSub"])}</div></div>'
+ f'<div class="r" style="grid-template-columns:repeat(3,1fr);grid-template-rows:1fr 1fr">{tiles}</div>')
+ return _page(loc, body)
+
+
+def icon_page(size):
+ # Full-bleed square: iOS and Android round the corners themselves.
+ return (f'<!doctype html><style>html,body{{margin:0;width:{size}px;height:{size}px;overflow:hidden;background:#18181B}}'
+ f'svg{{display:block}}</style>' + LOGO.format(s=size).replace('rx="24"', 'rx="0"'))
+
+
+def _key(doc):
+ h = hashlib.sha1(doc.encode())
+ for uri in sorted(set(part.split('"')[0] for part in doc.split('src="file://')[1:])):
+ f = pathlib.Path("/" + uri.lstrip("/"))
+ st = f.stat()
+ h.update(f"{f.name}:{st.st_size}:{st.st_mtime_ns}".encode())
+ return h.hexdigest()[:20]
+
+
+def _shoot(chrome, doc, out, w, h):
+ key = _key(doc)
+ cached = CACHE / f"{key}.png"
+ if not cached.exists():
+ src = CACHE / f"{key}.html"
+ src.write_text(doc)
+ with tempfile.TemporaryDirectory() as prof:
+ subprocess.run([chrome, "--headless=new", "--disable-gpu", "--hide-scrollbars", "--no-first-run",
+ "--no-default-browser-check", f"--user-data-dir={prof}", f"--window-size={w},{h}",
+ "--virtual-time-budget=3000", f"--screenshot={cached}", src.as_uri()],
+ check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=120)
+ src.unlink()
+ if not cached.exists():
+ raise RuntimeError(f"chrome wrote no screenshot for {out.name}")
+ out.parent.mkdir(parents=True, exist_ok=True)
+ shutil.copyfile(cached, out)
+
+
+def render(jobs, chrome, workers=6):
+ """jobs: (html, out_path, w, h). Returns how many were rendered fresh (not from cache)."""
+ CACHE.mkdir(parents=True, exist_ok=True)
+ fresh = sum(1 for doc, *_ in jobs if not (CACHE / f"{_key(doc)}.png").exists())
+ with concurrent.futures.ThreadPoolExecutor(workers) as ex:
+ list(ex.map(lambda j: _shoot(chrome, *j), jobs))
+ return fresh
diff --git a/tools/site_pages.py b/tools/site_pages.py
new file mode 100644
index 00000000..917fcdec
--- /dev/null
+++ b/tools/site_pages.py
@@ -0,0 +1,376 @@
+"""HTML for the static pages build_site.py writes: shared <head> (SEO and share tags), page shell, pose pages,
+changelog, 404, plus the Atom feeds and sitemap.
+
+Every page exists once per language. zh is the unprefixed default (and x-default, matching the gallery), the others
+live under ja/, en/, ko/. Pages are directories (pose/P001/index.html) so URLs end in / on every static host and in
+`python3 -m http.server`; links between pages are relative so a sub-path deploy (user.github.io/shisei/) works.
+"""
+import html, json
+
+LOCS = ("zh", "ja", "en", "ko")
+PREFIX = {"zh": "", "ja": "ja/", "en": "en/", "ko": "ko/"}
+HTML_LANG = {"zh": "zh-CN", "ja": "ja", "en": "en", "ko": "ko"}
+NAME_KEY = {"zh": "cn", "ja": "jp", "en": "en", "ko": "kr"}
+VIEWS = ("front", "diag", "side", "above", "below")
+CAT_KEYS = ("Sitting", "Standing", "Kneeling", "Lying", "Side sit / W-sit", "Squatting", "Leaning forward",
+ "Arching back", "Twist")
+TINT = ("#D3D1E6", "#AFC3E0", "#BCD3C6", "#E3CBB0", "#EBC0BC", "#C7DCD6", "#E6B7A1", "#CBD0AC", "#DDB9C8")
+MON = ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November",
+ "December")
+
+LICENSE = "https://www.apache.org/licenses/LICENSE-2.0" # D-01: Apache-2.0 for code, catalog and images
+esc = lambda s: html.escape(str(s), quote=True)
+CURRENT = ' aria-current="true"'
+LOGO = ('<svg class="logo" width="{s}" height="{s}" viewBox="0 0 100 100" aria-hidden="true"><rect width="100" height="100" rx="24" fill="#18181B"/>'
+ '<circle cx="60" cy="23" r="8" fill="none" stroke="#F5F2ED" stroke-width="6"/><path d="M57 37C38 52 42 68 64 82" fill="none" '
+ 'stroke="#E07A52" stroke-width="11" stroke-linecap="round"/></svg>')
+SHARE_ICON = ('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" '
+ 'stroke-linejoin="round" aria-hidden="true"><path d="M12 15V3m0 0L7.5 7.5M12 3l4.5 4.5M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7"/></svg>')
+FEED_ICON = ('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" '
+ 'aria-hidden="true"><path d="M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0 1 16 16"/><circle cx="5" cy="19" r="1"/></svg>')
+
+
+def fmt_day(loc, iso):
+ y, m, d = iso[:4], int(iso[5:7]), int(iso[8:10])
+ if loc == "en":
+ return f"{MON[m - 1][:3]} {d}, {y}"
+ return f"{y}년 {m}월 {d}일" if loc == "ko" else f"{y}年{m}月{d}日"
+
+
+def fmt_month(loc, ym):
+ y, m = ym[:4], int(ym[5:7])
+ if loc == "en":
+ return f"{MON[m - 1]} {y}"
+ return f"{y}년 {m}월" if loc == "ko" else f"{y}年{m}月"
+
+
+def fill(s, **kv):
+ for k, v in kv.items():
+ s = s.replace("{" + k + "}", str(v))
+ return s
+
+
+def list_join(loc, items):
+ return ", ".join(items) if loc == "en" else ("、".join(items) if loc in ("zh", "ja") else "·".join(items))
+
+
+class Site:
+ """Build context: absolute site URL, strings, catalog, version, and where each page's files live."""
+
+ def __init__(self, site, repo, version, strings, poses, og):
+ self.site = site.rstrip("/")
+ self.repo, self.version, self.S, self.poses, self.og = repo, version, strings, poses, og
+ self.by_id = {p["id"]: p for p in poses}
+
+ def abs(self, path):
+ return f"{self.site}/{path}"
+
+ @staticmethod
+ def rel(page):
+ """'../' per directory level of a page key like 'ja/pose/P001/'."""
+ return "../" * page.count("/")
+
+ def og_image(self, loc, key):
+ """(url, w, h) for a card id like 'home' or 'P001'; falls back to the front line art when cards were skipped."""
+ if self.og:
+ return self.abs(f"og/{loc}/{key}.png"), 1200, 630
+ p = self.by_id.get(key) or self.poses[0]
+ f = next(f for f in p["line"] if f)
+ return self.abs(f"images/line/w900/{f}"), 900, 1200
+
+ # ---- <head>
+ def head(self, loc, key, title, desc, image, alt, ld, page_type="website", feed=None, robots=None):
+ """key: page path without the language prefix ('' for home, 'pose/P001/'); one URL per language."""
+ T = self.S[loc]
+ url = self.abs(PREFIX[loc] + key)
+ rel = self.rel(PREFIX[loc] + key)
+ img, w, h = image
+ touch = f'<link rel="apple-touch-icon" href="{rel}apple-touch-icon.png">\n' if self.og else ""
+ alts = "".join(f'\n<link rel="alternate" hreflang="{HTML_LANG[l]}" href="{esc(self.abs(PREFIX[l] + key))}">' for l in LOCS)
+ alts += f'\n<link rel="alternate" hreflang="x-default" href="{esc(self.abs(key))}">'
+ og_alt = "".join(f'\n<meta property="og:locale:alternate" content="{self.S[l]["ogLocale"]}">' for l in LOCS if l != loc)
+ feed_link = f'\n<link rel="alternate" type="application/atom+xml" title="{esc(T["clFeed"])}" href="{feed}">' if feed else ""
+ # "</" would end the inline script; JSON allows "<\\/" for it.
+ ld_json = json.dumps(ld, ensure_ascii=False).replace("</", "<\\/") if ld else ""
+ ld_tag = f'\n<script type="application/ld+json">{ld_json}</script>' if ld else ""
+ return f"""{boot_script(loc, rel, key)}
+<title>{esc(title)}</title>
+<meta name="description" content="{esc(desc)}">{f'''
+<meta name="robots" content="{robots}">''' if robots else ""}
+<link rel="canonical" href="{esc(url)}">{alts}{feed_link}
+<meta property="og:type" content="{page_type}">
+<meta property="og:site_name" content="Shisei">
+<meta property="og:url" content="{esc(url)}">
+<meta property="og:locale" content="{T["ogLocale"]}">{og_alt}
+<meta property="og:title" content="{esc(title)}">
+<meta property="og:description" content="{esc(desc)}">
+<meta property="og:image" content="{esc(img)}">
+<meta property="og:image:width" content="{w}">
+<meta property="og:image:height" content="{h}">
+<meta property="og:image:alt" content="{esc(alt)}">
+<meta name="twitter:card" content="summary_large_image">
+<meta name="twitter:title" content="{esc(title)}">
+<meta name="twitter:description" content="{esc(desc)}">
+<meta name="twitter:image" content="{esc(img)}">
+<meta name="twitter:image:alt" content="{esc(alt)}">
+<link rel="icon" href="{rel}favicon.svg" type="image/svg+xml">
+{touch}<link rel="manifest" href="{rel}manifest.webmanifest">{ld_tag}"""
+
+ # ---- page shell for the static pages (the gallery has its own template)
+ def shell(self, loc, key, head, main, cls=""):
+ T = self.S[loc]
+ rel = self.rel(PREFIX[loc] + key)
+ home = rel + PREFIX[loc] or "./"
+ langs = "".join(
+ f'<a href="{rel}{PREFIX[l]}{key}" hreflang="{HTML_LANG[l]}" lang="{HTML_LANG[l]}" data-lang-link="{l}"'
+ f'{CURRENT if l == loc else ""}>{esc(self.S[l]["langName"])}</a>' for l in LOCS)
+ return f"""<!doctype html>
+<html lang="{HTML_LANG[loc]}" data-loc="{loc}">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
+{head}
+<meta name="theme-color" content="#F5F2ED">
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&family=JetBrains+Mono:wght@500&display=swap">
+<link rel="stylesheet" href="{rel}app.css?v={self.version}">
+</head>
+<body class="static {cls}">
+<!-- Generated by tools/build_site.py from web/ and data/; edit the generator, not this file. -->
+<a class="skip" href="#main">{esc(T["skip"])}</a>
+<nav class="nav wrap" aria-label="Shisei">
+ <a class="brand" href="{home}">{LOGO.format(s=40)}<span>Shisei</span></a>
+ <div class="nav-links">
+ <a href="{home}#all">{esc(T["navPoses"])}</a>
+ <a href="{rel}{PREFIX[loc]}changelog/">{esc(T["navChangelog"])}</a>
+ </div>
+ <div class="nav-tools">
+ <a class="pill dark small" href="{self.repo}">GitHub</a>
+ </div>
+</nav>
+{main}
+<footer class="foot">
+ <div class="wrap foot-in">
+ <div class="foot-brand">{LOGO.format(s=28)}<strong>Shisei 姿勢</strong><span>{esc(T["footer"])}</span></div>
+ <nav class="foot-links" aria-label="Footer">
+ <a href="{self.repo}">GitHub</a>
+ <a href="{rel}{PREFIX[loc]}changelog/">{esc(T["navChangelog"])} v{self.version}</a>
+ <a href="{rel}catalog.json">catalog.json</a>
+ </nav>
+ <nav class="foot-langs" aria-label="Language">{langs}</nav>
+ </div>
+</footer>
+<div class="toast" id="toast" role="status" aria-live="polite"></div>
+<script src="{rel}i18n.js?v={self.version}"></script>
+<script src="{rel}common.js?v={self.version}"></script>
+</body>
+</html>
+"""
+
+ # ---- pose page
+ def pose_page(self, loc, i):
+ T = self.S[loc]
+ p = self.poses[i]
+ key = f"pose/{p['id']}/"
+ page = PREFIX[loc] + key
+ rel = self.rel(page)
+ home = rel + PREFIX[loc]
+ name = p["name_" + NAME_KEY[loc]]
+ cat = p["class_" + NAME_KEY[loc]]
+ have = [T["views"][k] for k, f in enumerate(p["line"]) if f]
+ n = len(have)
+ title = fill(T["poseTitle"], name=name, cat=cat, id=p["id"])
+ desc = fill(T["poseDesc"], name=name, cat=cat, n=n, views=list_join(loc, have))
+ alt = fill(T["poseOgAlt"], id=p["id"], name=name, views=list_join(loc, have))
+ img = lambda tier, f: f"{rel}images/line/{tier}/{f}"
+ absimg = lambda f: self.abs(f"images/line/w900/{f}")
+ first = next(f for f in p["line"] if f)
+ ld = {"@context": "https://schema.org", "@graph": [
+ {"@type": "ImageGallery", "@id": self.abs(page), "url": self.abs(page), "name": title, "description": desc,
+ "inLanguage": HTML_LANG[loc], "isPartOf": {"@type": "WebSite", "name": "Shisei", "url": self.abs(PREFIX[loc])},
+ "primaryImageOfPage": absimg(first),
+ "associatedMedia": [{"@type": "ImageObject", "contentUrl": absimg(f), "width": 900, "height": 1200,
+ "name": f"{p['id']} {name} · {T['views'][k]}", "caption": p["desc_en"],
+ "license": LICENSE, "acquireLicensePage": self.repo + "/blob/main/LICENSE",
+ "creditText": "Shisei", "creator": {"@type": "Organization", "name": "Shisei"}}
+ for k, f in enumerate(p["line"]) if f]},
+ {"@type": "BreadcrumbList", "itemListElement": [
+ {"@type": "ListItem", "position": 1, "name": "Shisei", "item": self.abs(PREFIX[loc])},
+ {"@type": "ListItem", "position": 2, "name": cat, "item": self.abs(PREFIX[loc]) + f"?cat={p['ci']}"},
+ {"@type": "ListItem", "position": 3, "name": f"{p['id']} {name}", "item": self.abs(page)}]}]}
+ head = self.head(loc, key, title, desc, self.og_image(loc, p["id"]), alt, ld, page_type="article")
+ others = "".join(f'<dt>{l.upper()}</dt><dd lang="{HTML_LANG[l]}">{esc(p["name_" + NAME_KEY[l]])}</dd>'
+ for l in LOCS if l != loc)
+ figs = []
+ for k, f in enumerate(p["line"]):
+ v = T["views"][k]
+ if f:
+ eager = ' fetchpriority="high"' if f == first else ' loading="lazy"'
+ figs.append(
+ f'<figure class="pp-view"><a class="pp-tile" href="{home}#{p["id"]}-{VIEWS[k]}">'
+ f'<img src="{img("w900", f)}" srcset="{img("w300", f)} 300w, {img("w900", f)} 900w" sizes="(max-width: 720px) 50vw, 280px" '
+ f'width="900" height="1200" alt="{esc(p["id"] + " " + name + " · " + v)}"{eager} decoding="async"></a>'
+ f'<figcaption><span>{esc(v)}</span><a href="{img("w900", f)}" download="shisei_{p["id"]}_{VIEWS[k]}.webp">'
+ f'{esc(T["downloadView"])}</a></figcaption></figure>')
+ else:
+ figs.append(f'<figure class="pp-view"><div class="pp-tile missing"><b>{esc(v)} · {esc(T["notYet"])}</b></div>'
+ f'<figcaption><span>{esc(v)}</span></figcaption></figure>')
+ prev, nxt = self.poses[i - 1], self.poses[(i + 1) % len(self.poses)]
+ pn = lambda q, label, cls: (f'<a class="pp-pn-{cls}" href="../{q["id"]}/" rel="{"prev" if cls == "l" else "next"}">'
+ f'<span>{esc(label)}</span><b>{q["id"]} · {esc(q["name_" + NAME_KEY[loc]])}</b></a>')
+ same = [q for q in self.poses if q["ci"] == p["ci"] and q["id"] != p["id"]][:8]
+ rel_cards = "".join(
+ f'<a class="pp-rel" href="../{q["id"]}/"><span class="pp-rel-t" style="background:{TINT[q["ci"]]}">'
+ f'<img src="{img("w300", next(f for f in q["line"] if f))}" alt="" width="300" height="400" loading="lazy" decoding="async"></span>'
+ f'<span class="pp-rel-n"><b>{esc(q["name_" + NAME_KEY[loc]])}</b><span class="mono">{q["id"]}</span></span></a>' for q in same)
+ share = (f'<button type="button" class="pill light small" data-share data-share-url="./" '
+ f'data-share-text="{esc(fill(T["shareText"], name=name))}" data-share-image="{esc(absimg(first))}">'
+ f'{SHARE_ICON}<span>{esc(T["share"])}</span></button>')
+ main = f"""<main id="main" class="wrap page pose-page" style="--tint:{TINT[p["ci"]]}">
+ <nav class="crumbs" aria-label="{esc(T["crumb"])}"><a href="{home}">Shisei</a><span aria-hidden="true">/</span><a href="{home}?cat={p["ci"]}#all">{esc(cat)}</a><span aria-hidden="true">/</span><span aria-current="page">{p["id"]}</span></nav>
+ <header class="pp-head">
+ <p class="pp-meta mono">{p["id"]} · {esc(cat)} · {esc(fill(T["anglesN"], n=n))}</p>
+ <h1>{esc(name)}</h1>
+ <dl class="lb-names" aria-label="{esc(T["otherNames"])}">{others}</dl>
+ <div class="pp-actions">
+ <a class="pill dark small" href="{home}#{p["id"]}-front">{esc(T["openInGallery"])}</a>
+ {share}
+ </div>
+ </header>
+ <section class="lb-desc pp-desc" aria-label="{esc(T["descLabel"])}">
+ <div class="lb-desc-h"><span>{esc(T["descLabel"])}</span><button type="button" class="pill light tiny" data-copy="{esc(p["desc_en"])}">{esc(T["copy"])}</button></div>
+ <p lang="en">{esc(p["desc_en"])}</p>
+ </section>
+ <section class="pp-sec" aria-labelledby="angles-h">
+ <h2 id="angles-h">{esc(T["anglesTitle"])}</h2>
+ <div class="pp-views">{"".join(figs)}</div>
+ </section>
+ <nav class="pp-pn" aria-label="{esc(T["prevPose"])} / {esc(T["nextPose"])}">{pn(prev, T["prevPose"], "l")}{pn(nxt, T["nextPose"], "r")}</nav>
+ <section class="pp-sec" aria-labelledby="rel-h">
+ <h2 id="rel-h">{esc(T["related"])}</h2>
+ <div class="pp-rels">{rel_cards}</div>
+ </section>
+</main>"""
+ return page, self.shell(loc, key, head, main)
+
+ # ---- changelog
+ def changelog_page(self, loc, entries):
+ T = self.S[loc]
+ key = "changelog/"
+ page = PREFIX[loc] + key
+ rel = self.rel(page)
+ f = lambda e, k: e[k] if loc == "en" else e[f"{k}_{loc}"]
+ link = lambda e: rel + PREFIX[loc] + e["link"].lstrip("/") if e["link"] != "/" else (rel + PREFIX[loc] or "./")
+ months = []
+ for e in entries:
+ if not months or months[-1][0] != e["date"][:7]:
+ months.append((e["date"][:7], []))
+ months[-1][1].append(e)
+ newest = entries[0]["date"]
+ art = lambda e: f"""<article id="{e["id"]}" data-tag="{e["tag"]}" class="cl-item">
+ <time datetime="{e["date"]}" class="mono">{esc(fmt_day(loc, e["date"]))}</time>
+ <div class="cl-body">
+ <span class="cl-tag t-{e["tag"]}">{esc(T["tags"][e["tag"]])}</span>
+ <h3><a href="{esc(link(e))}">{esc(f(e, "title"))}</a></h3>
+ <p>{esc(f(e, "desc"))}</p>
+ <a class="cl-cta" href="{esc(link(e))}">{esc(f(e, "cta"))} →</a>
+ </div>
+ </article>"""
+ tags = [t for t in ("new", "improve", "announce", "removed") if any(e["tag"] == t for e in entries)]
+ filters = "".join(f'<button type="button" class="chip" data-filter="{t}" aria-pressed="{str(t == "all").lower()}">'
+ f'{esc(T["filterAll"] if t == "all" else T["tags"][t])}</button>' for t in ["all"] + tags)
+ feed = "changelog.xml"
+ title, desc = T["clMetaTitle"], T["clMetaDesc"]
+ ld = {"@context": "https://schema.org", "@type": "CollectionPage", "name": title, "url": self.abs(page),
+ "inLanguage": HTML_LANG[loc], "description": desc, "dateModified": newest,
+ "isPartOf": {"@type": "WebSite", "name": "Shisei", "url": self.abs(PREFIX[loc])}}
+ head = self.head(loc, key, title, desc, self.og_image(loc, "home"), T["ogAlt"], ld, feed=feed)
+ share = (f'<button type="button" class="pill light small" data-share data-share-url="./" data-share-heading="{esc(T["share"])}">'
+ f'{SHARE_ICON}<span>{esc(T["share"])}</span></button>')
+ main = f"""<main id="main" class="wrap page cl-page">
+ <p class="eyebrow">{esc(T["navChangelog"]).upper()}</p>
+ <h1>{esc(T["clH1"])}</h1>
+ <p class="cl-lead">{esc(T["clLead"])}</p>
+ <div class="cl-tools">
+ <a class="pill dark small" href="{feed}" type="application/atom+xml">{FEED_ICON}<span>{esc(T["subscribe"])}</span></a>
+ {share}
+ <span class="muted">{fill(esc(T["updated"]), date=f'<time datetime="{newest}">{esc(fmt_day(loc, newest))}</time>')}</span>
+ </div>
+ <div class="cl-filter" role="group" aria-label="{esc(T["filterLabel"])}" data-filter-group hidden>{filters}</div>
+ <div class="cl-list">
+ {"".join(f'<section id="m{m}" aria-labelledby="m{m}-h"><h2 id="m{m}-h" class="mono">{esc(fmt_month(loc, m))}</h2>{"".join(art(e) for e in items)}</section>' for m, items in months)}
+ <p class="muted" data-filter-empty hidden>{esc(T["clEmpty"])}</p>
+ </div>
+</main>"""
+ return page, self.shell(loc, key, head, main)
+
+ def atom(self, loc, entries):
+ T = self.S[loc]
+ page = self.abs(PREFIX[loc] + "changelog/")
+ f = lambda e, k: e[k] if loc == "en" else e[f"{k}_{loc}"]
+ x = lambda s: esc(s).replace("&#x27;", "&apos;")
+ items = "".join(f"""
+ <entry>
+ <id>{x(page)}#{e["id"]}</id>
+ <title>{x(f(e, "title"))}</title>
+ <updated>{e["date"]}T00:00:00Z</updated>
+ <link rel="alternate" type="text/html" href="{x(self.abs(PREFIX[loc] + e["link"].lstrip("/")))}"/>
+ <category term="{e["tag"]}" label="{x(T["tags"][e["tag"]])}"/>
+ <summary>{x(f(e, "desc"))}</summary>
+ </entry>""" for e in entries)
+ return f"""<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{HTML_LANG[loc]}">
+ <title>{x(T["clFeed"])}</title>
+ <subtitle>{x(T["clMetaDesc"])}</subtitle>
+ <id>{x(page)}</id>
+ <link rel="alternate" type="text/html" href="{x(page)}"/>
+ <link rel="self" type="application/atom+xml" href="{x(self.abs(PREFIX[loc] + "changelog/changelog.xml"))}"/>
+ <updated>{entries[0]["date"]}T00:00:00Z</updated>
+ <author><name>Shisei</name></author>
+ <icon>{x(self.abs("favicon.svg"))}</icon>{items}
+</feed>
+"""
+
+ def not_found(self):
+ """One 404 for every language: hosts serve it at any depth, so links and assets are root-absolute."""
+ root = "/" + self.site.split("://", 1)[1].split("/", 1)[1] + "/" if self.site.count("/") > 2 else "/"
+ blocks = "".join(f"""<section lang="{HTML_LANG[l]}" class="nf-block"><h1>{esc(self.S[l]["nfTitle"])}</h1>
+ <p>{esc(self.S[l]["nfBody"])}</p><a class="pill dark small" href="{root}{PREFIX[l]}">{esc(self.S[l]["backHome"])}</a></section>""" for l in LOCS)
+ return f"""<!doctype html>
+<html lang="zh-CN">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<title>404 · Shisei</title>
+<meta name="robots" content="noindex">
+<link rel="icon" href="{root}favicon.svg" type="image/svg+xml">
+<link rel="stylesheet" href="{root}app.css?v={self.version}">
+{THEME}
+</head>
+<body class="static">
+<main class="wrap page nf-page">
+ <a class="brand" href="{root}">{LOGO.format(s=56)}<span>Shisei</span></a>
+ {blocks}
+</main>
+</body>
+</html>
+"""
+
+
+# Saved theme before first paint, same key as the gallery.
+THEME = "<script>try{var t=localStorage.getItem('shisei.theme');if(t)document.documentElement.dataset.theme=t}catch(e){}</script>"
+
+
+def boot_script(loc, rel, key):
+ """Theme, then language. ?lang always wins; on zh pages (also the x-default) a saved choice or else the browser
+ language moves the reader to their language before first paint. Crawlers stay on the URL they asked for, so each
+ language's page is indexed as itself. The target is <this dir> + rel (site root) + language prefix + key."""
+ auto = ("" if loc != "zh" else
+ "if(!(w in P)){var s;try{s=localStorage.getItem('shisei.lang')}catch(e){}w=s in P?s:null;"
+ "if(!w&&!/bot|crawl|spider|slurp|preview|facebookexternalhit|embedly|lighthouse|headless/i.test(navigator.userAgent)){"
+ "var n=String(navigator.language||'').toLowerCase();w=/^ja/.test(n)?'ja':/^ko/.test(n)?'ko':/^zh/.test(n)?'zh':n?'en':null}}")
+ lang = ("<script>(function(){var P=" + json.dumps(PREFIX) + ",L=" + json.dumps(loc) + ",q=new URLSearchParams(location.search),w=q.get('lang');"
+ + auto + "if(w in P&&w!==L){q.delete('lang');var r=q.toString();"
+ "location.replace(location.pathname.replace(/[^/]*$/,'')+" + json.dumps(rel) + "+P[w]+" + json.dumps(key) + "+(r?'?'+r:'')+location.hash)}})()</script>")
+ return THEME + "\n" + lang
diff --git a/web/app.css b/web/app.css
index e280caba..22ce99bd 100644
--- a/web/app.css
+++ b/web/app.css
@@ -265,3 +265,81 @@ dialog::backdrop { background: rgba(38, 34, 30, 0.55); }
.lb.photo .lb-stage img { width: auto; max-width: 100%; height: 100%; border-radius: 18px; box-shadow: 0 10px 30px -16px rgba(24,24,27,0.5); }
.lb.photo .lb-chips button span { display: flex; justify-content: center; }
.lb.photo .lb-chips img { width: auto; height: 100%; }
+
+@media (max-width: 1100px) { .static .nav-links { display: flex; } }
+/* ---- generated pages (tools/site_pages.py): pose pages, changelog, 404; share sheet ---- */
+.page { padding-top: 24px; padding-bottom: 72px; }
+.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 15px; color: var(--ink4); }
+.crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink3); }
+.crumbs a:hover { color: var(--ink); }
+.pp-head { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; max-width: 820px; }
+.pp-meta { margin: 0; font-size: 14px; color: var(--ink4); }
+.pp-head h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; }
+.pp-head .lb-names { max-width: 560px; }
+.pp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
+.pp-desc { max-width: 820px; margin-top: 24px; }
+.pp-sec { margin-top: 48px; }
+.pp-sec h2 { margin: 0 0 18px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
+.pp-views { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
+.pp-view { margin: 0; display: flex; flex-direction: column; gap: 8px; }
+.pp-tile { display: block; aspect-ratio: 3 / 4; border-radius: 24px; overflow: hidden; background: var(--tint); position: relative; }
+.pp-tile img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
+.pp-tile.missing { display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; border: 2px dashed rgba(24,24,27,0.28); background: var(--tile); color: var(--ink3); font-size: 14px; }
+.pp-view figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; font-size: 14px; color: var(--ink3); }
+.pp-view figcaption a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink2); font-size: 13px; }
+.pp-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
+.pp-pn a { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--field); text-decoration: none; min-width: 0; }
+.pp-pn a span { font-size: 13px; color: var(--ink4); }
+.pp-pn a b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.pp-pn-r { text-align: right; }
+.pp-rels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
+.pp-rel { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
+.pp-rel-t { display: block; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; }
+.pp-rel-t img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
+.pp-rel-n { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
+.pp-rel-n .mono { font-size: 12px; color: var(--ink4); }
+.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 18px; width: 100%; }
+.foot-langs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink3); text-decoration: none; }
+.foot-langs a[aria-current] { color: var(--ink); font-weight: 600; }
+
+.cl-page { max-width: 880px; }
+.cl-page h1 { margin: 10px 0 0; font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -0.03em; }
+.cl-lead { margin: 14px 0 0; font-size: 17px; line-height: 1.7; color: var(--ink3); }
+.cl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 22px; font-size: 14px; }
+.cl-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
+.cl-filter .chip[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
+.cl-list section { margin-top: 32px; }
+.cl-list h2 { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13px; letter-spacing: 0.14em; color: var(--ink4); font-weight: 500; }
+.cl-item { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line2); }
+.cl-item time { flex: 0 0 110px; padding-top: 3px; font-size: 13px; color: var(--ink4); }
+.cl-body { min-width: 0; }
+.cl-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg2); color: var(--ink2); }
+.cl-tag.t-new { background: var(--new); color: var(--new-ink); }
+.cl-tag.t-announce { background: #E6B7A1; color: #18181B; }
+.cl-body h3 { margin: 10px 0 6px; font-size: 19px; line-height: 1.4; }
+.cl-body h3 a { text-decoration: none; }
+.cl-body p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink3); }
+.cl-cta { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--accent); text-decoration: none; }
+
+.share-sheet .share-url { display: flex; gap: 8px; margin-top: 12px; }
+.share-sheet input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); font-size: 14px; }
+.share-sheet .share-nets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
+.share-sheet .share-nets .pill { height: 48px; font-size: 15px; }
+
+.nf-page { display: flex; flex-direction: column; gap: 28px; max-width: 720px; padding-top: 48px; }
+.nf-page .brand { align-self: flex-start; }
+.nf-block h1 { margin: 0 0 6px; font-size: 26px; }
+.nf-block p { margin: 0 0 12px; color: var(--ink3); }
+
+@media (max-width: 720px) {
+ .static .nav-tools { width: auto; margin-left: auto; }
+ .static .nav-links { display: flex; gap: 4px 18px; font-size: 15px; }
+ .static .nav-links a { display: inline-flex; align-items: center; min-height: 44px; }
+ .pp-views { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
+ .pp-tile { border-radius: 20px; }
+ .pp-pn { grid-template-columns: 1fr; }
+ .pp-pn-r { text-align: left; }
+ .pp-rels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
+ .cl-item { flex-direction: column; gap: 6px; }
+ .cl-item time { flex: none; }
+}
diff --git a/web/app.js b/web/app.js
index 2e9bc10c..d14db628 100644
--- a/web/app.js
+++ b/web/app.js
@@ -10,6 +10,10 @@
const TINT = ['#D3D1E6', '#AFC3E0', '#BCD3C6', '#E3CBB0', '#EBC0BC', '#C7DCD6', '#E6B7A1', '#CBD0AC', '#DDB9C8'];
const TOOLS = ['ComfyUI', 'Stable Diffusion', 'Flux', 'Midjourney', 'Nano Banana', 'Qwen-Image', '即梦'];
const NAME_LABEL = { cn: 'ZH', jp: 'JA', en: 'EN', kr: 'KO' };
+ // Each language has its own copy of this page (zh at the root, the others under ja/ en/ ko/) so search engines and
+ // link previews see it in that language; BASE leads back to the site root from here.
+ const BASE = window.SHISEI.base || '';
+ const PREFIX = { zh: '', ja: 'ja/', en: 'en/', ko: 'ko/' };
const poses = CATALOG.map((p) => ({
...p,
@@ -33,20 +37,9 @@
const n = parseInt(params.get(k), 10);
return Number.isInteger(n) && n >= lo && n <= hi ? n : dflt;
};
- const pickLang = () => {
- const q = params.get('lang');
- if (LANGS.includes(q)) return q;
- const saved = store.get('lang');
- if (LANGS.includes(saved)) return saved;
- const nav = (navigator.language || '').toLowerCase();
- if (nav.startsWith('ja')) return 'ja';
- if (nav.startsWith('ko')) return 'ko';
- if (nav.startsWith('zh')) return 'zh';
- return nav ? 'en' : 'zh';
- };
-
+ // The page's own language; the head script already moved the reader if ?lang or their saved choice says otherwise.
const S = {
- lang: pickLang(),
+ lang: LANGS.includes(window.SHISEI.lang) ? window.SHISEI.lang : 'zh',
cat: intParam('cat', 0, CAT_KEYS.length - 1, -1),
newOnly: params.get('new') === '1',
angle: intParam('angle', 0, 4, -1),
@@ -60,7 +53,7 @@
const t = () => I18N[S.lang];
const esc = (s) => String(s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
const nameOf = (p) => p['name_' + t().suffix];
- const src = (kind, tier, file) => 'images/' + kind + '/' + tier + '/' + file;
+ const src = (kind, tier, file) => BASE + 'images/' + kind + '/' + tier + '/' + file;
const srcset = (kind, file) => src(kind, 'w300', file) + ' 300w, ' + src(kind, 'w900', file) + ' 900w';
const files = (p, photo) => (photo ? p.photo : p.line);
const firstView = (arr) => Math.max(0, arr.findIndex(Boolean));
@@ -84,7 +77,6 @@
function syncUrl() {
const p = new URLSearchParams();
- if (S.lang !== 'zh') p.set('lang', S.lang);
if (S.cat >= 0) p.set('cat', S.cat);
if (S.newOnly) p.set('new', '1');
if (S.angle >= 0) p.set('angle', S.angle);
@@ -325,10 +317,9 @@
q.addEventListener('keydown', (e) => { if (e.key === 'Enter') $('all').scrollIntoView(); });
$('lang').addEventListener('click', () => {
- S.lang = LANGS[(LANGS.indexOf(S.lang) + 1) % LANGS.length];
- store.set('lang', S.lang);
- renderAll();
- syncUrl();
+ const next = LANGS[(LANGS.indexOf(S.lang) + 1) % LANGS.length];
+ store.set('lang', next);
+ location.assign(BASE + PREFIX[next] + location.search + location.hash);
});
$('theme').addEventListener('click', () => {
const root = document.documentElement;
@@ -401,8 +392,10 @@
$('lbDlText').textContent = T.download + ' · ' + (LB.photo ? '900×1800' : '900×1200');
if (f) { dl.href = src(kind, 'w900', f); dl.setAttribute('download', 'shisei_' + p.id + '_' + VIEWS[LB.v] + (LB.photo ? '_photo' : '') + '.webp'); dl.removeAttribute('aria-disabled'); }
else { dl.removeAttribute('href'); dl.setAttribute('aria-disabled', 'true'); }
+ $('lbPage').href = posePage(p.id);
history.replaceState(null, '', location.pathname + location.search + '#' + p.id + '-' + VIEWS[LB.v] + (LB.photo ? '-photo' : ''));
}
+ const posePage = (id) => BASE + PREFIX[S.lang] + 'pose/' + id + '/';
function stepAngle(d) {
const arr = files(byId.get(LB.id), LB.photo);
for (let k = 1; k <= 5; k++) {
@@ -430,6 +423,17 @@
});
$('lbCopyDesc').addEventListener('click', () => copy(byId.get(LB.id).desc_en));
$('lbCopyId').addEventListener('click', () => copy(LB.id));
+ // Share the pose page, not this #hash: link previews never see a fragment, the pose page has its own card.
+ $('lbShare').addEventListener('click', () => {
+ const p = byId.get(LB.id);
+ const f = p.line[LB.v] || p.line[firstView(p.line)];
+ window.ShiseiShare.open({
+ url: posePage(p.id),
+ heading: t().shareTitle,
+ text: t().shareText.replace('{name}', nameOf(p)),
+ image: new URL(src('line', 'w900', f), location.href).href
+ });
+ });
$('lb').addEventListener('close', () => history.replaceState(null, '', location.pathname + location.search));
$('lb').addEventListener('keydown', (e) => {
if (e.target.closest('input, textarea')) return;
diff --git a/web/changelog.yaml b/web/changelog.yaml
new file mode 100644
index 00000000..19919867
--- /dev/null
+++ b/web/changelog.yaml
@@ -0,0 +1,53 @@
+# Public changelog: tools/build_site.py turns this into /changelog/ (+ /ja/ /en/ /ko/), an Atom feed per language and
+# sitemap rows. CHANGELOG.md stays the maintainer log; this file is written for readers: what they can see or try now.
+# Every entry carries title / desc / cta in English plus _zh, _ja and _ko; the build stops if one is missing or too long.
+# tag: new | improve | announce | removed. link: an in-site path without language prefix (/, /changelog/, /pose/P001/),
+# optionally with ?query and #hash; the build prefixes the reader's language. Newest first.
+entries:
+ - date: 2026-10-28
+ tag: new
+ title: Share any pose, with its own preview card
+ desc: Every pose now has its own page with all five angles and its names in four languages. Share it and the link preview shows that pose.
+ link: /pose/P064/
+ cta: Open a pose page
+ title_zh: 每套姿势都能单独分享
+ desc_zh: 每套姿势都有自己的页面,五个机位和四种语言的名称都在上面。分享到微博、X 或 Pinterest 时,预览图就是这套姿势。
+ cta_zh: 打开一套姿势
+ title_ja: ポーズごとに共有できるように
+ desc_ja: すべてのポーズに専用ページができました。5 アングルと 4 言語の名前を掲載。X・LINE・Pinterest に共有するとプレビューにそのポーズが表示されます。
+ cta_ja: ポーズページを開く
+ title_ko: 포즈마다 따로 공유할 수 있어요
+ desc_ko: 모든 포즈에 전용 페이지가 생겼습니다. 5개 앵글과 4개 언어 이름을 담았고, X·LINE·Pinterest에 공유하면 미리보기에 그 포즈가 나옵니다.
+ cta_ko: 포즈 페이지 열기
+
+ - date: 2026-10-28
+ tag: new
+ title: 23 new lying, squatting, leaning, arching and twisting poses
+ desc: Five lying, six squatting, six leaning forward, three arching back and three twisting poses, each drawn from five angles.
+ link: /?new=1#all
+ cta: See the new poses
+ title_zh: 新增 23 套:躺、蹲、前倾、后仰、扭转
+ desc_zh: 躺姿 5 套、蹲姿 6 套、前倾 6 套、后仰 3 套、扭转 3 套,每套都有五个机位。
+ cta_zh: 看新增的姿势
+ title_ja: 寝そべり・しゃがみ・前かがみ・反り・ひねりの 23 ポーズを追加
+ desc_ja: 寝そべり 5、しゃがみ 6、前かがみ 6、反り 3、ひねり 3。どれも 5 アングルで描いています。
+ cta_ja: 新しいポーズを見る
+ title_ko: 눕기·쪼그려 앉기·숙이기·젖히기·비틀기 23개 추가
+ desc_ko: 눕기 5개, 쪼그려 앉기 6개, 숙이기 6개, 젖히기 3개, 비틀기 3개. 모두 5개 앵글로 그렸습니다.
+ cta_ko: 새 포즈 보기
+
+ - date: 2026-10-28
+ tag: announce
+ title: The Shisei gallery is open
+ desc: Browse 73 faceless mannequin poses, switch every card between five angles, search in four languages and download any view at 900×1200.
+ link: /
+ cta: Browse the gallery
+ title_zh: Shisei 画廊上线
+ desc_zh: 浏览 73 套无脸素体姿势,每张卡片都能在五个机位间切换,支持四种语言搜索,任意机位都能下载 900×1200 的图。
+ cta_zh: 浏览画廊
+ title_ja: Shisei ギャラリーを公開しました
+ desc_ja: 顔なし素体の 73 ポーズを閲覧できます。カードごとに 5 アングルを切り替え、4 言語で検索し、どのアングルも 900×1200 でダウンロードできます。
+ cta_ja: ギャラリーを見る
+ title_ko: Shisei 갤러리를 열었습니다
+ desc_ko: 얼굴 없는 마네킹 포즈 73가지를 둘러보세요. 카드마다 5개 앵글을 바꿔 보고, 4개 언어로 검색하고, 900×1200으로 내려받을 수 있습니다.
+ cta_ko: 갤러리 둘러보기
diff --git a/web/common.js b/web/common.js
new file mode 100644
index 00000000..d9dd3235
--- /dev/null
+++ b/web/common.js
@@ -0,0 +1,109 @@
+// Behaviour shared by the gallery and the generated pages: share sheet, copy buttons, language links, changelog filter.
+// Strings come from window.I18N_PAGES (web/i18n.js); the page language is <html data-loc>.
+(() => {
+ 'use strict';
+
+ const loc = document.documentElement.dataset.loc || 'zh';
+ // i18n.js merges I18N_PAGES into I18N, so this sees both tables.
+ const T = (window.I18N || {})[loc] || {};
+ const enc = encodeURIComponent;
+ const esc = (s) => String(s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
+ // Plain share links: no SDKs, nothing loads until the reader picks one. Which ones show depends on the language
+ // (T.nets): Weibo for zh, LINE for ja / ko, Reddit for en; Pinterest everywhere, it is where pose references live.
+ const NETS = {
+ x: (u, t) => 'https://x.com/intent/tweet?text=' + enc(t) + '&url=' + enc(u),
+ facebook: (u) => 'https://www.facebook.com/sharer/sharer.php?u=' + enc(u),
+ line: (u, t) => 'https://social-plugins.line.me/lineit/share?url=' + enc(u) + '&text=' + enc(t),
+ weibo: (u, t, img) => 'https://service.weibo.com/share/share.php?url=' + enc(u) + '&title=' + enc(t) + (img ? '&pic=' + enc(img) : ''),
+ pinterest: (u, t, img) => 'https://www.pinterest.com/pin/create/button/?url=' + enc(u) + '&description=' + enc(t) + (img ? '&media=' + enc(img) : ''),
+ reddit: (u, t) => 'https://www.reddit.com/submit?url=' + enc(u) + '&title=' + enc(t)
+ };
+
+ function toast(msg) {
+ const el = document.getElementById('toast');
+ if (!el) return;
+ el.textContent = msg;
+ el.classList.add('show');
+ clearTimeout(toast.timer);
+ toast.timer = setTimeout(() => el.classList.remove('show'), 1600);
+ }
+ async function copy(text) {
+ try { await navigator.clipboard.writeText(text); } catch (e) {
+ const ta = document.createElement('textarea');
+ ta.value = text; document.body.appendChild(ta); ta.select();
+ try { document.execCommand('copy'); } catch (e2) { /* nothing else to try */ }
+ ta.remove();
+ }
+ toast(T.copied);
+ }
+
+ let dlg = null;
+ function sheet() {
+ if (dlg) return dlg;
+ dlg = document.createElement('dialog');
+ dlg.className = 'info share-sheet';
+ dlg.setAttribute('aria-labelledby', 'shareH');
+ dlg.innerHTML = '<div class="info-h"><h2 id="shareH"></h2><button type="button" class="circle" data-share-close aria-label="' + esc(T.close || '×') + '">' +
+ '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div>' +
+ '<div class="share-url"><input type="text" readonly aria-label="URL"><button type="button" class="pill dark small" data-share-copy>' + esc(T.copyLink) + '</button></div>' +
+ '<div class="share-nets"></div>';
+ dlg.addEventListener('click', (e) => {
+ if (e.target === dlg || e.target.closest('[data-share-close]')) dlg.close();
+ if (e.target.closest('[data-share-copy]')) copy(dlg.querySelector('input').value);
+ });
+ document.body.appendChild(dlg);
+ return dlg;
+ }
+
+ /** open({ url, heading, text, image }): the system share sheet on phones, our own sheet elsewhere. */
+ function open(o) {
+ const url = new URL(o.url || location.href, location.href).href;
+ const text = o.text || document.title;
+ if (navigator.share && matchMedia('(pointer: coarse)').matches) {
+ navigator.share({ title: text, text: text, url: url }).catch(() => { /* dismissed */ });
+ return;
+ }
+ const d = sheet();
+ d.querySelector('h2').textContent = o.heading || T.share;
+ d.querySelector('input').value = url;
+ d.querySelector('.share-nets').innerHTML = Object.keys(T.nets || {}).filter((k) => NETS[k]).map((k) =>
+ '<a class="pill light" target="_blank" rel="noopener noreferrer" href="' + esc(NETS[k](url, text, o.image)) + '">' + esc(T.nets[k]) + '</a>').join('');
+ d.showModal();
+ }
+ window.ShiseiShare = { open: open, copy: copy };
+
+ document.addEventListener('click', (e) => {
+ const s = e.target.closest('[data-share]');
+ if (s) {
+ const site = s.hasAttribute('data-share-site');
+ const home = (window.SHISEI && window.SHISEI.base !== undefined) ? window.SHISEI.base + (loc === 'zh' ? '' : loc + '/') : null;
+ open({
+ url: s.dataset.shareUrl || (site && home !== null ? home : location.href),
+ heading: site ? T.shareSite : (s.dataset.shareHeading || T.shareTitle),
+ text: s.dataset.shareText || document.title,
+ image: s.dataset.shareImage
+ });
+ }
+ const c = e.target.closest('[data-copy]');
+ if (c) copy(c.dataset.copy);
+ // Picking a language by hand is remembered, so the zh / x-default pages send the reader there next time.
+ const l = e.target.closest('[data-lang-link]');
+ if (l) { try { localStorage.setItem('shisei.lang', l.dataset.langLink); } catch (err) { /* private mode */ } }
+ });
+
+ // Changelog: filter by tag. Without JS the buttons stay hidden and every entry shows.
+ const g = document.querySelector('[data-filter-group]');
+ if (g) {
+ g.hidden = false;
+ g.addEventListener('click', (e) => {
+ const b = e.target.closest('[data-filter]');
+ if (!b) return;
+ const f = b.dataset.filter;
+ let n = 0;
+ g.querySelectorAll('[data-filter]').forEach((x) => x.setAttribute('aria-pressed', String(x === b)));
+ document.querySelectorAll('article[data-tag]').forEach((a) => { a.hidden = !(f === 'all' || a.dataset.tag === f); if (!a.hidden) n++; });
+ document.querySelectorAll('.cl-list section').forEach((s) => { s.hidden = !s.querySelector('article:not([hidden])'); });
+ document.querySelector('[data-filter-empty]').hidden = n > 0;
+ });
+ }
+})();
diff --git a/web/i18n.js b/web/i18n.js
index c0074e18..b8439b31 100644
--- a/web/i18n.js
+++ b/web/i18n.js
@@ -3,114 +3,241 @@
window.I18N = {
zh: {
htmlLang: 'zh-CN', short: '中', suffix: 'cn',
- navPoses: '姿势', navHow: '使用方法', navChangelog: '更新日志',
+ navHow: '使用方法',
search: '想找什么姿势…', langLabel: '切换语言', theme: '切换深色模式',
heroTitle: 'Shisei · 姿势有五个机位',
- heroSub: '73 套无脸素体线稿,正面、斜侧、侧面、俯视、仰视一次给齐。拖进你的 AI 绘图工具,姿势就定住了。',
- browse: '浏览 73 套姿势', downloadAll: '下载全尺寸原图包', worksWith: '适用于',
- newTitle: '新增 23 套', newSub: 'v0.1.0 补上了躺、蹲、前倾、后仰和扭转。', viewAll: '查看全部',
+ heroSub: (n) => n + ' 套无脸素体线稿,正面、斜侧、侧面、俯视、仰视一次给齐。拖进你的 AI 绘图工具,姿势就定住了。',
+ browse: (n) => '浏览 ' + n + ' 套姿势', downloadAll: '下载全尺寸原图包', worksWith: '适用于',
+ newTitle: (n) => '新增 ' + n + ' 套', newSub: 'v0.2.0 加入了上半身和全身性感两个系列,每个机位都经过质检。', viewAll: '查看全部',
allTitle: '全部姿势', all: '全部', angleAll: '全部机位',
+ series: { all: '全部系列', std: '全身・标准', sexy: '全身・性感', upper: '上半身' }, seriesLabel: '系列',
+ adultOn: '性感内容:显示', adultOff: '性感内容:隐藏', adultHint: '全身性感系列和上半身的性感、聚胸分类默认隐藏', full: '五机位齐全',
+ qcFail: (v) => v + ' · 质检未通过', qcFailSub: '这个机位画得有问题,已经移除,其余机位可用',
cats: ['坐姿', '站立', '跪姿', '躺姿', '侧坐', '蹲姿', '前倾', '后仰', '扭转'],
- views: ['正面', '斜侧', '侧面', '俯视', '仰视'],
angle: '机位', medium: '素材', view: '视图',
line: '线稿', photo: '实拍', byPose: '按姿势', single: '逐张',
- countPoses: (n) => n + ' / 73 套', countImages: (n) => n + ' 张',
+ countPoses: (n, all) => n + ' / ' + all + ' 套', countImages: (n) => n + ' 张',
newBadge: 'NEW', hasPhoto: '含实拍',
missingLine: (v) => v + ' · 暂未收录', missingPhoto: (v) => v + ' · 没有实拍',
missingLineSub: '这个机位还没画出来,其余机位可用', missingPhotoSub: '这套没有这个机位的实拍,切回线稿可看全部机位',
empty: '没有找到匹配的姿势', filters: '筛选', reset: '重置', show: (n) => '显示 ' + n + ' 套',
close: '关闭', prevAngle: '上一个机位', nextAngle: '下一个机位', open: (id) => '打开 ' + id + ' 大图',
- descLabel: '英文姿势描述,可直接放进提示词', copy: '复制', copied: '已复制',
download: '下载这张', copyId: '复制 ID', fullZip: '全尺寸原图包',
keys: '← → 换机位 ↑ ↓ 换姿势 L 线稿/实拍 Esc 关闭',
- footer: '全部素材由 Shisei 自制。', terms: '注意事项',
+ terms: '注意事项',
howTitle: '使用方法',
how: ['把图片上传到 AI 绘图工具的姿势参考或构图参考里。', '同一个姿势换机位连续使用,生成出来的姿态更一致。', '线稿是无脸素体,脸、服装和背景靠提示词或别的参考图补上。', '点卡片看大图,← → 换机位,↑ ↓ 换姿势,Esc 关闭。'],
termsTitle: '注意事项',
- termsItems: ['全部素材由 Shisei 自制,授权见仓库里的 LICENSE。', '线稿画的是素体;实拍图是 AI 生成的成年人物,不对应任何真人。图片元数据已清除。', '请勿用于表现真实人物或未成年人,也不要用于违反公序良俗的用途。']
+ termsItems: ['全部素材由 Shisei 自制,采用 Apache-2.0 许可证,可商用、可再分发,再分发时附上 LICENSE 和 NOTICE。', '线稿画的是素体;实拍图是 AI 生成的成年人物,不对应任何真人。图片元数据已清除。', '请勿用于表现真实人物或未成年人,也不要用于违反公序良俗的用途。']
},
ja: {
htmlLang: 'ja', short: '日', suffix: 'jp',
- navPoses: 'ポーズ', navHow: '使い方', navChangelog: '更新履歴',
+ navHow: '使い方',
search: 'ポーズを検索…', langLabel: '言語を切り替え', theme: 'ダークモード切り替え',
heroTitle: 'Shisei · 一つのポーズを五つのアングルで',
- heroSub: '顔なし素体の線画 73 ポーズ。正面・斜め・横・上から・下からをまとめて収録。AI 画像生成のポーズ参照にそのまま使えます。',
- browse: '73 ポーズを見る', downloadAll: '原寸画像をまとめてダウンロード', worksWith: '対応ツール',
- newTitle: '新規 23 ポーズ', newSub: 'v0.1.0 で寝そべり・しゃがみ・前かがみ・反り・ひねりを追加。', viewAll: 'すべて見る',
+ heroSub: (n) => '顔なし素体の線画 ' + n + ' ポーズ。正面・斜め・横・上から・下からをまとめて収録。AI 画像生成のポーズ参照にそのまま使えます。',
+ browse: (n) => n + ' ポーズを見る', downloadAll: '原寸画像をまとめてダウンロード', worksWith: '対応ツール',
+ newTitle: (n) => '新規 ' + n + ' ポーズ', newSub: 'v0.2.0 で上半身と全身セクシーの 2 シリーズを追加。すべてのアングルを品質チェック済みです。', viewAll: 'すべて見る',
allTitle: 'すべてのポーズ', all: 'すべて', angleAll: '全アングル',
+ series: { all: '全シリーズ', std: '全身・標準', sexy: '全身・セクシー', upper: '上半身' }, seriesLabel: 'シリーズ',
+ adultOn: 'セクシー系:表示', adultOff: 'セクシー系:非表示', adultHint: '全身セクシーと上半身のセクシー・胸寄せはデフォルトで非表示です', full: '5 アングル揃い',
+ qcFail: (v) => v + ' · 品質チェック不合格', qcFailSub: 'このアングルは描画に問題があったため外しました。他のアングルは使えます',
cats: ['座り', '立ち', '膝立ち', '寝そべり', '横座り', 'しゃがみ', '前かがみ', '反り', 'ひねり'],
- views: ['正面', '斜め', '横', '上から', '下から'],
angle: 'アングル', medium: '素材', view: '表示',
line: '線画', photo: '実写', byPose: 'ポーズごと', single: '1枚ずつ',
- countPoses: (n) => n + ' / 73 ポーズ', countImages: (n) => n + ' 枚',
+ countPoses: (n, all) => n + ' / ' + all + ' ポーズ', countImages: (n) => n + ' 枚',
newBadge: 'NEW', hasPhoto: '実写あり',
missingLine: (v) => v + ' · 未収録', missingPhoto: (v) => v + ' · 実写なし',
missingLineSub: 'このアングルはまだありません。他のアングルは使えます', missingPhotoSub: 'このアングルの実写はありません。線画に切り替えると全アングルを見られます',
empty: '該当するポーズがありません', filters: '絞り込み', reset: 'リセット', show: (n) => n + ' ポーズを表示',
close: '閉じる', prevAngle: '前のアングル', nextAngle: '次のアングル', open: (id) => id + ' を拡大表示',
- descLabel: '英語のポーズ説明(プロンプトにそのまま使えます)', copy: 'コピー', copied: 'コピーしました',
download: 'この画像をダウンロード', copyId: 'ID をコピー', fullZip: '原寸画像パック',
keys: '← → アングル ↑ ↓ ポーズ L 線画/実写 Esc 閉じる',
- footer: 'すべての素材は Shisei のオリジナルです。', terms: '注意点',
+ terms: '注意点',
howTitle: '使い方',
how: ['AI ツールのポーズ参照・構図参照に画像を読み込みます。', '同じポーズのアングル違いを続けて使うと、姿勢が揃いやすくなります。', '顔なし素体の線画です。顔・服装・背景はプロンプトや別の参照画像で足してください。', 'カードで拡大表示。← → でアングル、↑ ↓ でポーズ、Esc で閉じます。'],
termsTitle: '注意点',
- termsItems: ['すべての素材は Shisei のオリジナルです。ライセンスはリポジトリの LICENSE を参照してください。', '線画は素体です。実写は AI 生成の成人で、実在の人物ではありません。メタデータは削除済みです。', '実在の人物や未成年を表す用途、公序良俗に反する用途には使わないでください。']
+ termsItems: ['すべての素材は Shisei のオリジナルで、Apache-2.0 ライセンスです。商用・再配布可、再配布時は LICENSE と NOTICE を添えてください。', '線画は素体です。実写は AI 生成の成人で、実在の人物ではありません。メタデータは削除済みです。', '実在の人物や未成年を表す用途、公序良俗に反する用途には使わないでください。']
},
en: {
htmlLang: 'en', short: 'EN', suffix: 'en',
- navPoses: 'Poses', navHow: 'How to use', navChangelog: 'Changelog',
+ navHow: 'How to use',
search: 'Search poses…', langLabel: 'Change language', theme: 'Toggle dark mode',
heroTitle: 'Shisei · Every pose, five angles',
- heroSub: '73 faceless mannequin poses in line art, each from the front, three-quarter, side, above and below. Drop one into your AI image tool and the pose holds.',
- browse: 'Browse 73 poses', downloadAll: 'Download full-size pack', worksWith: 'Works with',
- newTitle: '23 new poses', newSub: 'v0.1.0 adds lying, squatting, leaning, arching and twisting poses.', viewAll: 'View all',
+ heroSub: (n) => n + ' faceless mannequin poses in line art, each from the front, three-quarter, side, above and below. Drop one into your AI image tool and the pose holds.',
+ browse: (n) => 'Browse ' + n + ' poses', downloadAll: 'Download full-size pack', worksWith: 'Works with',
+ newTitle: (n) => n + ' new poses', newSub: 'v0.2.0 adds the upper-body and full-body sexy series; every angle passed a quality check.', viewAll: 'View all',
allTitle: 'All poses', all: 'All', angleAll: 'All angles',
+ series: { all: 'All series', std: 'Full body', sexy: 'Full body · Sexy', upper: 'Upper body' }, seriesLabel: 'Series',
+ adultOn: 'Sexy poses: shown', adultOff: 'Sexy poses: hidden', adultHint: 'The full-body sexy series and the sexy and chest-emphasis upper-body categories are hidden by default', full: 'All 5 angles',
+ qcFail: (v) => v + ' · failed QC', qcFailSub: 'This angle was drawn wrong and has been removed; the others are available',
cats: ['Sitting', 'Standing', 'Kneeling', 'Lying', 'Side sit', 'Squatting', 'Leaning', 'Arching', 'Twist'],
- views: ['Front', '3/4', 'Side', 'Above', 'Below'],
angle: 'Angle', medium: 'Source', view: 'View',
line: 'Line art', photo: 'Photo', byPose: 'By pose', single: 'Single',
- countPoses: (n) => n + ' / 73 poses', countImages: (n) => n + ' images',
+ countPoses: (n, all) => n + ' / ' + all + ' poses', countImages: (n) => n + ' images',
newBadge: 'NEW', hasPhoto: 'Photo',
missingLine: (v) => v + ' · not yet', missingPhoto: (v) => v + ' · no photo',
missingLineSub: 'This angle is not drawn yet; the others are available', missingPhotoSub: 'No photo for this angle; switch to line art for every angle',
empty: 'No poses match', filters: 'Filters', reset: 'Reset', show: (n) => 'Show ' + n + ' poses',
close: 'Close', prevAngle: 'Previous angle', nextAngle: 'Next angle', open: (id) => 'Open ' + id,
- descLabel: 'Pose description, ready for a prompt', copy: 'Copy', copied: 'Copied',
download: 'Download', copyId: 'Copy ID', fullZip: 'Full-size pack',
keys: '← → angle ↑ ↓ pose L line/photo Esc close',
- footer: 'Every image is made by Shisei.', terms: 'Terms',
+ terms: 'Terms',
howTitle: 'How to use',
how: ['Upload an image as the pose or composition reference in your AI image tool.', 'Use several angles of the same pose in a row to keep the figure consistent.', 'The figures are faceless mannequins; add face, clothing and background with your prompt or other references.', 'Click a card to open it. ← → change angle, ↑ ↓ change pose, Esc closes.'],
termsTitle: 'Terms',
- termsItems: ['Every image is made by Shisei; see LICENSE in the repository.', 'Line art shows mannequins; photos are AI-generated adults and do not depict real people. Metadata is stripped.', 'Do not use them to depict real people or minors, or for indecent purposes.']
+ termsItems: ['Every image is made by Shisei and licensed under Apache-2.0: commercial use and redistribution are fine; keep LICENSE and NOTICE with redistributed files.', 'Line art shows mannequins; photos are AI-generated adults and do not depict real people. Metadata is stripped.', 'Do not use them to depict real people or minors, or for indecent purposes.']
},
ko: {
htmlLang: 'ko', short: '한', suffix: 'kr',
- navPoses: '포즈', navHow: '사용법', navChangelog: '변경 내역',
+ navHow: '사용법',
search: '포즈 검색…', langLabel: '언어 변경', theme: '다크 모드 전환',
heroTitle: 'Shisei · 한 포즈, 다섯 앵글',
- heroSub: '얼굴 없는 마네킹 선화 73가지 포즈. 정면·대각선·옆·위·아래를 한 번에. AI 이미지 도구에 넣으면 포즈가 고정됩니다.',
- browse: '73가지 포즈 보기', downloadAll: '원본 크기 묶음 다운로드', worksWith: '함께 쓰는 도구',
- newTitle: '새 포즈 23개', newSub: 'v0.1.0에서 눕기·쪼그려 앉기·숙이기·젖히기·비틀기를 추가했습니다.', viewAll: '전체 보기',
+ heroSub: (n) => '얼굴 없는 마네킹 선화 ' + n + '가지 포즈. 정면·대각선·옆·위·아래를 한 번에. AI 이미지 도구에 넣으면 포즈가 고정됩니다.',
+ browse: (n) => n + '가지 포즈 보기', downloadAll: '원본 크기 묶음 다운로드', worksWith: '함께 쓰는 도구',
+ newTitle: (n) => '새 포즈 ' + n + '개', newSub: 'v0.2.0에서 상반신과 전신 섹시 시리즈를 추가했고, 모든 앵글을 품질 검사했습니다.', viewAll: '전체 보기',
allTitle: '전체 포즈', all: '전체', angleAll: '전체 앵글',
+ series: { all: '전체 시리즈', std: '전신・표준', sexy: '전신・섹시', upper: '상반신' }, seriesLabel: '시리즈',
+ adultOn: '섹시 포즈: 표시', adultOff: '섹시 포즈: 숨김', adultHint: '전신 섹시 시리즈와 상반신의 섹시·가슴 강조 분류는 기본으로 숨겨집니다', full: '5앵글 모두',
+ qcFail: (v) => v + ' · 품질 검사 불합격', qcFailSub: '이 앵글은 잘못 그려져 제외했습니다. 다른 앵글은 사용할 수 있습니다',
cats: ['앉기', '서기', '무릎 꿇기', '눕기', '옆 앉기', '쪼그려 앉기', '숙이기', '젖히기', '비틀기'],
- views: ['정면', '대각선', '옆', '위에서', '아래에서'],
angle: '앵글', medium: '소재', view: '보기',
line: '선화', photo: '실사', byPose: '포즈별', single: '한 장씩',
- countPoses: (n) => n + ' / 73 포즈', countImages: (n) => n + '장',
+ countPoses: (n, all) => n + ' / ' + all + ' 포즈', countImages: (n) => n + '장',
newBadge: 'NEW', hasPhoto: '실사 포함',
missingLine: (v) => v + ' · 미수록', missingPhoto: (v) => v + ' · 실사 없음',
missingLineSub: '이 앵글은 아직 없습니다. 다른 앵글은 사용할 수 있습니다', missingPhotoSub: '이 앵글의 실사는 없습니다. 선화로 바꾸면 모든 앵글을 볼 수 있습니다',
empty: '일치하는 포즈가 없습니다', filters: '필터', reset: '초기화', show: (n) => n + '개 포즈 보기',
close: '닫기', prevAngle: '이전 앵글', nextAngle: '다음 앵글', open: (id) => id + ' 크게 보기',
- descLabel: '영문 포즈 설명 (프롬프트에 바로 사용)', copy: '복사', copied: '복사됨',
download: '이 이미지 다운로드', copyId: 'ID 복사', fullZip: '원본 크기 묶음',
keys: '← → 앵글 ↑ ↓ 포즈 L 선화/실사 Esc 닫기',
- footer: '모든 소재는 Shisei가 직접 만들었습니다.', terms: '주의사항',
+ terms: '주의사항',
howTitle: '사용법',
how: ['AI 이미지 도구의 포즈 참조나 구도 참조에 이미지를 올립니다.', '같은 포즈의 여러 앵글을 이어서 쓰면 자세가 더 일정해집니다.', '얼굴 없는 마네킹 선화입니다. 얼굴·의상·배경은 프롬프트나 다른 참조 이미지로 채우세요.', '카드를 누르면 크게 봅니다. ← → 앵글, ↑ ↓ 포즈, Esc 닫기.'],
termsTitle: '주의사항',
- termsItems: ['모든 소재는 Shisei가 직접 만들었습니다. 라이선스는 저장소의 LICENSE를 참고하세요.', '선화는 마네킹이며, 실사는 AI로 생성한 성인으로 실존 인물이 아닙니다. 메타데이터는 삭제했습니다.', '실존 인물이나 미성년자를 표현하거나 공서양속에 어긋나는 용도로 쓰지 마세요.']
+ termsItems: ['모든 소재는 Shisei가 직접 만들었으며 Apache-2.0 라이선스입니다. 상업적 이용과 재배포가 가능하며, 재배포할 때는 LICENSE와 NOTICE를 함께 포함하세요.', '선화는 마네킹이며, 실사는 AI로 생성한 성인으로 실존 인물이 아닙니다. 메타데이터는 삭제했습니다.', '실존 인물이나 미성년자를 표현하거나 공서양속에 어긋나는 용도로 쓰지 마세요.']
}
};
+
+// Strings shared with the build: tools/build_site.py reads this block with json.loads to write the static pages
+// (pose pages, changelog, 404) and their meta tags, so keep it strict JSON between the two marker lines.
+// {name}-style slots are filled at build time or by common.js.
+window.I18N_PAGES = // BEGIN-JSON
+{
+ "zh": {
+ "langName": "中文", "ogLocale": "zh_CN",
+ "navPoses": "姿势", "navChangelog": "更新日志",
+ "views": ["正面", "斜侧", "侧面", "俯视", "仰视"],
+ "descLabel": "英文姿势描述,可直接放进提示词", "copy": "复制", "copied": "已复制",
+ "footer": "全部素材由 Shisei 自制。",
+ "metaTitle": "Shisei 姿勢 · {n} 套姿势参考,每套 5 个机位",
+ "metaDesc": "{n} 套无脸素体线稿,正面、斜侧、侧面、俯视、仰视五个机位,给 AI 绘图当姿势参考。",
+ "ogLine": "{n} 套姿势 × 5 个机位", "ogSub": "无脸素体线稿 · AI 绘图的姿势参考",
+ "ogAlt": "Shisei:无脸素体姿势线稿,每套 5 个机位",
+ "poseTitle": "{name} · {cat}姿势参考 {id} | Shisei",
+ "poseDesc": "{cat}姿势「{name}」的无脸素体线稿,{views}共 {n} 个机位,可直接放进 ComfyUI、Midjourney 等 AI 绘图工具当姿势参考。",
+ "poseOgAlt": "{id} {name} 的线稿,{views}",
+ "anglesN": "{n} 个机位", "anglesTitle": "五个机位", "notYet": "暂未收录",
+ "otherNames": "其他语言", "openInGallery": "在画廊中打开", "downloadView": "下载 900×1200",
+ "prevPose": "上一套", "nextPose": "下一套", "related": "同类姿势", "crumb": "面包屑导航", "skip": "跳到正文",
+ "posePage": "姿势详情页", "share": "分享", "shareTitle": "分享这套姿势", "shareSite": "分享 Shisei", "copyLink": "复制链接",
+ "shareText": "{name} · 5 个机位的姿势参考",
+ "nets": {"weibo": "微博", "x": "X", "pinterest": "Pinterest", "facebook": "Facebook"},
+ "clH1": "Shisei 有什么新内容",
+ "clLead": "新增的姿势、机位和画廊功能,最新的在前。每一条都能点进去直接看。",
+ "clMetaTitle": "更新日志 · Shisei 有什么新内容",
+ "clMetaDesc": "Shisei 姿势参考库的更新:新增的姿势、机位和画廊功能,最新的在前。",
+ "clFeed": "Shisei 更新日志", "subscribe": "订阅(Atom)", "updated": "更新于 {date}", "months": "月份",
+ "filterLabel": "按类型筛选", "filterAll": "全部", "clEmpty": "这个类型下还没有更新。",
+ "tags": {"new": "新增", "improve": "改进", "announce": "公告", "removed": "移除"},
+ "nfTitle": "找不到这个页面", "nfBody": "链接可能写错了,或者页面已经移走。", "backHome": "回到画廊"
+ },
+ "ja": {
+ "langName": "日本語", "ogLocale": "ja_JP",
+ "navPoses": "ポーズ", "navChangelog": "更新履歴",
+ "views": ["正面", "斜め", "横", "上から", "下から"],
+ "descLabel": "英語のポーズ説明(プロンプトにそのまま使えます)", "copy": "コピー", "copied": "コピーしました",
+ "footer": "すべての素材は Shisei のオリジナルです。",
+ "metaTitle": "Shisei 姿勢 · {n} ポーズを 5 アングルで",
+ "metaDesc": "顔なし素体の線画 {n} ポーズ。正面・斜め・横・上から・下からの 5 アングルを収録。AI 画像生成のポーズ参照に。",
+ "ogLine": "{n} ポーズ × 5 アングル", "ogSub": "顔なし素体の線画 · AI 画像生成のポーズ参照に",
+ "ogAlt": "Shisei:顔なし素体のポーズ線画、各 5 アングル",
+ "poseTitle": "{name} · {cat}のポーズ参考 {id} | Shisei",
+ "poseDesc": "{cat}のポーズ「{name}」の顔なし素体線画。{views}の {n} アングル。ComfyUI や Midjourney などの AI 画像生成でポーズ参照にそのまま使えます。",
+ "poseOgAlt": "{id} {name} の線画({views})",
+ "anglesN": "{n} アングル", "anglesTitle": "5 つのアングル", "notYet": "未収録",
+ "otherNames": "他の言語", "openInGallery": "ギャラリーで開く", "downloadView": "900×1200 をダウンロード",
+ "prevPose": "前のポーズ", "nextPose": "次のポーズ", "related": "同じカテゴリのポーズ", "crumb": "パンくずリスト", "skip": "本文へ移動",
+ "posePage": "ポーズのページ", "share": "共有", "shareTitle": "このポーズを共有", "shareSite": "Shisei を共有", "copyLink": "リンクをコピー",
+ "shareText": "{name} · 5 アングルのポーズ参考",
+ "nets": {"x": "X", "line": "LINE", "pinterest": "Pinterest", "facebook": "Facebook"},
+ "clH1": "Shisei の新着",
+ "clLead": "追加したポーズ・アングル・ギャラリー機能を新しい順に。各項目からそのまま開けます。",
+ "clMetaTitle": "更新履歴 · Shisei の新着",
+ "clMetaDesc": "ポーズ参考ライブラリ Shisei の更新履歴。追加したポーズ・アングル・ギャラリー機能を新しい順に掲載。",
+ "clFeed": "Shisei 更新履歴", "subscribe": "購読(Atom)", "updated": "{date} 更新", "months": "月別",
+ "filterLabel": "種類で絞り込み", "filterAll": "すべて", "clEmpty": "この種類の更新はまだありません。",
+ "tags": {"new": "新規", "improve": "改善", "announce": "お知らせ", "removed": "削除"},
+ "nfTitle": "ページが見つかりません", "nfBody": "リンクが間違っているか、ページが移動しました。", "backHome": "ギャラリーへ戻る"
+ },
+ "en": {
+ "langName": "English", "ogLocale": "en_US",
+ "navPoses": "Poses", "navChangelog": "Changelog",
+ "views": ["Front", "3/4", "Side", "Above", "Below"],
+ "descLabel": "Pose description, ready for a prompt", "copy": "Copy", "copied": "Copied",
+ "footer": "Every image is made by Shisei.",
+ "metaTitle": "Shisei · {n} pose references, five angles each",
+ "metaDesc": "{n} faceless mannequin poses in line art, each from the front, three-quarter, side, above and below. Pose references for AI image tools.",
+ "ogLine": "{n} poses × 5 angles", "ogSub": "Faceless mannequin line art for AI image tools",
+ "ogAlt": "Shisei: faceless mannequin pose line art, five angles per pose",
+ "poseTitle": "{name} · {cat} pose reference {id} | Shisei",
+ "poseDesc": "{cat} pose “{name}” as faceless mannequin line art in {n} angles ({views}). Use it as a pose reference in ComfyUI, Midjourney and other AI image tools.",
+ "poseOgAlt": "Line art of {id} {name}: {views}",
+ "anglesN": "{n} angles", "anglesTitle": "Five angles", "notYet": "not yet",
+ "otherNames": "Other languages", "openInGallery": "Open in gallery", "downloadView": "Download 900×1200",
+ "prevPose": "Previous pose", "nextPose": "Next pose", "related": "More in this category", "crumb": "Breadcrumb", "skip": "Skip to content",
+ "posePage": "Pose page", "share": "Share", "shareTitle": "Share this pose", "shareSite": "Share Shisei", "copyLink": "Copy link",
+ "shareText": "{name} · pose reference in five angles",
+ "nets": {"x": "X", "pinterest": "Pinterest", "reddit": "Reddit", "facebook": "Facebook"},
+ "clH1": "What's new in Shisei",
+ "clLead": "New poses, angles and gallery features, newest first. Every entry links to the page where you can see it.",
+ "clMetaTitle": "Changelog · What's new in Shisei",
+ "clMetaDesc": "Updates to Shisei, the pose reference library: new poses, angles and gallery features, newest first.",
+ "clFeed": "Shisei changelog", "subscribe": "Subscribe (Atom)", "updated": "Updated {date}", "months": "Months",
+ "filterLabel": "Filter updates", "filterAll": "All", "clEmpty": "No updates with this label yet.",
+ "tags": {"new": "New", "improve": "Improved", "announce": "Announcement", "removed": "Removed"},
+ "nfTitle": "Page not found", "nfBody": "The link may be mistyped, or the page has moved.", "backHome": "Back to the gallery"
+ },
+ "ko": {
+ "langName": "한국어", "ogLocale": "ko_KR",
+ "navPoses": "포즈", "navChangelog": "변경 내역",
+ "views": ["정면", "대각선", "옆", "위에서", "아래에서"],
+ "descLabel": "영문 포즈 설명 (프롬프트에 바로 사용)", "copy": "복사", "copied": "복사됨",
+ "footer": "모든 소재는 Shisei가 직접 만들었습니다.",
+ "metaTitle": "Shisei · {n}가지 포즈, 포즈마다 5개 앵글",
+ "metaDesc": "얼굴 없는 마네킹 선화 {n}가지 포즈. 정면·대각선·옆·위·아래 5개 앵글을 담았습니다. AI 이미지 도구의 포즈 참조용.",
+ "ogLine": "{n} 포즈 × 5 앵글", "ogSub": "얼굴 없는 마네킹 선화 · AI 이미지 도구용 포즈 참조",
+ "ogAlt": "Shisei: 얼굴 없는 마네킹 포즈 선화, 포즈마다 5개 앵글",
+ "poseTitle": "{name} · {cat} 포즈 참고 {id} | Shisei",
+ "poseDesc": "{cat} 포즈 「{name}」의 얼굴 없는 마네킹 선화. {views} {n}개 앵글. ComfyUI, Midjourney 등 AI 이미지 도구에서 포즈 참조로 바로 쓸 수 있습니다.",
+ "poseOgAlt": "{id} {name} 선화: {views}",
+ "anglesN": "{n}개 앵글", "anglesTitle": "5개 앵글", "notYet": "미수록",
+ "otherNames": "다른 언어", "openInGallery": "갤러리에서 열기", "downloadView": "900×1200 다운로드",
+ "prevPose": "이전 포즈", "nextPose": "다음 포즈", "related": "같은 분류의 포즈", "crumb": "이동 경로", "skip": "본문으로 건너뛰기",
+ "posePage": "포즈 페이지", "share": "공유", "shareTitle": "이 포즈 공유", "shareSite": "Shisei 공유", "copyLink": "링크 복사",
+ "shareText": "{name} · 5개 앵글 포즈 참고",
+ "nets": {"x": "X", "facebook": "Facebook", "pinterest": "Pinterest", "line": "LINE"},
+ "clH1": "Shisei 새 소식",
+ "clLead": "새로 추가한 포즈, 앵글, 갤러리 기능을 최신순으로 정리했습니다. 각 항목에서 바로 열어 볼 수 있습니다.",
+ "clMetaTitle": "변경 내역 · Shisei 새 소식",
+ "clMetaDesc": "포즈 참고 라이브러리 Shisei의 업데이트: 새 포즈, 앵글, 갤러리 기능을 최신순으로.",
+ "clFeed": "Shisei 변경 내역", "subscribe": "구독 (Atom)", "updated": "{date} 업데이트", "months": "월별",
+ "filterLabel": "종류별 보기", "filterAll": "전체", "clEmpty": "이 종류의 업데이트는 아직 없습니다.",
+ "tags": {"new": "신규", "improve": "개선", "announce": "공지", "removed": "삭제"},
+ "nfTitle": "페이지를 찾을 수 없습니다", "nfBody": "링크가 잘못되었거나 페이지가 이동했습니다.", "backHome": "갤러리로 돌아가기"
+ }
+}
+// END-JSON
+;
+// The gallery reads both tables through one object per language.
+if (window.I18N) for (const k in window.I18N_PAGES) Object.assign(window.I18N[k], window.I18N_PAGES[k]);
diff --git a/web/index.html b/web/index.html
index d28ca026..6c4701d0 100644
--- a/web/index.html
+++ b/web/index.html
@@ -1,27 +1,19 @@
<!doctype html>
-<html lang="zh-CN">
+<html lang="__HTMLLANG__" data-loc="__LOC__">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
-<title>Shisei 姿勢 · 73 套姿势,每套 5 个机位</title>
-<meta name="description" content="73 套无脸素体线稿,正面、斜侧、侧面、俯视、仰视五个机位,给 AI 绘图当姿势参考。">
-<meta property="og:title" content="Shisei 姿勢">
-<meta property="og:description" content="73 poses × 5 camera angles of faceless mannequin line art for AI image tools.">
+__HEAD__
<meta name="theme-color" content="#F5F2ED">
-<link rel="icon" href="favicon.svg" type="image/svg+xml">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&family=JetBrains+Mono:wght@500&display=swap">
-<link rel="stylesheet" href="app.css?v=__VERSION__">
-<script>
- // Apply the saved theme before first paint to avoid a flash.
- try { var t = localStorage.getItem('shisei.theme'); if (t) document.documentElement.dataset.theme = t; } catch (e) {}
-</script>
+<link rel="stylesheet" href="__BASE__app.css?v=__VERSION__">
</head>
<body>
-<a class="skip" href="#all">跳到姿势列表</a>
+<a class="skip" href="#all">__SKIP__</a>
-<nav class="nav wrap" aria-label="主导航">
+<nav class="nav wrap" aria-label="Shisei">
<a class="brand" href="./">
<svg class="logo" width="40" height="40" viewBox="0 0 100 100" aria-hidden="true"><rect width="100" height="100" rx="24" fill="#18181B"/><circle cx="60" cy="23" r="8" fill="none" stroke="#F5F2ED" stroke-width="6"/><path d="M57 37C38 52 42 68 64 82" fill="none" stroke="#E07A52" stroke-width="11" stroke-linecap="round"/></svg>
<span>Shisei</span>
@@ -29,7 +21,7 @@
<div class="nav-links">
<a href="#all" data-i18n="navPoses"></a>
<button type="button" class="linklike" data-open="how" data-i18n="navHow"></button>
- <a href="__REPO__/blob/main/CHANGELOG.md" data-i18n="navChangelog"></a>
+ <a href="__CHANGELOG__" data-i18n="navChangelog"></a>
</div>
<div class="nav-tools">
<label class="search">
@@ -83,6 +75,10 @@
<span class="count" id="count" aria-live="polite"></span>
</div>
<div class="filters">
+ <div class="series-row">
+ <div class="seg series" role="group" id="series"></div>
+ <button type="button" class="chip adult" id="adult" aria-pressed="false"></button>
+ </div>
<div class="cats" role="tablist" id="cats"></div>
<div class="filter-row">
<div class="inline-filters" id="inlineFilters"></div>
@@ -92,6 +88,7 @@
<div id="grid"></div>
</section>
+__NOSCRIPT__
</main>
<footer class="foot">
@@ -101,10 +98,11 @@
<strong>Shisei 姿勢</strong>
<span data-i18n="footer"></span>
</div>
- <nav class="foot-links" aria-label="页脚">
+ <nav class="foot-links" aria-label="Footer">
<a href="__REPO__">GitHub</a>
- <a href="__REPO__/blob/main/CHANGELOG.md"><span data-i18n="navChangelog"></span> v__VERSION__</a>
- <a href="catalog.json">catalog.json</a>
+ <a href="__CHANGELOG__"><span data-i18n="navChangelog"></span> v__VERSION__</a>
+ <a href="__BASE__catalog.json">catalog.json</a>
+ <button type="button" class="linklike" data-share data-share-site data-i18n="shareSite"></button>
<button type="button" class="linklike" data-open="terms" data-i18n="terms"></button>
</nav>
</div>
@@ -127,7 +125,7 @@
</div>
<div class="lb-chips" role="group" id="lbChips"></div>
<div class="seg" role="group" id="lbMedium"></div>
- <div class="lb-desc">
+ <div class="lb-desc" id="lbDescBox">
<div class="lb-desc-h"><span data-i18n="descLabel"></span><button type="button" class="pill light tiny" id="lbCopyDesc" data-i18n="copy"></button></div>
<p id="lbDesc"></p>
</div>
@@ -138,6 +136,11 @@
<button type="button" class="pill light" id="lbCopyId" data-i18n="copyId"></button>
<a class="pill light" href="__REPO__/releases/latest" data-i18n="fullZip"></a>
</div>
+ <div class="lb-row">
+ <button type="button" class="pill light" id="lbShare">
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 15V3m0 0L7.5 7.5M12 3l4.5 4.5M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7"/></svg><span data-i18n="share"></span></button>
+ <a class="pill light" id="lbPage" data-i18n="posePage"></a>
+ </div>
<p class="keys" data-i18n="keys"></p>
</div>
</aside>
@@ -165,8 +168,9 @@
<div class="toast" id="toast" role="status" aria-live="polite"></div>
<script id="catalog" type="application/json">__CATALOG__</script>
-<script>window.SHISEI = { repo: '__REPO__', version: '__VERSION__' };</script>
-<script src="i18n.js?v=__VERSION__"></script>
-<script src="app.js?v=__VERSION__"></script>
+<script>window.SHISEI = { repo: '__REPO__', version: '__VERSION__', base: '__BASE__', lang: '__LOC__' };</script>
+<script src="__BASE__i18n.js?v=__VERSION__"></script>
+<script src="__BASE__common.js?v=__VERSION__"></script>
+<script src="__BASE__app.js?v=__VERSION__"></script>
</body>
</html>