119 lines
5 KiB
PHP
119 lines
5 KiB
PHP
@php
|
|
$commitmentId = 5;
|
|
$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;
|
|
$section_2_pictos = $section_2_model->pictos;
|
|
$reduction_2 = $section_2_model->blocks[0]->data;
|
|
|
|
$section_3_model = $staticPageModel->sections[1];
|
|
$section_3 = $section_3_model->data;
|
|
$reduction_3 = $section_3_model->blocks[0]->data;
|
|
|
|
$section_4_model = $staticPageModel->sections[2];
|
|
$section_4 = $section_4_model->data;
|
|
$section_4_pictos = $section_4_model->pictos;
|
|
$reduction_4 = $section_4_model->blocks[0]->data;
|
|
|
|
@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'],
|
|
])
|
|
|
|
{{-- PARAGRAPH WITH VISUAL AND COMPLEX ITEMS --}}
|
|
@if ($section_2_model->visibility)
|
|
@include('fo.partials.commitments.paragraph-with-visual-complex-flex-items', [
|
|
'title' => __($section_2->title->value),
|
|
'text' => nl2br(__($section_2->description->value)),
|
|
'collection' => $section_2_pictos,
|
|
'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
|
|
|
|
{{-- PARAGRAPH WITH PICTURE --}}
|
|
@if ($staticPageModel->sections[1]->visibility)
|
|
@include('fo.partials.commitments.paragraph-with-visual', [
|
|
'title' => __($section_3->title->value),
|
|
'text' => __($section_3->description->value),
|
|
'background_color' => 'light',
|
|
'picture' =>
|
|
$section_3->media->value->picture->path ?? null
|
|
? asset($section_3->media->value->picture->path)
|
|
: null,
|
|
'video_id' => $section_3->media->value->video->id ?? null,
|
|
'picture_alt' => $section_3->media->value->picture->alt ?? null,
|
|
'picture_title' => $section_3->media->value->picture->title ?? null,
|
|
'picto' => asset($section_3->media_picto->value),
|
|
'picto_alt' => __($section_3->media_picto->alt),
|
|
'picto_title' => __($section_3->media_picto->title),
|
|
'card_title' => __($section_3->encare_beige_title->value),
|
|
'card_text' => __($section_3->encare_beige_description->value),
|
|
'reduction' => $reduction_3,
|
|
])
|
|
@endif
|
|
|
|
{{-- PARAGRAPH WITH PICTURE --}}
|
|
@if ($section_4_model->visibility)
|
|
@include('fo.partials.commitments.paragraph-with-visual', [
|
|
'title' => __($section_4->title->value),
|
|
'text' => __($section_4->description->value),
|
|
'encart' => $section_4->encare_beige->value,
|
|
'background_color' => 'light',
|
|
'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),
|
|
'reversed' => true,
|
|
'reduction' => $reduction_4,
|
|
])
|
|
|
|
{{-- COMPLEX FLEX ITEMS --}}
|
|
@include('fo.partials.commitments.complex-flex-items', [
|
|
'background_color' => 'quint',
|
|
'collection' => $section_4_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
|
|
<x-uwil-schema-org::import :model="$staticPageModel" />
|