feat: replace color dropdown with clickable links in catalog sidebar
All checks were successful
Build and Push Docker Image / build (push) Successful in 24s

- Updated `side-bar.html` to use clickable links instead of a dropdown for color selection
- Enhanced catalog view to generate URLs for color filters and "any color" option
- Simplified the user experience for color filtering and improved accessibility
This commit is contained in:
2026-05-26 04:40:48 +02:00
parent 4a7f520037
commit 94facca714
2 changed files with 27 additions and 8 deletions

View File

@@ -88,14 +88,12 @@
{% if available_colors %}
<section class="a-section color-section">
<h2>Цвет</h2>
<select name="color" onchange="this.form.submit()">
<option value="">Любой</option>
{% for color in available_colors %}
<option value="{{ color.id }}" {% if selected_color_id == color.id|stringformat:"i" %}selected{% endif %}>
{{ color.name }}
</option>
{% endfor %}
</select>
<a href="{{ any_color_url }}" class="category {% if not selected_color_id %}active{% endif %}">Любой</a>
{% for color in available_colors %}
<a href="{{ color.catalog_url }}" class="category {% if selected_color_id == color.id|stringformat:"i" %}active{% endif %}">
{{ color.name }}
</a>
{% endfor %}
</section>
{% endif %}
</form>