v0.6.1: show hero English name and abbr on detail page.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
voson
2026-07-30 07:33:48 +08:00
co-authored by Cursor
parent 7c9e54e5eb
commit 1aa6710e39
6 changed files with 34 additions and 7 deletions
+6
View File
@@ -4,6 +4,12 @@
## [Unreleased] ## [Unreleased]
## [0.6.1] - 2026-07-30
### Added
- 英雄详情标题下显示英文名与缩写(如 `Anti-Mage · AM`;无缩写时仅英文名)。
## [0.6.0] - 2026-07-30 ## [0.6.0] - 2026-07-30
### Changed ### Changed
+1 -1
View File
@@ -56,7 +56,7 @@ from shared.paths import (
from seo_prerender import DEFAULT_SITE_ORIGIN, write_seo_bundle from seo_prerender import DEFAULT_SITE_ORIGIN, write_seo_bundle
from serve_relations import WEB_DIR, build_payload from serve_relations import WEB_DIR, build_payload
SITE_VERSION = "0.6.0" SITE_VERSION = "0.6.1"
DEFAULT_OSS_BASE = "https://climperor.oss-cn-shanghai.aliyuncs.com" DEFAULT_OSS_BASE = "https://climperor.oss-cn-shanghai.aliyuncs.com"
+12
View File
@@ -2928,6 +2928,18 @@ function renderDetail() {
title.className = "detail-name"; title.className = "detail-name";
title.textContent = hero.name_loc || hero.key; title.textContent = hero.name_loc || hero.key;
head.appendChild(title); head.appendChild(title);
const enParts = [];
if (hero.name) enParts.push(hero.name);
const abbrs = (hero.abbr || []).map((a) => String(a || "").trim()).filter(Boolean);
if (abbrs.length) {
enParts.push(abbrs.map((a) => a.toUpperCase()).join(" / "));
}
if (enParts.length) {
const meta = document.createElement("p");
meta.className = "detail-name-meta";
meta.textContent = enParts.join(" · ");
head.appendChild(meta);
}
root.appendChild(head); root.appendChild(head);
const tabDefs = [ const tabDefs = [
+1 -1
View File
@@ -1,5 +1,5 @@
/* Local defaults; production export overwrites via export_relations_site.py. */ /* Local defaults; production export overwrites via export_relations_site.py. */
var SITE_VERSION = "0.6.0"; var SITE_VERSION = "0.6.1";
var SITE_ORIGIN = ""; var SITE_ORIGIN = "";
var ABILITY_VIDEO_BASE = ""; var ABILITY_VIDEO_BASE = "";
var STATIC_ASSET_BASE = ""; var STATIC_ASSET_BASE = "";
+5 -5
View File
@@ -43,8 +43,8 @@
} }
</script> </script>
<link rel="icon" href="/ui-icon/dota2_logo.png" type="image/png" /> <link rel="icon" href="/ui-icon/dota2_logo.png" type="image/png" />
<link rel="stylesheet" href="/style.css?v=0.6.0" /> <link rel="stylesheet" href="/style.css?v=0.6.1" />
<script src="/mobile-gate.js?v=0.6.0"></script> <script src="/mobile-gate.js?v=0.6.1"></script>
</head> </head>
<body> <body>
<h1 class="sr-only">DOTA2 上分帝</h1> <h1 class="sr-only">DOTA2 上分帝</h1>
@@ -232,8 +232,8 @@
<section class="detail" id="detail" aria-live="polite"></section> <section class="detail" id="detail" aria-live="polite"></section>
<script src="/config.js?v=0.6.0"></script> <script src="/config.js?v=0.6.1"></script>
<script src="/router.js?v=0.6.0"></script> <script src="/router.js?v=0.6.1"></script>
<script src="/app.js?v=0.6.0"></script> <script src="/app.js?v=0.6.1"></script>
</body> </body>
</html> </html>
+9
View File
@@ -1090,11 +1090,20 @@ body {
pointer-events: none; pointer-events: none;
} }
.detail-name { .detail-name {
margin: 0;
font-size: var(--fs-title-lg); font-size: var(--fs-title-lg);
font-weight: var(--fw-bold); font-weight: var(--fw-bold);
line-height: var(--lh-title); line-height: var(--lh-title);
letter-spacing: 0.04em; letter-spacing: 0.04em;
} }
.detail-name-meta {
margin: 0;
color: var(--muted);
font-size: var(--fs-label);
font-weight: var(--fw-medium);
letter-spacing: 0.06em;
line-height: var(--lh-tight);
}
/* Skills / items tab bodies fill remaining #detail height under head+tabs. */ /* Skills / items tab bodies fill remaining #detail height under head+tabs. */
.detail-skills-layout, .detail-skills-layout,
.detail-items-layout { .detail-items-layout {