improve counter basket item style

This commit is contained in:
imperosol
2026-05-27 18:20:53 +02:00
parent 362b9eea06
commit ebf0196bef
3 changed files with 45 additions and 14 deletions
+4
View File
@@ -46,6 +46,10 @@ details.accordion>.accordion-content {
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
overflow: hidden;
@media screen and (max-width: 600px) {
padding: .75em 1.5em;
}
}
@mixin animation($selector) {
+22 -1
View File
@@ -42,7 +42,28 @@
min-width: 350px;
ul {
list-style-type: none;
list-style: none;
display: flex;
flex-direction: column;
gap: .5rem;
margin-left: 0;
.basket-row {
display: flex;
align-items: center;
gap: 1rem;
.product-name {
flex: 1 2 0;
min-width: 0;
text-wrap: wrap;
}
}
}
form {
margin-top: .5rem;
margin-bottom: .5rem;
}
}
+10 -4
View File
@@ -56,7 +56,7 @@
<div class="accordion-content">
{% set counter_click_url = url('counter:click', counter_id=counter.id, user_id=customer.user_id) %}
<form method="post" action="" class="code_form" @submit.prevent="handleCode">
<form method="post" action="" @submit.prevent="handleCode">
<counter-product-select
name="code"
@@ -105,7 +105,9 @@
{{ form.management_form }}
</div>
<ul>
<li x-show="getBasketSize() === 0">{% trans %}This basket is empty{% endtrans %}</li>
<li x-show="getBasketSize() === 0">
<em>{% trans %}This basket is empty{% endtrans %}</em>
</li>
<template x-for="(item, index) in Object.values(basket)" :key="item.product.price.id">
<li>
<template x-for="error in item.errors">
@@ -113,12 +115,15 @@
</div>
</template>
<div class="basket-row">
<div>
<button @click.prevent="addToBasket(item.product.price.id, -1)">-</button>
<span class="quantity" x-text="item.quantity"></span>
<button @click.prevent="addToBasket(item.product.price.id, 1)">+</button>
</div>
<span x-text="item.product.name"></span> :
<span x-text="item.sum().toLocaleString(undefined, { minimumFractionDigits: 2 })"></span>
<span class="product-name" x-text="item.product.name"></span>
<span x-text="`${item.sum().toLocaleString(undefined, { minimumFractionDigits: 2 })} €`"></span>
<span x-show="item.getBonusQuantity() > 0"
x-text="`${item.getBonusQuantity()} x P`"></span>
@@ -126,6 +131,7 @@
class="remove-item"
@click.prevent="removeFromBasket(item.product.price.id)"
><i class="fa fa-trash-can delete-action"></i></button>
</div>
<input
type="hidden"