ldc-legaulois/resources/views/fo/partials/commitments/cards.blade.php
Vincent Crochard 324f0ce79f Update 20240829
2024-08-29 12:24:47 +02:00

37 lines
2 KiB
PHP

<section class="position-relative line-border-large bg-light pb-5 pt-1" id="commitments-cards">
<div class="container">
<div class="row">
@php
$collectionCustom = count($collection) % 2 === 0 ? $collection : $collection->slice(0, count($collection) - 1);
@endphp
@foreach ($collectionCustom as $item)
<div class="col-12 col-md-6">
<div class="custom-card bottom-left-shadow position-relative my-4">
<div class="position-absolute d-flex justify-content-between align-items-center z-1">
<img class="img-fluid" src="{{ Vite::asset($item->picto) }}" title="{{ $item->picto_title }}"
alt="{{ $item->picto_alt }}">
</div>
<div class="line-border-small bg-white p-4">
<h4 class="text-quint">{{ $item->title }}</h4>
{!! $item->text !!}
</div>
</div>
</div>
@endforeach
@if (count($collection) % 2 !== 0)
<div class="col-12">
<div class="custom-card bottom-left-shadow position-relative my-4">
<div class="position-absolute d-flex justify-content-between align-items-center z-1">
<img class="img-fluid" src="{{ Vite::asset($collection->last()->picto) }}"
title="{{ $collection->last()->picto_title }}" alt="{{ $collection->last()->picto_alt }}">
</div>
<div class="line-border-small bg-white p-4">
<h4 class="text-quint">{{ $collection->last()->title }}</h4>
{!! $collection->last()->text !!}
</div>
</div>
</div>
@endif
</div>
</div>
</section>