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 0000000..02300fd Binary files /dev/null and b/web/frontend/fonts/noto-serif-sc-brand-700.woff2 differ 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 @@ } - - + +