mirror of
https://github.com/ae-utbm/sith.git
synced 2026-06-05 07:39:21 +00:00
improve counter basket item style
This commit is contained in:
@@ -46,6 +46,10 @@ details.accordion>.accordion-content {
|
|||||||
border-bottom-right-radius: 3px;
|
border-bottom-right-radius: 3px;
|
||||||
border-bottom-left-radius: 3px;
|
border-bottom-left-radius: 3px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
@media screen and (max-width: 600px) {
|
||||||
|
padding: .75em 1.5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin animation($selector) {
|
@mixin animation($selector) {
|
||||||
|
|||||||
@@ -42,7 +42,28 @@
|
|||||||
min-width: 350px;
|
min-width: 350px;
|
||||||
|
|
||||||
ul {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
<div class="accordion-content">
|
<div class="accordion-content">
|
||||||
{% set counter_click_url = url('counter:click', counter_id=counter.id, user_id=customer.user_id) %}
|
{% 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
|
<counter-product-select
|
||||||
name="code"
|
name="code"
|
||||||
@@ -105,7 +105,9 @@
|
|||||||
{{ form.management_form }}
|
{{ form.management_form }}
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<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">
|
<template x-for="(item, index) in Object.values(basket)" :key="item.product.price.id">
|
||||||
<li>
|
<li>
|
||||||
<template x-for="error in item.errors">
|
<template x-for="error in item.errors">
|
||||||
@@ -113,19 +115,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<button @click.prevent="addToBasket(item.product.price.id, -1)">-</button>
|
<div class="basket-row">
|
||||||
<span class="quantity" x-text="item.quantity"></span>
|
<div>
|
||||||
<button @click.prevent="addToBasket(item.product.price.id, 1)">+</button>
|
<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 class="product-name" x-text="item.product.name"></span>
|
||||||
<span x-text="item.sum().toLocaleString(undefined, { minimumFractionDigits: 2 })">€</span>
|
<span x-text="`${item.sum().toLocaleString(undefined, { minimumFractionDigits: 2 })} €`"></span>
|
||||||
<span x-show="item.getBonusQuantity() > 0"
|
<span x-show="item.getBonusQuantity() > 0"
|
||||||
x-text="`${item.getBonusQuantity()} x P`"></span>
|
x-text="`${item.getBonusQuantity()} x P`"></span>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
class="remove-item"
|
class="remove-item"
|
||||||
@click.prevent="removeFromBasket(item.product.price.id)"
|
@click.prevent="removeFromBasket(item.product.price.id)"
|
||||||
><i class="fa fa-trash-can delete-action"></i></button>
|
><i class="fa fa-trash-can delete-action"></i></button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="hidden"
|
type="hidden"
|
||||||
|
|||||||
Reference in New Issue
Block a user