@php $commitmentId = 2; $badge = new stdClass(); $badge->label = str("engagement n°{$commitmentId}")->upper(); $badge->color = '#006633'; $section_2_model = $staticPageModel->sections[0]; $section_2 = $section_2_model->data; $reduction_2 = data_get($section_2_model, 'blocks.0.data'); $section_3_model = $staticPageModel->sections[1]; $section_3 = $section_3_model->data; $section_3_pictos = $section_3_model->pictos; $section_4_model = $staticPageModel->sections[2]; $section_4 = $section_4_model->data; $section_4_pictos = $section_4_model->pictos; $reduction_4 = data_get($section_4_model, 'blocks.0.data'); $section_5_model = $staticPageModel->sections[3]; $section_5 = $section_5_model->data; $section_5_pictos = $section_5_model->pictos; $reduction_5 = data_get($section_5_model, 'blocks.0.data'); $section_6_model = $staticPageModel->sections[4]; $section_6 = $section_6_model->data; $reduction_6 = data_get($section_6_model, 'blocks.0.data'); $section_7_model = $staticPageModel->sections[5]; $section_7 = $section_7_model->data; $section_7_pictos = $section_7_model->pictos; $section_8_model = $staticPageModel->sections[6]; $section_8 = $section_8_model->data; $section_8_pictos = $section_8_model->pictos; $collectionkeyItems = collect(range(1, 8)) ->map(function ($i) use ($section_3) { $key = "title_{$i}"; $value = $section_3->$key->value ?? null; if (!$value) { return null; } $item = new stdClass(); $item->title = str(__($value))->upper(); return $item; }) ->filter() ->values(); @endphp @extends('fo.layout', ['brParam' => $staticPageModel]) @section('title', str($staticPageModel->title)->ucFirst()) @section('description', str($staticPageModel->title)->ucFirst()) @section('breadcrumb', request()->route()->getName()) @section('bg-offset', true) @section('content') {{-- NAVIGATION --}} @include('fo.partials.commitments.navigation') {{-- HEADER --}} @include('fo.layouts.header-banner', [ 'picto' => asset($staticPageModel->picture), 'picto_alt' => __($staticPageModel->picture_alt), 'picto_title' => __($staticPageModel->picture_title), 'picto_baner' => $staticPageModel->data['picto_banner'], 'content' => $staticPageModel->content, ]) {{-- PARAGRAPH WITH PICTURE --}} @if ($section_2_model->visibility) @include('fo.partials.commitments.paragraph-with-visual', [ 'title' => $section_2->title->value, 'text' => $section_2->description->value, 'background_color' => 'light', 'btn_color' => 'secondary', 'picture' => $section_2->media->value->picture->path ?? null ? asset($section_2->media->value->picture->path) : null, 'video_id' => $section_2->media->value->video->id ?? null, 'picture_alt' => $section_2->media->value->picture->alt ?? null, 'picture_title' => $section_2->media->value->picture->title ?? null, 'picto' => asset($section_2->media_picto->value), 'picto_alt' => __($section_2->media_picto->alt), 'picto_title' => __($section_2->media_picto->title), 'reduction' => $reduction_2, ]) @endif {{-- KEYS LIST --}} @if ($section_3_model->visibility) @include('fo.partials.commitments.keys-list', [ 'text' => str(__($section_3->title->value))->replace( ':nbrKeyList', "
{$collectionkeyItems->count()}
"), 'collection' => $collectionkeyItems, ]) {{-- COMPLEX FLEX ITEMS --}} @include('fo.partials.commitments.complex-flex-items', [ 'background_color' => 'tertiary', 'collection' => $section_3_pictos, ]) @endif {{-- PARAGRAPH WITH PICTURE --}} @if ($section_4_model->visibility)
{{-- BEA --}} {{ __('Entreprise adhérente au collectif Filière Agricole Engagée pour le Bien-être Animal. Découvrez nos engagements pour un poulet origine France élevé dans le respect du bien-être animal.') }} {{ __('Entreprise adhérente au collectif Filière Agricole Engagée pour le Bien-être Animal. Découvrez nos engagements pour un poulet origine France élevé dans le respect du bien-être animal.') }}
@include('fo.partials.commitments.paragraph-with-visual', [ 'title' => $section_4->title->value, 'text' => nl2br($section_4->description->value), 'background_color' => 'transparent', 'btn_color' => 'secondary', 'picture' => $section_4->media->value->picture->path ?? null ? asset($section_4->media->value->picture->path) : null, 'video_id' => $section_4->media->value->video->id ?? null, 'picture_alt' => $section_4->media->value->picture->alt ?? null, 'picture_title' => $section_4->media->value->picture->title ?? null, 'picto' => asset($section_4->media_picto->value), 'picto_alt' => __($section_4->media_picto->alt), 'picto_title' => __($section_4->media_picto->title), 'reduction' => $reduction_4, 'reversed' => true, ]) {{-- COMPLEX FLEX ITEMS --}} @include('fo.partials.commitments.complex-flex-items', [ 'background_color' => 'transparent', 'collection' => $section_4_pictos, ])
@endif {{-- PARAGRAPH WITH PICTURE --}} @if ($section_5_model->visibility) @include('fo.partials.commitments.paragraph-with-visual', [ 'title' => $section_5->title->value, 'text' => nl2br($section_5->description->value), 'background_color' => 'light', 'btn_color' => 'secondary', 'picture' => $section_5->media->value->picture->path ?? null ? asset($section_5->media->value->picture->path) : null, 'video_id' => $section_5->media->value->video->id ?? null, 'picture_alt' => $section_5->media->value->picture->alt ?? null, 'picture_title' => $section_5->media->value->picture->title ?? null, 'picto' => asset($section_5->media_picto->value), 'picto_alt' => __($section_5->media_picto->alt), 'picto_title' => __($section_5->media_picto->title), 'reduction' => $reduction_5, 'reversed' => true, ]) {{-- COMPLEX FLEX ITEMS --}}
@include('fo.partials.commitments.complex-flex-items', [ 'background_color' => 'transparent', 'collection' => $section_5_pictos, ])
@endif {{-- PARAGRAPH WITH PICTURE --}} @if ($section_6_model->visibility) @include('fo.partials.commitments.paragraph-with-visual', [ 'title' => $section_6->title->value, 'text' => nl2br(__($section_6->description->value)), 'background_color' => 'light', 'btn_color' => 'secondary', 'picture' => $section_6->media->value->picture->path ?? null ? asset($section_6->media->value->picture->path) : null, 'video_id' => $section_6->media->value->video->id ?? null, 'picture_alt' => $section_6->media->value->picture->alt ?? null, 'picture_title' => $section_6->media->value->picture->title ?? null, 'picto' => asset($section_6->media_picto->value), 'picto_alt' => __($section_6->media_picto->alt), 'picto_title' => __($section_6->media_picto->title), 'reduction' => $reduction_6, ]) @endif {{-- COMPLEX FLEX ITEMS --}}
@if ($section_7_model->visibility) @include('fo.partials.commitments.complex-flex-items', [ 'title' => str($section_7->title->value)->upper(), 'subtitle' => str($section_7->description->value)->upper(), 'picto' => $section_7->media_picto->value, 'picto_alt' => __($section_7->media_picto->alt), 'picto_title' => __($section_7->media_picto->title), 'background_color' => 'white', 'collection' => $section_7_pictos, ]) @endif {{-- COMPLEX FLEX ITEMS --}} @if ($section_8_model->visibility) @include('fo.partials.commitments.complex-flex-items', [ 'title' => str($section_8->title->value)->upper(), 'subtitle' => str($section_8->description->value)->upper(), 'picto' => $section_8->media_picto->value, 'picto_alt' => __($section_8->media_picto->alt), 'picto_title' => __($section_8->media_picto->title), 'background_color' => 'quint', 'collection' => $section_8_pictos, ]) @endif {{-- OTHER COMMITMENTS --}} @include('fo.partials.commitments.other-commitments', [ 'number' => $commitmentId, 'title' => $staticPageModel->data['common_section']['title'], 'text' => $staticPageModel->data['common_section']['content'], ]) @endsection