71 lines
2.3 KiB
PHP
71 lines
2.3 KiB
PHP
@php
|
|
$engagements_list = [
|
|
[
|
|
'image' => '/app/uploads/2023/04/engagement-elever-durablement.png',
|
|
'text' => '',
|
|
'button' => [
|
|
'title' => 'Voir la page',
|
|
'url' => '/nos-engagements/elever-durablement/',
|
|
'target' => '',
|
|
],
|
|
],
|
|
[
|
|
'image' => '/app/uploads/2023/04/engagement-mieux-vivre-ensemble.png',
|
|
'text' => '',
|
|
'button' => [
|
|
'title' => 'Voir la page',
|
|
'url' => '/nos-engagements/mieux-vivre-ensemble/',
|
|
'target' => '',
|
|
],
|
|
],
|
|
[
|
|
'image' => '/app/uploads/2023/04/engagement-respecter-la-terre.png',
|
|
'text' => '',
|
|
'button' => [
|
|
'title' => 'Voir la page',
|
|
'url' => '/nos-engagements/respecter-la-terre/',
|
|
'target' => '',
|
|
],
|
|
],
|
|
[
|
|
'image' => '/app/uploads/2023/04/engagement-bien-nourrir.png',
|
|
'text' => '',
|
|
'button' => [
|
|
'title' => 'Voir la page',
|
|
'url' => '/nos-engagements/bien-nourrir/',
|
|
'target' => '',
|
|
],
|
|
],
|
|
];
|
|
|
|
if(empty($disabled)) {
|
|
$disabled = NULL;
|
|
}
|
|
@endphp
|
|
|
|
|
|
@if(!empty($engagements_list))
|
|
<div class="engagements-list">
|
|
@php
|
|
$count = 1;
|
|
@endphp
|
|
@foreach($engagements_list as $l)
|
|
<div class="engagements-list__item @if($disabled == $count) disabled @endif">
|
|
@if(!empty($l['image']))
|
|
<div class="engagements-list__item-image"><img src="{{ $l['image'] }}" alt="{{ !empty($l['button']['title']) ? $l['button']['title'] : 'engagement' }}" /></div>
|
|
@endif
|
|
|
|
@if(!empty($l['text']))
|
|
<div class="engagements-list__item-text">{{ $l['text'] }}</div>
|
|
@endif
|
|
|
|
@if(!empty($l['button']['url']))
|
|
<a class="engagements-list__item-btn btn" title="Voir la page" href="{{ $l['button']['url'] }}">{{ $l['button']['title'] }}<i class="btn__icon btn__icon_arrow-right"></i></a>
|
|
@endif
|
|
</div>
|
|
@php
|
|
$count++;
|
|
@endphp
|
|
@endforeach
|
|
</div>
|
|
@endif
|