From 7c9e54e5eb8e43a51180dc5bcff8baa790b698f2 Mon Sep 17 00:00:00 2001 From: voson Date: Thu, 30 Jul 2026 07:25:04 +0800 Subject: [PATCH] v0.6.0: mark Climperor Web shell and SEO milestone. Brand title uses self-hosted Noto Serif SC; document minor vs patch SITE_VERSION bumps. Co-authored-by: Cursor --- AGENTS.md | 2 +- CHANGELOG.md | 7 +++++++ DESIGN.md | 13 +++++++++++-- web/export_relations_site.py | 5 ++++- web/frontend/_headers | 3 +++ web/frontend/config.js | 2 +- web/frontend/fonts/noto-serif-sc-brand-700.woff2 | Bin 0 -> 1308 bytes web/frontend/index.html | 10 +++++----- web/frontend/style.css | 13 +++++++++++++ 9 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 web/frontend/fonts/noto-serif-sc-brand-700.woff2 diff --git a/AGENTS.md b/AGENTS.md index 5e3929b..65a5986 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -224,7 +224,7 @@ python pc/evaluate.py - 改 GSI cfg 时同步核对 `pc/gsi_setup.py` 与 Dota `gamestate_integration` 目录。 - 改 Web 路由形态(URL 段 / query 参数 / 默认值)时同步 `web/frontend/router.js`(`parseHash` / `serializeHash`)与 `app.js` 的 `applyPatch` 校验;新增可路由状态维度时在两处都加,并在 `syncStateToUrl` 调用点(含搜索 debounce)接好。History 深度链接依赖 `web/frontend/_redirects`(Cloudflare)与 `web/serve_relations.py` 的 SPA fallback;预渲染路径变更时同步 `web/seo_prerender.py` 与导出文件列表(含 `router.js` / `_redirects` / `robots.txt`)。 - 改 `shared/data/heroes.json` 结构时同步 `shared/grid.py`(依赖 `attr` / `name_loc`);`roles` 供 `pc/overlay.py` 使用;`aliases` 为中文口语/俗称(勿与 `name_loc` 重复),重跑 `pc/fetch_cdn_templates.py` 会按 `key` 合并保留;`tags` 为中文定位(核心/辅助/…/幻象,由 `roles`+幻想系推导),上分帝 Web 筛选 + 局内 `draft_archetypes` 缺口/推进画像共用;基础属性/血蓝等数值字段供上分帝 Web 详情条,勿塞机制文案。 -- 发版上分帝 Web 时同步 bump `web/export_relations_site.py` 的 `SITE_VERSION`、`web/frontend/config.js` 的同名变量,以及 `index.html` 里 `style.css`/`mobile-gate.js`/`config.js`/`router.js`/`app.js` 的 `?v=` 缓存戳;并写 `CHANGELOG.md`。 +- 发版上分帝 Web 时同步 bump `web/export_relations_site.py` 的 `SITE_VERSION`、`web/frontend/config.js` 的同名变量,以及 `index.html` 里 `style.css`/`mobile-gate.js`/`config.js`/`router.js`/`app.js` 的 `?v=` 缓存戳;并写 `CHANGELOG.md`。`SITE_VERSION` 语义:末位 = 增量 UI/修复;中段 = 壳层 / 路由 / 可索引或其它阶段性能力成型(如 `0.5.x` → `0.6.0`);数据-only 刷新不 bump。 - 不要重新引入 real 模板双层库、`cdn_penalty`、`build_library.py`。 ## 文档分工 diff --git a/CHANGELOG.md b/CHANGELOG.md index e316b43..cef2406 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ ## [Unreleased] +## [0.6.0] - 2026-07-30 + +### Changed + +- 站点版本升至 **0.6.0**:汇总 `0.5.x` 已成型能力——History 路径路由与 SEO/GEO 预渲染、设计令牌与顶栏壳、英雄页定位/详情布局、主播多平台与直播探测纠偏、monorepo 与刷新部署可靠性。此后增量 UI/文案仍抬末位;壳层、路由或可索引能力等阶段性成型再抬中段。 +- 顶栏品牌「上分帝」改用思源宋体(Noto Serif SC)子集,气质更贴「帝」;正文仍为系统无衬线。 + ## [0.5.115] - 2026-07-30 ### Added diff --git a/DESIGN.md b/DESIGN.md index 170b3e9..a60c3ff 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -23,6 +23,12 @@ colors: panel-soft: "rgba(8, 12, 20, 0.55)" on-accent: "#0B0D10" typography: + brand: + fontFamily: "Noto Serif SC, Songti SC, STSong, SimSun, serif" + fontSize: 18px + fontWeight: 700 + lineHeight: 1.3 + letterSpacing: 0.16em display: fontFamily: "Segoe UI, Microsoft YaHei UI, PingFang SC, sans-serif" fontSize: 32px @@ -208,10 +214,13 @@ components: ## Typography -系统栈:`Segoe UI` + `Microsoft YaHei UI` + `PingFang SC`。中文优先清晰,不引入展示性装饰字体。 +系统栈:`Segoe UI` + `Microsoft YaHei UI` + `PingFang SC`。正文与控件优先清晰,不引入全站装饰字体。 + +品牌例外:顶栏 / 移动端门禁的「上分帝」使用 `brand`(自托管 Noto Serif SC 子集,仅 U+4E0A / U+5206 / U+5E1D),宋体气质贴合「帝」字;正文仍走系统无衬线栈。禁止把衬线栈扩到导航、页标题或表格。 | Token | 用途 | |-------|------| +| `brand` | 仅品牌字标「上分帝」(顶栏 + mobile-gate) | | `display` | 版本号等少数展示数字(约 32px,勿再放大到 40px) | | `page-title` | 各顶层页标题(排行 / 走势 / 机制 / 主播 / 物品等) | | `title-lg` / `title-md` | 区段标题、英雄名、物品名 | @@ -340,4 +349,4 @@ Valve 图标。支持多选筛选(`active`);选中英雄时,其定位以 - Don't 把直播粉、胜负红、金价黄当作通用 CTA。 - Don't 为真移动端在现有碎片 `@media` 上硬撑;门禁解除前保持桌面壳。 - Do 保持英雄底栏固定高与列表页整板滚动两种壳模型,勿发明第三种。 -- Don't 在 data-only 刷新里 bump `SITE_VERSION`;视觉发版才同步 config / export / `?v=` 缓存戳。 +- Don't 在 data-only 刷新里 bump `SITE_VERSION`;视觉发版才同步 config / export / `?v=` 缓存戳。末位用于增量改动;中段留给壳层 / 路由 / 可索引等阶段性成型(见 `AGENTS.md`)。 diff --git a/web/export_relations_site.py b/web/export_relations_site.py index c27694f..68b51b2 100644 --- a/web/export_relations_site.py +++ b/web/export_relations_site.py @@ -56,7 +56,7 @@ from shared.paths import ( from seo_prerender import DEFAULT_SITE_ORIGIN, write_seo_bundle from serve_relations import WEB_DIR, build_payload -SITE_VERSION = "0.5.115" +SITE_VERSION = "0.6.0" DEFAULT_OSS_BASE = "https://climperor.oss-cn-shanghai.aliyuncs.com" @@ -221,6 +221,9 @@ def main() -> None: src = WEB_DIR / name if src.is_file(): shutil.copy2(src, out / name) + fonts_src = WEB_DIR / "fonts" + if fonts_src.is_dir(): + shutil.copytree(fonts_src, out / "fonts") # Cloudflare Pages Functions (functions/api/*.js -> /api/*). functions_src = WEB_DIR / "functions" n_functions = 0 diff --git a/web/frontend/_headers b/web/frontend/_headers index 4633a04..be1d552 100644 --- a/web/frontend/_headers +++ b/web/frontend/_headers @@ -21,3 +21,6 @@ /style.css Cache-Control: public, max-age=300, must-revalidate + +/fonts/* + Cache-Control: public, max-age=31536000, immutable diff --git a/web/frontend/config.js b/web/frontend/config.js index 38f3c53..6900616 100644 --- a/web/frontend/config.js +++ b/web/frontend/config.js @@ -1,5 +1,5 @@ /* Local defaults; production export overwrites via export_relations_site.py. */ -var SITE_VERSION = "0.5.115"; +var SITE_VERSION = "0.6.0"; var SITE_ORIGIN = ""; var ABILITY_VIDEO_BASE = ""; var STATIC_ASSET_BASE = ""; diff --git a/web/frontend/fonts/noto-serif-sc-brand-700.woff2 b/web/frontend/fonts/noto-serif-sc-brand-700.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..02300fd714614b329ad950019a9be8fccdf82a28 GIT binary patch literal 1308 zcmV+%1>^d6Pew8T0RR9100kTX5dZ)H00^J}00h7Q0RR9100000000000000000000 z0000R9vnahU_Vn-K~yRLOc4kQhCGE83k(1OHUcCA5Ck9vgct`P39n7>yU}h~F{M(H2RY?I=}AnQ`!MtKm(z{{&L;r>aqC@UZ@N3GO&-u580J$G;)b!y ziHlSv-whfU8s7wjOgu2o{8VBe`7P@hW zLD<%I3qgT`GKVeT*Vrzai&Tb>PX2lHzujM8R&OOB1_NXWcn-q~=1lXyhvYP{F;xN$ zzs@o=P16F7Q%EFs3@4XxoQ$#NB*g*+zoS*!+$@+WYiZ%P&M8)_o%w7fSGwrn#j7rA zR@@{jU3Bnj_yqYJ^#KbzolaM5qIqF6HC19>q}H%nt+vQauh*BB@6ysA);mcGi`5zv ztyb%PK+A63VK(w8giPMO%dIgV)$2<+NUi4Rbw{@yIODlv%CqdGPV25dbIEGrxZCLQ z(^kD|4SV3l3wL&_UTdNU4(<-rL<88lK z%N6hpjH#@7vBV~|d;a?RY+J8`nY*WD41eu(a=0(uRb=dxIykz0X_NP?%%~YV3l5uR z?%JAc+7r-I-oBx}-D7)8%=E<}OXPDcJl<`uD0cseH`nBZW9L3~ys=6&_T;;>E|Nu` zB#6x)eQVk%+skx>+Ssmv#p&WWI@99M@b^F873Ud0_=DM2euG6~{WpUF{ae>`|NXU_ z_o`wKD@D-ak3N+gF-=pXRW~tlk`%wCJG_2e%G#C1gw8~N&O&LdMe>{zs(0S&XicJj zl9(#0mnBXP8~NL6Z5_@=3>GIx{520M3-8p3*R-;^WMK= zZmQgLg!kg9g(5Qmv;8mG+ywAmuTi-B=*maWYGqNs32FMvCz$&9{;n(DtuF^Y_*e4J z*IbW43IhI{z#Zbug8x5;6S)ijO8!gadTu+?(Ga_v@Haqz2|HNAqO!)LIuQF$bi_dx z^Iw{S5#dM~Nr(&tR>a*vK}eJa8d3Pvz`z+d3_R4JA89iuW>K+WC3+-skTpmO-e9?;mv?2$+7*gbgXvP5A z(ZY5o!UqZHMHiY-QX~v=Xn^~aP{9}e@JAqgkcI$6qOCJDRteKNCV*Itk?2M}Ix#|p z7BpifBHbZm2zKI8B?n4QtL!q_;!=@|T%;m$;jGu=6eV{w!ecqD{s=%Qe1d=qL9jI* zP3T3#a&7KMOBl>BV!o)a2H))$y5R>8EYS~SoZ&1~(63z}hGi$1bs%z(U;h{1N1Z|T SUqZ(lCJ?9u-3K3-!yEu)e`GHJ literal 0 HcmV?d00001 diff --git a/web/frontend/index.html b/web/frontend/index.html index a0b6fa0..610fb33 100644 --- a/web/frontend/index.html +++ b/web/frontend/index.html @@ -43,8 +43,8 @@ } - - + +

DOTA2 上分帝

@@ -232,8 +232,8 @@
- - - + + + diff --git a/web/frontend/style.css b/web/frontend/style.css index a118904..4fc9e06 100644 --- a/web/frontend/style.css +++ b/web/frontend/style.css @@ -19,6 +19,8 @@ /* Typography */ --font: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif; + /* Brand mark only (「上分帝」); self-hosted Noto Serif SC subset */ + --font-brand: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif; --fs-display: 32px; --fs-page: 22px; --fs-title-lg: 18px; @@ -65,6 +67,15 @@ --focus-ring: 2px solid var(--sel); } +@font-face { + font-family: "Noto Serif SC"; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url("/fonts/noto-serif-sc-brand-700.woff2") format("woff2"); + unicode-range: U+4E0A, U+5206, U+5E1D; /* 上分帝 */ +} + * { box-sizing: border-box; } html, body { margin: 0; @@ -196,6 +207,7 @@ body { display: block; } .brand-title { + font-family: var(--font-brand); font-size: var(--fs-title-lg); font-weight: var(--fw-bold); letter-spacing: 0.16em; @@ -4079,6 +4091,7 @@ html.mobile-client #mobile-gate { display: block; } .mobile-gate-brand-title { + font-family: var(--font-brand); font-size: var(--fs-title-lg); font-weight: var(--fw-bold); letter-spacing: 0.16em;