33 lines
1.3 KiB
PHP
33 lines
1.3 KiB
PHP
@php
|
|
if(empty($disabled)) {
|
|
$disabled = NULL;
|
|
}
|
|
@endphp
|
|
|
|
@if(!empty($pageNosEngagements->childPages))
|
|
<div class="engagements-list">
|
|
@php $count = 1; @endphp
|
|
@foreach($pageNosEngagements->childPages as $l)
|
|
<div @class([
|
|
'engagements-list__item',
|
|
'disabled' => request()->route()->getName() === $l['button']['url'] || $disabled == $count,
|
|
])>
|
|
@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
|