feat: add price filter and dynamic slider to catalog
All checks were successful
Build and Push Docker Image / build (push) Successful in 41s
All checks were successful
Build and Push Docker Image / build (push) Successful in 41s
- Implemented JavaScript-based price slider for catalog filtering - Updated catalog views to handle min/max price inputs and compute slider bounds - Enhanced templates (`index.html`, `side-bar.html`) with filtering form and updated URLs - Added CSS for price slider styling and form layout - Introduced utility functions for URL building and price parsing - Expanded tests for price filtering, sliders, and sidebar active states - Updated context processor and header for dynamic navigation with price filters
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="container">
|
||||
<div class="header-top">
|
||||
<div class="logo"><a href="/">SantehRay</a></div>
|
||||
<form action="">
|
||||
<form action="/catalog/" method="get">
|
||||
<div class="search-wrap">
|
||||
<div class="search-select-wrap">
|
||||
<div class="search-category-dropdown" data-category-dropdown>
|
||||
@@ -67,9 +67,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<label>
|
||||
<input class="search-input" type="text" placeholder="Кто ищет, тот найдет...">
|
||||
<input class="search-input" type="text" name="q" value="{{ navigation_search_query }}" placeholder="Кто ищет, тот найдет...">
|
||||
</label>
|
||||
<button>
|
||||
<input type="hidden" name="min_price" value="{{ navigation_min_price }}">
|
||||
<input type="hidden" name="max_price" value="{{ navigation_max_price }}">
|
||||
<button type="submit" aria-label="Найти товары">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
||||
class="bi bi-search" viewBox="0 0 16 16">
|
||||
<path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"></path>
|
||||
|
||||
Reference in New Issue
Block a user