122 lines
5.1 KiB
PHP
122 lines
5.1 KiB
PHP
@php
|
|
$commitmentId = 1;
|
|
$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;
|
|
|
|
$section_5_model = $staticPageModel->sections[3];
|
|
$section_5 = $section_5_model->data;
|
|
$reduction_5 = data_get($section_5_model, 'blocks.0.data');
|
|
//collections
|
|
$collectionSimpleItems = collect([
|
|
(object) [
|
|
'title' => str($section_3->title_left->value)->upper(),
|
|
'text' => strip_tags($section_3->description_left->value),
|
|
'picto' => $section_3->media_left->value,
|
|
'picto_alt' => $section_3->media_left->alt,
|
|
'picto_title' => $section_3->media_left->title,
|
|
],
|
|
(object) [
|
|
'title' => str($section_3->title_right->value)->upper(),
|
|
'text' => strip_tags($section_3->description_right->value),
|
|
'picto' => $section_3->media_right->value,
|
|
'picto_alt' => $section_3->media_right->alt,
|
|
'picto_title' => $section_3->media_right->title,
|
|
],
|
|
]);
|
|
@endphp
|
|
|
|
@extends('fo.layout', ['brParam' => $staticPageModel])
|
|
|
|
@section('title', str($staticPageModel->seo_title)->ucFirst())
|
|
@section('description', str($staticPageModel->seo_description)->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' => nl2br(__($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
|
|
{{-- SIMPLE FLEX ITEMS --}}
|
|
@if ($section_3_model->visibility)
|
|
@include('fo.partials.commitments.simple-flex-items', [
|
|
'collection' => $collectionSimpleItems,
|
|
])
|
|
{{-- COMPLEX FLEX ITEMS --}}
|
|
@include('fo.partials.commitments.complex-flex-items', [
|
|
'title' => str($section_3->title_center->value)->upper(),
|
|
'picto' => $section_3->media_center->value,
|
|
'picto_alt' => $section_3->media_center->alt,
|
|
'picto_title' => $section_3->media_center->title,
|
|
'background_color' => 'quint',
|
|
'collection' => $section_3_pictos,
|
|
])
|
|
@endif
|
|
{{-- ARROWS LIST --}}
|
|
@if ($section_4_model->visibility)
|
|
@include('fo.partials.commitments.arrows-list', [
|
|
'title' => str($section_4->title->value)->upper(),
|
|
'collection' => $section_4_pictos,
|
|
])
|
|
@endif
|
|
{{-- PARAGRAPH --}}
|
|
@if ($section_5_model->visibility)
|
|
@include('fo.partials.commitments.paragraph', [
|
|
'title' => $section_5->title->value,
|
|
'text' => $section_5->description->value,
|
|
'background_color' => 'light',
|
|
'btn_color' => 'secondary',
|
|
'picture' => Vite::asset('resources/assets/images/commitments/common/breeder-1.jpg'),
|
|
'picture_alt' => __('Soutien des éleveurs Le Gaulois sur la dynamisation du territoire français'),
|
|
'picture_title' => __(
|
|
'Savoir-faire volailler des éleveurs Le Gaulois sur tout le territoire français'),
|
|
'reversed' => true,
|
|
'reduction' => $reduction_5,
|
|
])
|
|
@endif
|
|
{{-- OTHER COMMITMENTS --}}
|
|
@include('fo.partials.commitments.other-commitments', [
|
|
'number' => $commitmentId,
|
|
'title' => $staticPageModel->data['common_section']['title'],
|
|
'text' => $staticPageModel->data['common_section']['content'],
|
|
])
|
|
@endsection
|