feat: add help page and polish UI details

Add a searchable ? help page, hide HLTB retry after success, scroll the whole game modal with a capped addons block, and give the friend comparison more height.
This commit is contained in:
strsv committed 2026-11-07 05:43:24 +03:00
1 parent eb7ce10f82
commit 4428d86f91
4 files changed
+341 -8

No files matched your search

+18 -1
View File
@@ -15,7 +15,7 @@
try {
if (localStorage.getItem("sb.theme") === "light") document.documentElement.dataset.theme = "light";
const view = new URLSearchParams(location.search).get("view");
if (["recommend", "hltb", "friends", "services"].includes(view)) {
if (["recommend", "hltb", "friends", "services", "help"].includes(view)) {
document.documentElement.dataset.view = view;
}
} catch (_) {}
@@ -40,6 +40,9 @@ try {
aria-selected="false" aria-controls="friendsView" tabindex="-1">Друзья</button>
<button class="tab" id="tabServices" role="tab" data-view="services"
aria-selected="false" aria-controls="servicesView" tabindex="-1">Сервисы</button>
<button class="tab" id="tabHelp" role="tab" data-view="help"
aria-selected="false" aria-controls="helpView" tabindex="-1"
title="Справка" aria-label="Справка">?</button>
</nav>
<div class="stats" id="stats"></div>
<button id="themeToggle" class="icon-btn theme-toggle" type="button"
@@ -520,6 +523,20 @@ try {
</div>
</div>
</section>
<section id="helpView" class="hidden" role="tabpanel" aria-labelledby="tabHelp">
<div class="help-page">
<div class="hltb-head">
<h1>Справка</h1>
<input id="helpSearch" type="search" placeholder="Поиск по справке…"
aria-label="Поиск по справке" autocomplete="off">
</div>
<div class="help-layout">
<nav class="help-toc" id="helpToc" aria-label="Содержание справки"></nav>
<div class="help-content" id="helpContent"></div>
</div>
</div>
</section>
</main>
<dialog id="hltbMatchDialog" class="modal small" aria-labelledby="hltbMatchTitle">