Add hash routing and Dota 2 logo to relations preview.

- New web/relations/router.js (parseHash/serializeHash/installRouter):
  top tabs, hero + detail sub-tab, item, patch version, tag filters and
  search query all sync to URL (#/heroes/axe/core, ?tags=...&q=...);
  pushState for discrete picks, replaceState for debounced search.
- export_relations_site.py copies router.js so static export deep-links.
- Header shows dota2_logo.png + title, served via /ui-icon/ whitelist.
- fetch_dota2_logo.py fetches the transparent emblem asset.
- Docs: CHANGELOG / README / DESIGN / AGENTS updated.
This commit is contained in:
voson
2026-07-27 13:09:14 +08:00
parent a91789b72f
commit 1d0428b4a3
13 changed files with 10306 additions and 17 deletions
+1 -1
View File
@@ -448,7 +448,7 @@ class Handler(BaseHTTPRequestHandler):
return
if path.startswith("/ui-icon/"):
key = path[len("/ui-icon/") :]
if key not in ("cooldown.png",):
if key not in ("cooldown.png", "dota2_logo.png"):
self._json(400, {"error": "bad ui icon"})
return
fpath = UI_ICONS / key