2024-07-03 15:40:13 +02:00
@ php
$commitmentId = 2 ;
$badge = new stdClass ();
$badge -> label = str ( " engagement n° { $commitmentId } " ) -> upper ();
$badge -> color = '#006633' ;
2026-06-08 17:47:51 +02:00
$section_2_model = $staticPageModel -> sections [ 0 ];
$section_2 = $section_2_model -> data ;
2026-10-20 15:28:06 +02:00
$reduction_2 = data_get ( $section_2_model , 'blocks.0.data' );
2026-06-08 17:47:51 +02:00
$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 ;
2026-10-20 15:28:06 +02:00
$reduction_4 = data_get ( $section_4_model , 'blocks.0.data' );
2026-06-08 17:47:51 +02:00
$section_5_model = $staticPageModel -> sections [ 3 ];
$section_5 = $section_5_model -> data ;
$section_5_pictos = $section_5_model -> pictos ;
2026-10-20 15:28:06 +02:00
$reduction_5 = data_get ( $section_5_model , 'blocks.0.data' );
2026-06-08 17:47:51 +02:00
$section_6_model = $staticPageModel -> sections [ 4 ];
$section_6 = $section_6_model -> data ;
2026-10-20 15:28:06 +02:00
$reduction_6 = data_get ( $section_6_model , 'blocks.0.data' );
2026-06-08 17:47:51 +02:00
$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 ();
2024-07-03 15:40:13 +02:00
@ 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' , [
2026-06-08 17:47:51 +02:00
'picto' => asset ( $staticPageModel -> picture ),
'picto_alt' => __ ( $staticPageModel -> picture_alt ),
'picto_title' => __ ( $staticPageModel -> picture_title ),
'picto_baner' => $staticPageModel -> data [ 'picto_banner' ],
2026-10-20 15:28:06 +02:00
'content' => $staticPageModel -> content ,
2024-07-03 15:40:13 +02:00
])
{{ -- PARAGRAPH WITH PICTURE -- }}
2026-06-08 17:47:51 +02:00
@ 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
2024-07-03 15:40:13 +02:00
{{ -- KEYS LIST -- }}
2026-06-08 17:47:51 +02:00
@ if ( $section_3_model -> visibility )
@ include ( 'fo.partials.commitments.keys-list' , [
'text' => str ( __ ( $section_3 -> title -> value )) -> replace (
':nbrKeyList' ,
" <div class='display-inline-block'><span class='d-flex justify-content-center align-items-center bg-quint rounded-pill'> { $collectionkeyItems -> count () } </span></div> " ),
'collection' => $collectionkeyItems ,
])
{{ -- COMPLEX FLEX ITEMS -- }}
@ include ( 'fo.partials.commitments.complex-flex-items' , [
'background_color' => 'tertiary' ,
'collection' => $section_3_pictos ,
])
@ endif
2024-07-03 15:40:13 +02:00
{{ -- PARAGRAPH WITH PICTURE -- }}
2026-06-08 17:47:51 +02:00
@ if ( $section_4_model -> visibility )
2026-09-02 09:30:51 +02:00
< section class = " line-border-large-bottom bg-green-wood mb-5 p-0 " >
{{ -- BEA -- }}
2026-10-20 15:28:06 +02:00
< a class = " d-flex justify-content-center bea-banner " href = " https://bienetreanimal.fr/ " target = " _blank "
rel = " noopener noreferrer " >
< img class = " d-none d-sm-flex img-fluid "
2026-09-02 09:30:51 +02:00
src = " { { Vite::asset('resources/assets/images/home/bea_desktop.png') }} "
alt = " { { __('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.') }} "
2026-10-20 15:28:06 +02:00
title = " { { __('Découvrez les engagements de la Filière Agricole Engagée pour le Bien-être Animal') }} " />
< img class = " d-sm-none img-fluid " src = " { { Vite::asset('resources/assets/images/home/bea_mobile.png') }} "
2026-09-02 09:30:51 +02:00
alt = " { { __('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.') }} "
2026-10-20 15:28:06 +02:00
title = " { { __('Découvrez les engagements de la Filière Agricole Engagée pour le Bien-être Animal') }} " />
2026-09-02 09:30:51 +02:00
</ a >
2026-06-08 17:47:51 +02:00
< div class = " container " >
@ 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 ,
])
</ div >
</ section >
@ 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 -- }}
< section class = " line-border-large container mb-5 p-0 " >
2024-07-03 15:40:13 +02:00
@ include ( 'fo.partials.commitments.complex-flex-items' , [
'background_color' => 'transparent' ,
2026-06-08 17:47:51 +02:00
'collection' => $section_5_pictos ,
2024-07-03 15:40:13 +02:00
])
2026-06-08 17:47:51 +02:00
</ section >
@ endif
2024-07-03 15:40:13 +02:00
{{ -- PARAGRAPH WITH PICTURE -- }}
2026-06-08 17:47:51 +02:00
@ 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
2024-07-03 15:40:13 +02:00
{{ -- COMPLEX FLEX ITEMS -- }}
2026-06-18 15:03:28 +02:00
< div class = " mt-5 " ></ div >
2026-06-08 17:47:51 +02:00
@ if ( $section_7_model -> visibility )
2024-07-03 15:40:13 +02:00
@ include ( 'fo.partials.commitments.complex-flex-items' , [
2026-06-08 17:47:51 +02:00
'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 ,
2024-07-03 15:40:13 +02:00
])
2026-06-08 17:47:51 +02:00
@ endif
2024-07-03 15:40:13 +02:00
{{ -- COMPLEX FLEX ITEMS -- }}
2026-06-08 17:47:51 +02:00
@ 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
2024-07-03 15:40:13 +02:00
{{ -- OTHER COMMITMENTS -- }}
@ include ( 'fo.partials.commitments.other-commitments' , [
'number' => $commitmentId ,
2026-06-08 17:47:51 +02:00
'title' => $staticPageModel -> data [ 'common_section' ][ 'title' ],
'text' => $staticPageModel -> data [ 'common_section' ][ 'content' ],
2024-07-03 15:40:13 +02:00
])
@ endsection