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
+1 -1
View File
@@ -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.6.0"
SITE_VERSION = "0.6.1"
DEFAULT_OSS_BASE = "https://climperor.oss-cn-shanghai.aliyuncs.com"
+12
View File
@@ -2928,6 +2928,18 @@ function renderDetail() {
title.className = "detail-name";
title.textContent = hero.name_loc || hero.key;
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);
const tabDefs = [
+1 -1
View File
@@ -1,5 +1,5 @@
/* 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 ABILITY_VIDEO_BASE = "";
var STATIC_ASSET_BASE = "";
+5 -5
View File
@@ -43,8 +43,8 @@
}
</script>
<link rel="icon" href="/ui-icon/dota2_logo.png" type="image/png" />
<link rel="stylesheet" href="/style.css?v=0.6.0" />
<script src="/mobile-gate.js?v=0.6.0"></script>
<link rel="stylesheet" href="/style.css?v=0.6.1" />
<script src="/mobile-gate.js?v=0.6.1"></script>
</head>
<body>
<h1 class="sr-only">DOTA2 上分帝</h1>
@@ -232,8 +232,8 @@
<section class="detail" id="detail" aria-live="polite"></section>
<script src="/config.js?v=0.6.0"></script>
<script src="/router.js?v=0.6.0"></script>
<script src="/app.js?v=0.6.0"></script>
<script src="/config.js?v=0.6.1"></script>
<script src="/router.js?v=0.6.1"></script>
<script src="/app.js?v=0.6.1"></script>
</body>
</html>
+9
View File
@@ -1090,11 +1090,20 @@ body {
pointer-events: none;
}
.detail-name {
margin: 0;
font-size: var(--fs-title-lg);
font-weight: var(--fw-bold);
line-height: var(--lh-title);
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. */
.detail-skills-layout,
.detail-items-layout {