Display filters, and fix css for article

This commit is contained in:
Ludovic CANDELLIER
2022-01-22 13:12:43 +01:00
parent 6ff65eb927
commit 2912dc6794
7 changed files with 57 additions and 41 deletions

View File

@@ -2,31 +2,34 @@
<div class="card">
<img src="{{ App\Repositories\Shop\Articles::getPreviewSrc($article['image'] ?? false) }}" class="card-img-top" alt="...">
<div class="card-body">
<span class="card-title" style="font-weight: bold; color: green;">{{ $product_name }}</span>
<span class="float-right" style="font-size: 2em; color: red;">
<i class="fa fa-heart"></i>
</span>
<p class="card-text">
<div class="row" style="color: green;">
<div class="col-6">
@if ($article['semences'] ?? false)
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['semences']['price'] ?? null }}</span> <br>
@else
Indisponible
@endif
Semence
</div>
<div class="col-6">
@if ($article['plants'] ?? false)
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['plants']['price'] }}</span> <br>
@else
Indisponible
@endif
Plant
</div>
<div class="row card-title">
<div class="col-10" style="font-weight: bold; color: green;">
<h2 style="font-size: 1.4em;">{{ $article['parent_name'] }}</h2>
{{ $article['product_name'] }}
</div>
</p>
<div class="col-2 p-0 text-right" style="font-size: 2em; color: red;">
<i class="fa fa-heart"></i>
</div>
</div>
<div class="row" style="color: green;">
<div class="col-6">
@if ($article['semences'] ?? false)
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['semences']['price'] ?? null }}</span> <br>
@else
Indisponible<br>
@endif
Semence
</div>
<div class="col-6">
@if ($article['plants'] ?? false)
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['plants']['price'] }}</span> <br>
@else
Indisponible<br>
@endif
Plant
</div>
</div>
</div>
</div>
</a>

View File

@@ -1,2 +1,12 @@
@foreach ($tags as $tag)
@foreach ($tags as $group)
<h5>{{ $group['name'] }}</h5>
@foreach ($group['tags'] as $tag)
<div>
@include('components.form.checkbox', [
'name' => 'tag[]',
'val' => $tag['id'],
])
{{ $tag['name'] }} ({{ $tag['count'] }})
</div>
@endforeach
@endforeach

View File

@@ -5,6 +5,7 @@
@section('content')
<div class="row">
<div class="col-2">
@include('Shop.Tags.partials.filter')
</div>
<div class="col-10">
@if ($display_by_rows ?? false)

View File

@@ -1,4 +1,4 @@
<input type="checkbox" name="{{ $name }}" id="{{ $id_name ?? $name }}" class="{{ $class ?? ''}}" value="{{ $val ?? 1}}" {{ $meta ?? '' }}
<input type="checkbox" name="{{ $name }}" id="{{ $id_name ?? $name }}" class="{{ $class ?? ''}}" value="{{ $val ?? 1}}" {{ $meta ?? '' }}
@if ( (isset($value) && isset($val) && ($value == $val)) || (!isset($val) && $value)) checked @endif
@if (isset($disabled) && $disabled)disabled="disabled"@endif
>