Files
santeh-ray/templates/catalog/index.html
Azimkin bb321dfa22
All checks were successful
Build and Push Docker Image / build (push) Successful in 45s
feat: add item images, product detail page, and gallery support in catalog
- Added `ItemImage` model with migration for image handling and metadata
- Implemented product gallery in `detail.html` with thumbnails for additional images
- Updated `Item` model to include `primary_image` property for gallery logic
- Enhanced `catalog/index.html` to support item thumbnails
- Updated `catalog.css` for responsive gallery and item list styling
- Extended catalog views to prefetch images for efficient queries
- Added comprehensive tests for catalog and detail views
- Configured Django to serve media files in development
- Updated admin with inline support for managing `ItemImage` entities
2026-04-26 21:55:32 +02:00

28 lines
991 B
HTML

{% extends "_layouts/base.html" %}
{% load static %}
{% block title %}Каталог{% endblock %}
{% block add_css %}
<link rel="stylesheet" href="{% static "css/catalog.css" %}">
{% 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='Каталог' %}
{% else %}
{% include '_fragments/breadcrumbs.html' with url_1='/' text_1='Главная' url_2='/catalog/' text_2='Каталог' text_3=selected_category.name %}
{% endif %}
<div class="container catalog-container">
{% include 'catalog/_fragments/side-bar.html' with categories=categories selected_category=selected_category %}
{% include 'catalog/_fragments/item-list.html' with items=items %}
</div>
{% include "_fragments/footer.html" %}
{% endblock %}