feat: group library filters into accordions
Split the sidebar into status, genres/tags and metrics collapsible groups.
This commit is contained in:
1 parent
f73ed63b2b
commit
b65396421c
2 files changed
+53
-14
No files matched your search
+29
-14
@@ -89,6 +89,9 @@ try {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<details class="filter-group" open>
|
||||
<summary>Статус и прохождение</summary>
|
||||
<div class="filter-group-body">
|
||||
<label class="field">
|
||||
<span>Статус</span>
|
||||
<select id="fStatus">
|
||||
@@ -111,6 +114,25 @@ try {
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<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>
|
||||
|
||||
<label class="field">
|
||||
<span>Длина игры</span>
|
||||
<select id="fDuration">
|
||||
<option value="">любая</option>
|
||||
<option value="short">до 8 ч</option>
|
||||
<option value="medium">8–25 ч</option>
|
||||
<option value="long">больше 25 ч</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details class="filter-group" open>
|
||||
<summary>Жанры и теги</summary>
|
||||
<div class="filter-group-body">
|
||||
<div class="field">
|
||||
<span>Жанры</span>
|
||||
<details class="multi-select" id="genreSelect">
|
||||
@@ -126,21 +148,12 @@ try {
|
||||
<div class="multi-list" id="tagOptions"></div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<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>
|
||||
|
||||
<label class="field">
|
||||
<span>Длина игры</span>
|
||||
<select id="fDuration">
|
||||
<option value="">любая</option>
|
||||
<option value="short">до 8 ч</option>
|
||||
<option value="medium">8–25 ч</option>
|
||||
<option value="long">больше 25 ч</option>
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<details class="filter-group" open>
|
||||
<summary>Метрики</summary>
|
||||
<div class="filter-group-body">
|
||||
<div class="field">
|
||||
<span>Часы</span>
|
||||
<div class="range-row">
|
||||
@@ -162,6 +175,8 @@ try {
|
||||
<input id="fReviewMax" type="number" min="0" max="100" step="1" placeholder="до" data-filter="maxReview" aria-label="Максимум процента отзывов">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
|
||||
</aside>
|
||||
|
||||
@@ -275,6 +275,30 @@ body.drawer-open { overflow: hidden; }
|
||||
.field { display: flex; flex-direction: column; gap: 6px; }
|
||||
.field span { font-size: 12px; color: var(--muted); }
|
||||
|
||||
.filter-group {
|
||||
padding: 0 10px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
background: rgba(255, 255, 255, .015);
|
||||
}
|
||||
.filter-group summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 9px 0;
|
||||
cursor: pointer;
|
||||
font-size: 11.5px;
|
||||
font-weight: 650;
|
||||
letter-spacing: .05em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
list-style: none;
|
||||
}
|
||||
.filter-group summary::-webkit-details-marker { display: none; }
|
||||
.filter-group summary::after { content: "+"; font-size: 14px; color: var(--muted); }
|
||||
.filter-group[open] summary::after { content: "−"; }
|
||||
.filter-group-body { display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; }
|
||||
|
||||
select, input[type="search"], input[type="number"], textarea {
|
||||
width: 100%;
|
||||
border: 1px solid var(--border);
|
||||
|
||||
Reference in new issue
Block a user