Files
SteamBase/web/static/index.html
T
2026-11-06 09:00:43 +03:00

252 lines
13 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SteamBase — библиотека и рекомендации</title>
<link rel="icon" href="/static/favicon.ico" sizes="any">
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16.png">
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
<link rel="manifest" href="/static/site.webmanifest">
<meta name="theme-color" content="#062555">
<meta name="apple-mobile-web-app-title" content="SteamBase">
<script>
try {
if (localStorage.getItem("sb.theme") === "light") document.documentElement.dataset.theme = "light";
} catch (_) {}
</script>
<link rel="stylesheet" href="/static/styles.css">
</head>
<body>
<header class="topbar">
<div class="brand">
<img class="logo" src="/static/icon-64.png" alt="" width="34" height="34">
<span>SteamBase</span>
</div>
<nav class="tabs">
<button class="tab active" data-view="library">Библиотека</button>
<button class="tab" data-view="recommend">Рекомендации</button>
</nav>
<div class="stats" id="stats"></div>
<button id="themeToggle" class="icon-btn theme-toggle" type="button"
title="Светлая тема" aria-label="Переключить тему" aria-pressed="false"
aria-keyshortcuts="t">
<svg class="icon-sun" viewBox="0 0 24 24" width="16" height="16" fill="none"
stroke="currentColor" stroke-width="1.8" stroke-linecap="round">
<circle cx="12" cy="12" r="4"/>
<path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/>
</svg>
<svg class="icon-moon" viewBox="0 0 24 24" width="16" height="16" fill="none"
stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"/>
</svg>
</button>
</header>
<div id="filtersBackdrop" class="filters-backdrop" hidden></div>
<main>
<section id="libraryView" class="layout">
<aside class="filters" id="filtersPanel" aria-label="Фильтры">
<div class="saved-views">
<select id="savedView" aria-label="Сохранённые виды">
<option value="">сохранённые виды</option>
</select>
<button id="saveView" class="icon-btn" type="button" title="Сохранить текущий вид">+</button>
<button id="deleteView" class="icon-btn" type="button" title="Удалить выбранный вид">×</button>
</div>
<div class="filter-head">
<h2>Фильтры</h2>
<div class="filter-actions">
<button id="filtersPin" class="icon-btn pin active" type="button"
title="Открепить фильтры" aria-pressed="true">
<svg viewBox="0 0 24 24" width="15" height="15" fill="none"
stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<path d="M8 3h8l-1 6 3 3v2H6v-2l3-3-1-6Z"/>
<path d="M12 14v7"/>
</svg>
</button>
<button id="filtersClose" class="icon-btn drawer-close" type="button" title="Закрыть фильтры">×</button>
<button id="resetFilters" class="link">сбросить</button>
</div>
</div>
<label class="field">
<span>Статус</span>
<select id="fStatus">
<option value="">любой</option>
<option value="backlog">в бэклоге</option>
<option value="playing">играю</option>
<option value="played">играл</option>
<option value="nostalgia">в память</option>
<option value="tribute">дань уважения</option>
<option value="ignore">скрытые</option>
</select>
</label>
<div class="field">
<span>Жанры</span>
<details class="multi-select" id="genreSelect">
<summary class="multi-toggle" id="genreSummary">любой</summary>
<div class="multi-list" id="genreOptions"></div>
</details>
</div>
<div class="field">
<span>Теги</span>
<details class="multi-select" id="tagSelect">
<summary class="multi-toggle" id="tagSummary">любой</summary>
<div class="multi-list" id="tagOptions"></div>
</details>
</div>
<label class="check"><input type="checkbox" id="fInstalled"> установленные</label>
<label class="check"><input type="checkbox" id="fUnplayed"> не запускались</label>
<label class="check"><input type="checkbox" id="fFavorite"> избранные</label>
<div class="field">
<span>Часы</span>
<div class="range-row">
<input id="fHoursMin" type="number" min="0" step="1" placeholder="от" data-filter="minHours" aria-label="Минимум часов">
<input id="fHoursMax" type="number" min="0" step="1" placeholder="до" data-filter="maxHours" aria-label="Максимум часов">
</div>
</div>
<div class="field">
<span>Год</span>
<div class="range-row">
<input id="fYearMin" type="number" min="1970" max="2100" step="1" placeholder="от" data-filter="minYear" aria-label="Минимальный год">
<input id="fYearMax" type="number" min="1970" max="2100" step="1" placeholder="до" data-filter="maxYear" aria-label="Максимальный год">
</div>
</div>
<div class="field">
<span>Отзывы, %</span>
<div class="range-row">
<input id="fReviewMin" type="number" min="0" max="100" step="1" placeholder="от" data-filter="minReview" aria-label="Минимум процента отзывов">
<input id="fReviewMax" type="number" min="0" max="100" step="1" placeholder="до" data-filter="maxReview" aria-label="Максимум процента отзывов">
</div>
</div>
<div class="maintenance" id="maintenance">
<button class="maintenance-toggle" id="maintenanceToggle" type="button"
aria-expanded="false" aria-controls="maintenanceBody">
<span class="maintenance-title">
<svg viewBox="0 0 24 24" width="15" height="15" fill="none"
stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<path d="M14.7 6.3a4 4 0 0 0-5.4 5.4L4 17v3h3l5.3-5.3a4 4 0 0 0 5.4-5.4l-2.2 2.2-2-2 2.2-2.2Z"/>
</svg>
Сервис и перевод
</span>
<svg class="chev" viewBox="0 0 24 24" width="16" height="16" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 9l6 6 6-6"/>
</svg>
</button>
<div class="maintenance-body" id="maintenanceBody" inert aria-hidden="true">
<div class="maintenance-inner details-progress">
<div class="dp-head">Описания <span id="dpCount"></span></div>
<div class="bar"><i id="dpBar"></i></div>
<div class="dp-note" id="dpNote"></div>
<button id="prefetch" class="link">догрузить / повторить</button>
<div class="dp-head translate-head">Перевод <span id="trCount"></span></div>
<div class="bar"><i id="trBar"></i></div>
<div class="dp-note" id="trNote"></div>
<button id="translate" class="link">перевести кратко</button>
<button id="translateAbout" class="link">полные описания</button>
<div class="refresh-block">
<div class="dp-head">База игр</div>
<div class="refresh-actions">
<button id="refreshInc" class="ghost">инкрементально</button>
<button id="refreshFull" class="ghost">полностью</button>
<button id="backup" class="ghost" type="button">скачать копию БД</button>
</div>
<div class="refresh-actions">
<button id="jobCancel" class="ghost" type="button" hidden>отменить задачу</button>
<button id="jobRetry" class="ghost" type="button" hidden>повторить</button>
</div>
<div class="dp-note" id="jobStatus"></div>
</div>
</div>
</div>
</div>
</aside>
<div class="content">
<div class="toolbar">
<button id="filtersToggle" class="icon-btn" type="button" title="Скрыть фильтры"
aria-controls="filtersPanel" aria-expanded="true" aria-keyshortcuts="f">
<svg viewBox="0 0 24 24" width="18" height="18" fill="none"
stroke="currentColor" stroke-width="1.8" stroke-linecap="round">
<path d="M4 7h16M4 12h16M4 17h16"/>
<circle cx="9" cy="7" r="2.2" fill="var(--bg)"/>
<circle cx="15" cy="12" r="2.2" fill="var(--bg)"/>
<circle cx="8" cy="17" r="2.2" fill="var(--bg)"/>
</svg>
</button>
<input id="search" type="search" placeholder="Поиск: название, описание, тег…" autocomplete="off"
aria-keyshortcuts="/">
<select id="sort">
<option value="name">по названию</option>
<option value="hours">по времени</option>
<option value="review" selected>по отзывам</option>
<option value="year">по году</option>
<option value="added">по добавлению</option>
</select>
<button id="layoutToggle" class="ghost toolbar-select" type="button"
aria-pressed="false" title="Компактный список" aria-keyshortcuts="g">список</button>
<button id="selectMode" class="ghost toolbar-select" type="button">выбрать</button>
<span class="count" id="count" aria-live="polite"></span>
</div>
<div class="bulk-bar" id="bulkBar" hidden>
<b id="bulkCount" aria-live="polite">0 выбрано</b>
<select id="bulkStatus" aria-label="Статус для выбранных">
<option value="">статус…</option>
<option value="backlog">в бэклоге</option>
<option value="playing">играю</option>
<option value="played">играл</option>
<option value="nostalgia">в память</option>
<option value="tribute">дань уважения</option>
<option value="ignore">скрытые</option>
</select>
<button id="bulkFavorite" class="ghost" type="button">в избранное</button>
<button id="bulkUnfavorite" class="ghost" type="button">из избранного</button>
<button id="bulkHide" class="ghost" type="button">скрыть</button>
<button id="bulkClear" class="link" type="button">снять выбор</button>
</div>
<div id="grid" class="grid"></div>
<button id="more" class="more hidden">Показать ещё</button>
</div>
</section>
<section id="recommendView" class="hidden">
<div class="mood-panel">
<div>
<h1>Что хочется сейчас?</h1>
<p class="muted">Выбери профиль или опиши словами — подберу из твоей библиотеки.</p>
</div>
<div id="moodChips" class="chips"></div>
<textarea id="moodText" rows="2" placeholder="например: приключение, рпг, прокачка группы, подземелья"></textarea>
<div class="options">
<label class="check"><input type="checkbox" id="optUnplayed" checked> только неигранное</label>
<label class="check"><input type="checkbox" id="optTribute"> учитывать tribute</label>
<label class="check"><input type="checkbox" id="optNostalgia"> учитывать nostalgia</label>
<label class="range">мин. отзывы <input type="range" id="optReview" min="0" max="95" step="5" value="65"><b id="optReviewVal">65%</b></label>
</div>
<button id="recommendBtn" class="primary">Подобрать</button>
</div>
<div id="recoSummary" class="reco-summary hidden"></div>
<div id="recoGrid" class="grid"></div>
</section>
</main>
<dialog id="modal" class="modal">
<div id="modalBody"></div>
</dialog>
<script src="/static/app.js"></script>
</body>
</html>