add basket on rows, uniformize baskets

This commit is contained in:
Ludovic CANDELLIER
2023-03-21 23:16:47 +01:00
parent 06c68dd223
commit 20b3521c72
8 changed files with 52 additions and 51 deletions

View File

@@ -19,8 +19,17 @@
</div>
@include('Shop.Articles.partials.article_' . $product_type)
</a>
<button type="button" class="btn btn-link bg-green text-white w-100 basket" data-id="{{ $article['offers'][0]['id'] ?? false }}">
Ajout rapide
</button>
@switch ($article_nature)
@case(1)
<button type="button" class="btn btn-link bg-green text-white w-100 basket" data-id="{{ $article['semences']['id'] ?? false }}">
Ajout rapide
</button>
@break
@case(2)
<button type="button" class="btn btn-link bg-green text-white w-100 basket" data-id="{{ $article['plants']['id'] ?? false }}">
Ajout rapide
</button>
@break
@endswitch
</div>
</div>

View File

@@ -0,0 +1,29 @@
@if ($article_nature == 'semences')
<div class="w-100 mt-3 p-1 bg-yellow yellow-dark rounded-lg border text-center">
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['semences']['price'] ?? null }}</span> <br>
{{ $article['semences']['variation'] }}
<div>
Quantité : 1
</div>
@include('components.form.button', [
'class' => 'btn-green-dark basket semences mb-3 mt-2 shadow',
'txt' => 'Ajouter au panier',
'data_id' => $article['semences']['offer_id'] ?? null,
])
</div>
@endif
@if ($article_nature == 'plants')
<div class="w-100 mt-3 p-1 bg-green green-dark rounded-lg border text-center text-white">
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['plants']['price'] ?? null }}</span> <br>
{{ $article['plants']['variation'] }}
<div>
Quantité : 1
</div>
@include('components.form.button', [
'class' => 'btn-success basket plants mb-3 mt-2 shadow',
'txt' => 'Ajouter au panier',
'data_id' => $article['plants']['offer_id'] ?? null,
])
</div>
@endif

View File

@@ -1,5 +1,5 @@
@if ($article_nature == 'semences')
<div class="w-100 mt-3 p-1 bg-yellow yellow-dark rounded-lg border text-center">
<div class="w-100 mt-3 p-1 bg-green-light green-dark rounded-lg border text-center">
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['semences']['price'] ?? null }}</span> <br>
{{ $article['semences']['variation'] }}
<div>
@@ -14,7 +14,7 @@
@endif
@if ($article_nature == 'plants')
<div class="w-100 mt-3 p-1 bg-green green-dark rounded-lg border text-center text-white">
<div class="w-100 mt-3 p-1 bg-green-light green-dark rounded-lg border text-center">
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['plants']['price'] ?? null }}</span> <br>
{{ $article['plants']['variation'] }}
<div>