@php $block->heading_type = 'h2'; @endphp
@include('frontend.templates.blocks.title-block',[
'isInclude' => true,
])
{{-- START SLIDER DESKTOP --}}
@foreach($cards as $i => $item)
@if(($i + 1) % 2 == 0)
@php
$firstItem = $slideCount % 2 == 0 ? $auxItem : $item;
$secondItem = $slideCount % 2 == 0 ? $item : $auxItem;
@endphp
@include(
'frontend.templates.blocks.featured-slide',
array(
'firstItem' => $firstItem['fields'],
'secondItem' => $secondItem['fields'],
'container_class' => 'featured-slide--slider',
'id' => (($i - 1) / 2),
'invert' => (($i - 1) / 2) % 2 == 1,
'firstItemCtaLabels' => [$firstItem['cta_label'], $firstItem['cta2_label']],
'secondItemCtaLabels' => [$secondItem['cta_label'], $secondItem['cta2_label']]
))
@php
$auxItem = null;
$slideCount++;
@endphp
@else
@php $auxItem = $item; @endphp
@endif
@endforeach
@if($auxItem)
@include(
'frontend.templates.blocks.featured-slide',
array(
'firstItem' => $auxItem['fields'],
'secondItem' => null,
'container_class' => 'featured-slide--slider',
'id' => (sizeof($cards) - 1) / 2,
'invert' => false,
'firstItemCtaLabels' => [$auxItem['cta_label'], $auxItem['cta2_label']],
))
@php $slideCount++; @endphp
@endif
@include('frontend.svg.icon-arrow-blue-down')
@for($i = 0; $i < $slideCount; $i++)
@endfor
@include('frontend.svg.icon-arrow-blue-down')
{{-- END SLIDER DESKTOP --}}
{{-- START SLIDER MOBILE --}}
@foreach($cards as $i => $item)
@include(
'frontend.templates.blocks.featured-slide-mobile',
array(
'item' => $item['fields'],
'id' => $i,
'ctaLabels' => [$item['cta_label'], $item['cta2_label']]
))
@endforeach
@include('frontend.svg.icon-arrow-blue-down')
@foreach($cards as $i => $item)
@endforeach
@include('frontend.svg.icon-arrow-blue-down')
{{-- END SLIDER MOBILE --}}
@if($block->cta1)
{!! generateLink($block->cta1, 'square-button square-button--arrow featured-slider__container-button') !!}
@endif