ldc-legaulois/resources/views/fo/partials/commitments/cards.blade.php
2026-06-11 10:47:10 +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="{{ asset($item->picture) }}" title="{{ $item->picture_title }}"
alt="{{ $item->picture_alt }}">
</div>
<div class="line-border-small bg-white p-4">
<h4 class="text-quint">{{ $item->title }}</h4>
{!! clean($item->description) !!}
</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="{{ asset($collection->last()->picture) }}"
title="{{ $collection->last()->picture_title }}" alt="{{ $collection->last()->picture_alt }}">
</div>
<div class="line-border-small bg-white p-4">
<h4 class="text-quint">{{ $collection->last()->title }}</h4>
{!! clean($collection->last()->description) !!}
</div>
</div>
</div>
@endif
</div>
</div>
</section>