added city filter

This commit is contained in:
SlimusMinus
2026-08-05 00:40:34 +03:00
parent 677a967ebb
commit a5b566815b
2 changed files with 215 additions and 25 deletions

View File

@@ -122,6 +122,127 @@
font-weight: 700;
}
/* ── City Multiselect ── */
.f-city-filter-wrap {
position: relative; z-index: 20;
display: flex; align-items: center;
padding: 10px 16px;
border-bottom: 1px solid var(--border);
background: var(--bg-filter); backdrop-filter: blur(8px);
}
.f-city-multiselect {
position: relative; flex: 1;
width: 100%; max-width: 440px; margin: 0 auto;
}
.f-city-ms-control {
display: flex; align-items: center; gap: 8px;
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: 12px;
padding: 8px 12px;
min-height: 44px;
cursor: text;
transition: border-color .2s, box-shadow .2s;
}
.f-city-ms-control.open {
border-color: rgba(var(--teal-rgb), .5);
box-shadow: 0 0 0 3px rgba(var(--teal-rgb), .12);
}
.f-city-ms-icon {
width: 18px; height: 18px; flex-shrink: 0; color: var(--muted);
}
.f-city-ms-tags {
display: flex; flex-wrap: wrap; gap: 6px;
flex: 1; min-width: 0; align-items: center;
}
.f-city-ms-tag {
display: inline-flex; align-items: center; gap: 4px;
background: rgba(var(--teal-rgb), .15);
border: 1px solid rgba(var(--teal-rgb), .4);
color: var(--teal);
border-radius: 999px;
padding: 4px 10px;
font-size: 0.8rem; font-weight: 600;
white-space: nowrap;
}
.f-city-ms-tag-remove {
background: none; border: none; color: inherit; cursor: pointer;
padding: 0; display: flex; align-items: center; line-height: 0;
opacity: .7; transition: opacity .15s;
}
.f-city-ms-tag-remove:hover { opacity: 1; }
.f-city-ms-input {
flex: 1; min-width: 90px;
border: none; outline: none; background: transparent;
color: var(--text-primary);
font-family: var(--font); font-size: 0.9rem;
padding: 2px 0;
}
.f-city-ms-input::placeholder { color: var(--muted); }
.f-city-ms-clear {
background: none; border: none; cursor: pointer;
color: var(--muted); padding: 4px; border-radius: 6px;
display: flex; align-items: center; justify-content: center;
flex-shrink: 0; transition: color .15s, background .15s;
}
.f-city-ms-clear:hover { color: var(--text-primary); background: var(--hover-bg); }
.f-city-ms-chevron {
width: 16px; height: 16px; flex-shrink: 0; color: var(--muted);
transition: transform .2s;
}
.f-city-ms-control.open .f-city-ms-chevron { transform: rotate(180deg); }
.f-city-ms-dropdown {
position: absolute; top: calc(100% + 6px); left: 0; right: 0;
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
max-height: 260px; overflow-y: auto;
z-index: 30; padding: 6px;
}
.f-city-ms-dropdown::-webkit-scrollbar { width: 4px; }
.f-city-ms-dropdown::-webkit-scrollbar-track { background: transparent; }
.f-city-ms-dropdown::-webkit-scrollbar-thumb { background: var(--muted2); border-radius: 2px; }
.f-city-ms-option {
display: flex; align-items: center; gap: 10px;
width: 100%; text-align: left;
padding: 9px 10px; border: none; border-radius: 8px;
background: none; color: var(--text-primary);
font-family: var(--font); font-size: 0.9rem; cursor: pointer;
transition: background .15s;
}
.f-city-ms-option:hover { background: var(--hover-bg); }
.f-city-ms-option.selected { color: var(--teal); font-weight: 600; }
.f-city-ms-option.f-city-ms-add { color: var(--teal); font-weight: 600; }
.f-city-ms-check {
width: 18px; height: 18px; flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
border: 1.5px solid var(--border); border-radius: 5px;
font-size: 0.8rem; color: var(--teal);
}
.f-city-ms-option.selected .f-city-ms-check {
border-color: var(--teal);
background: rgba(var(--teal-rgb), .15);
}
.f-city-ms-option.f-city-ms-add .f-city-ms-check {
border-color: rgba(var(--teal-rgb), .5);
}
.f-city-ms-empty {
padding: 10px; text-align: center; color: var(--muted); font-size: 0.85rem;
}
/* ── Feed Wrap + Scroll ── */
.f-wrap { display: flex; flex: 1; overflow: hidden; min-height: 0; }
@@ -165,6 +286,12 @@
padding: 8px 14px;
font-size: 0.85rem;
}
/* Городской фильтр компактнее */
.f-city-filter-wrap { padding: 8px 12px; }
.f-city-ms-control { padding: 6px 10px; min-height: 40px; }
.f-city-ms-input { font-size: 0.85rem; }
.f-city-ms-tag { font-size: 0.75rem; padding: 3px 8px; }
}
@media (max-width: 600px) {