Increase products density

This commit is contained in:
Gabriel Augendre 2022-04-25 17:17:58 +02:00
parent 8912ad5178
commit 9ac1dc0702
3 changed files with 8 additions and 5 deletions

View file

@ -11,7 +11,7 @@
{% endblock %}
</head>
<body>
<div class="container">
<div class="container-fluid">
{% include "common/navbar.html" %}
{% include "common/messages.html" %}
{% block content %}

View file

@ -40,7 +40,10 @@ class BasketForm(forms.ModelForm):
)
fields.append(BasketItemField(field_name, product=product))
self.helper.layout = Layout(
Div(*fields, css_class="row"),
Div(
*fields,
css_class="row row-cols-2 row-cols-sm-3 row-cols-md-4 row-cols-lg-5 row-cols-xl-6 g-4",
),
Field("payment_method"),
)

View file

@ -1,9 +1,9 @@
{% load crispy_forms_field %}
<div class="col-sm-3 mb-3 mt-3">
<div class="card">
<div class="col">
<div class="card h-100">
<div class="card-header {% if field.value %}bg-success text-white{% endif %}">{{ product.name }}</div>
{% if product.image %}
<img src="{{ product.image.url }}" class="card-img-top">
<img src="{{ product.image.url }}" class="card-img">
{% endif %}
<div class="card-body">
<div class="input-group">