feat: add table sorting, accessibility and session filters
CI / test (push) Successful in 3m18s

This commit is contained in:
strsv committed 2026-11-06 19:20:18 +03:00
1 parent a6db306847
commit 7e4fa74cd6
13 files changed
+363 -63

No files matched your search

+29 -14
View File
@@ -9,7 +9,7 @@
<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 id="themeColor" name="theme-color" content="#090c12">
<meta name="apple-mobile-web-app-title" content="SteamBase">
<script>
try {
@@ -19,14 +19,17 @@ try {
<link rel="stylesheet" href="/static/styles.css">
</head>
<body>
<a class="skip-link" href="#main">Перейти к содержимому</a>
<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 class="tabs" role="tablist" aria-label="Разделы">
<button class="tab active" id="tabLibrary" role="tab" data-view="library"
aria-selected="true" aria-controls="libraryView" tabindex="0">Библиотека</button>
<button class="tab" id="tabRecommend" role="tab" data-view="recommend"
aria-selected="false" aria-controls="recommendView" tabindex="-1">Рекомендации</button>
</nav>
<div class="stats" id="stats"></div>
<button id="themeToggle" class="icon-btn theme-toggle" type="button"
@@ -45,29 +48,33 @@ try {
</header>
<div id="filtersBackdrop" class="filters-backdrop" hidden></div>
<main>
<section id="libraryView" class="layout">
<main id="main">
<h1 class="visually-hidden">SteamBase — библиотека игр и рекомендации</h1>
<section id="libraryView" class="layout" role="tabpanel" aria-labelledby="tabLibrary">
<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>
<button id="saveView" class="icon-btn" type="button" title="Сохранить текущий вид"
aria-label="Сохранить текущий вид">+</button>
<button id="deleteView" class="icon-btn" type="button" title="Удалить выбранный вид"
aria-label="Удалить выбранный вид">×</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">
title="Открепить фильтры" aria-label="Открепить фильтры" 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="filtersClose" class="icon-btn drawer-close" type="button"
title="Закрыть фильтры" aria-label="Закрыть фильтры">×</button>
<button id="resetFilters" class="link">сбросить</button>
</div>
</div>
@@ -197,8 +204,8 @@ try {
</svg>
</button>
<input id="search" type="search" placeholder="Поиск: название, описание, тег…" autocomplete="off"
aria-keyshortcuts="/">
<select id="sort">
aria-label="Поиск по библиотеке" aria-keyshortcuts="/">
<select id="sort" aria-label="Сортировка">
<option value="name">по названию</option>
<option value="hours">по времени</option>
<option value="review" selected>по отзывам</option>
@@ -232,7 +239,7 @@ try {
</div>
</section>
<section id="recommendView" class="hidden">
<section id="recommendView" class="hidden" role="tabpanel" aria-labelledby="tabRecommend">
<div class="mood-panel">
<div>
<h1>Что хочется сейчас?</h1>
@@ -245,6 +252,14 @@ try {
<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>
<label class="range">время
<select id="optSession" aria-label="Доступное время">
<option value="">любое</option>
<option value="short">30 минут</option>
<option value="evening">вечер</option>
<option value="weekend">выходные</option>
</select>
</label>
</div>
<button id="recommendBtn" class="primary">Подобрать</button>
</div>
@@ -253,7 +268,7 @@ try {
</section>
</main>
<dialog id="modal" class="modal">
<dialog id="modal" class="modal" aria-labelledby="modalTitle">
<div id="modalBody"></div>
</dialog>