From da5d4001b51e10fa56ca9504711dc811aaeaa03a Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Thu, 27 Nov 2025 01:11:01 +0300 Subject: [PATCH] feat: Add adaptive multi-column layout for categories and tags checkboxes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implemented responsive grid system for product form checkboxes to improve UX when dealing with multiple categories and tags. Changes: - Added CSS Grid layout with adaptive columns (1-4 based on screen width) - Mobile (< 768px): 1 column - Tablet (≥ 768px): 2 columns - Desktop (≥ 1200px): 3 columns - Wide screens (≥ 1600px): 4 columns - Compact spacing (0.35rem gap) for better density - Enhanced checkbox styling with hover effects and selected state - JavaScript fallback for forced grid application and responsive resizing - Improved form container width (col-12 col-xl-10) for better space usage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../templates/products/product_form.html | 187 +++++++++++++++++- 1 file changed, 184 insertions(+), 3 deletions(-) diff --git a/myproject/products/templates/products/product_form.html b/myproject/products/templates/products/product_form.html index 919e533..c8c55ed 100644 --- a/myproject/products/templates/products/product_form.html +++ b/myproject/products/templates/products/product_form.html @@ -2,10 +2,116 @@ {% block title %}{% if object %}Редактировать товар{% else %}Создать товар{% endif %}{% endblock %} +{% block extra_css %} + +{% endblock %} + {% block content %}
-
+
@@ -76,7 +182,7 @@ Новая
-
+
{{ form.categories }}
{% if form.categories.help_text %} @@ -90,7 +196,7 @@
{{ form.tags.label_tag }} -
+
{{ form.tags }}
{% if form.tags.help_text %} @@ -400,3 +506,78 @@
{% endblock %} + +{% block extra_js %} + +{% endblock %}