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
38 lines
1.7 KiB
HTML
38 lines
1.7 KiB
HTML
{% extends "_layouts/base.html" %}
|
|
{% load static %}
|
|
|
|
{% block title %}Каталог{% endblock %}
|
|
|
|
{% block add_css %}
|
|
<link rel="stylesheet" href="{% static "css/catalog.css" %}">
|
|
{% endblock %}
|
|
|
|
{% block add_js %}
|
|
<script src="{% static 'js/catalog-price-slider.js' %}"></script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<!-- HEADER -->
|
|
{% include "_fragments/header.html" with active="catalog" %}
|
|
|
|
{% if selected_category.id == None %}
|
|
{% include '_fragments/breadcrumbs.html' with url_1='/' text_1='Главная' url_2='/catalog/' text_2='Каталог' %}
|
|
{% elif selected_subcategory.id != None %}
|
|
{% with category_url='/catalog/'|add:selected_category.id|add:'/' subcategory_url='/catalog/'|add:selected_category.id|add:'/?subcategory='|add:selected_subcategory.id %}
|
|
{% include '_fragments/breadcrumbs.html' with url_1='/' text_1='Главная' url_2='/catalog/' text_2='Каталог' url_3=category_url text_3=selected_category.name url_4=subcategory_url text_4=selected_subcategory.name %}
|
|
{% endwith %}
|
|
{% else %}
|
|
{% with category_url='/catalog/'|add:selected_category.id|add:'/' %}
|
|
{% include '_fragments/breadcrumbs.html' with url_1='/' text_1='Главная' url_2='/catalog/' text_2='Каталог' url_3=category_url text_3=selected_category.name %}
|
|
{% endwith %}
|
|
{% endif %}
|
|
|
|
<div class="container catalog-container">
|
|
{% include 'catalog/_fragments/side-bar.html' with categories=categories subcategories=subcategories selected_category=selected_category selected_subcategory=selected_subcategory %}
|
|
|
|
{% include 'catalog/_fragments/item-list.html' with items=items %}
|
|
</div>
|
|
|
|
{% include "_fragments/footer.html" %}
|
|
{% endblock %}
|