75 lines
2.4 KiB
PHP
75 lines
2.4 KiB
PHP
@php
|
|
$engagements_list = [
|
|
[
|
|
'image' => '/assets/uploads/2023/04/engagement-elever-durablement.png',
|
|
'text' => '',
|
|
'button' => [
|
|
'title' => 'Voir la page',
|
|
'url' => 'front.elever-durablement',
|
|
'target' => '',
|
|
],
|
|
],
|
|
[
|
|
'image' => '/assets/uploads/2023/04/engagement-mieux-vivre-ensemble.png',
|
|
'text' => '',
|
|
'button' => [
|
|
'title' => 'Voir la page',
|
|
'url' => 'front.mieux-vivre-ensemble',
|
|
'target' => '',
|
|
],
|
|
],
|
|
[
|
|
'image' => '/assets/uploads/2023/04/engagement-respecter-la-terre.png',
|
|
'text' => '',
|
|
'button' => [
|
|
'title' => 'Voir la page',
|
|
'url' => 'front.respecter-la-terre',
|
|
'target' => '',
|
|
],
|
|
],
|
|
[
|
|
'image' => '/assets/uploads/2023/04/engagement-bien-nourrir.png',
|
|
'text' => '',
|
|
'button' => [
|
|
'title' => 'Voir la page',
|
|
'url' => 'front.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)
|
|
@php
|
|
@endphp
|
|
<div class="engagements-list__item
|
|
@if(request()->route()->getName() === $l['button']['url']) disabled @endif
|
|
@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="{{ route($l['button']['url']) }}">{{ $l['button']['title'] }}<i class="btn__icon btn__icon_arrow-right"></i></a>
|
|
@endif
|
|
</div>
|
|
@php
|
|
$count++;
|
|
@endphp
|
|
@endforeach
|
|
</div>
|
|
@endif
|