Manage homepage by article, modify article template, enhance basket (add selector)

This commit is contained in:
Ludovic CANDELLIER
2022-03-24 00:48:26 +01:00
parent ddc5f2664c
commit c65056531c
13 changed files with 277 additions and 148 deletions

View File

@@ -1,31 +1,33 @@
<div class="mb-3 bg-light">
<div class="row">
<div class="col-6">
<h1 style="font-size: 2em;">{{ $shelve['name'] }}</h1>
@if ($shelve['articles'])
<div class="mb-3 bg-light">
<div class="row">
<div class="col-6">
<h1 style="font-size: 2em;">{{ $shelve['name'] }}</h1>
</div>
<div class="col-6 text-right">
<a href="">Découvrir la sélection</a>
<a href="">Tout voir</a>
</div>
</div>
<div class="col-6 text-right">
<a href="">Découvrir la sélection</a>
<a href="">Tout voir</a>
<div class="row shelve_slider_{{ $shelve['id'] }}">
@foreach ($shelve['articles'] as $name => $article)
<div class="text-center pr-2 pl-2">
<a href="{{ route('Shop.Articles.show', ['id' => $article['id']]) }}">
<img data-lazy="{{ App\Repositories\Shop\Articles::getPreviewSrc($article['image'] ?? false) }}" class="d-block w-100" alt="{{ $name }}"/>
{{ $name }}
</a>
</div>
@endforeach
</div>
</div>
<div class="row shelve_slider_{{ $shelve['id'] }}">
@foreach ($shelve['articles'] as $name => $article)
<div class="text-center pr-2 pl-2">
<a href="{{ route('Shop.Articles.show', ['id' => $article['id']]) }}">
<img data-lazy="{{ App\Repositories\Shop\Articles::getPreviewSrc($article['image'] ?? false) }}" class="d-block w-100" alt="{{ $name }}"/>
{{ $name }}
</a>
</div>
@endforeach
</div>
</div>
@push('js')
<script>
$('.shelve_slider_{{ $shelve['id'] }}').slick({
lazyLoad: 'ondemand',
slidesToShow: 6,
slidesToScroll: 1
});
</script>
@endpush
@push('js')
<script>
$('.shelve_slider_{{ $shelve['id'] }}').slick({
lazyLoad: 'ondemand',
slidesToShow: 6,
slidesToScroll: 1
});
</script>
@endpush
@endif