ldc-legaulois/resources/views/fo/pages/commitments/life.blade.php

120 lines
5.4 KiB
PHP

@php
$commitmentId = 4;
$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;
$reduction_4 = data_get($section_4_model, 'blocks.0.data');
@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' => 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
{{-- BANNER TEXT --}}
@if ($section_3_model->visibility)
@include('fo.partials.commitments.banner-text-complex-items', [
'number' => $commitmentId,
'encart_text' => $section_3->title_sec->value,
'text' => nl2br($section_3->description->value),
'picto' => $section_3->media_picto->value,
'picto_alt' => __($section_3->media_picto->alt),
'picto_title' => __($section_3->media_picto->title),
'picture' => $section_3->media->value,
'picture_alt' => __($section_3->media->alt),
'picture_title' => __($section_3->media->title),
'background_color' => 'tertiary',
'collection' => $section_3_pictos,
])
@endif
{{-- PARAGRAPH WITH PICTURE --}}
@if ($section_4_model->visibility)
<div class="modal fade translate-middle top-50 start-50" id="mecenat-chirurgie-video-modal"
aria-labelledby="mecenatChirurgieVideoModalLabel" aria-hidden="true" tabindex="-1">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" data-bs-dismiss="modal" type="button" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="video-inlaid ratio ratio-16x9" type="youtube"
href="https://www.youtube.com/embed/{{ $section_4->media->value->video->id }}">
</div>
</div>
<div class="modal-footer">
<button class="btn btn-secondary" data-bs-dismiss="modal"
type="button">{{ __('Fermer') }}</button>
</div>
</div>
</div>
</div>
@include('fo.partials.commitments.paragraph-with-visual', [
'title' => __($section_4->title->value),
'text' => nl2br(__($section_4->description->value)),
'background_color' => 'light',
'picture' =>
$section_4->media->value->picture->path ?? null
? asset($section_4->media->value->picture->path)
: null,
'picture_alt' => $section_4->media->value->picture->alt ?? null,
'picture_title' => $section_4->media->value->picture->title ?? null,
'video_id' => $section_4->media->value->video->id ?? null,
'picto' => asset($section_4->media_picto->value),
'picto_alt' => $section_4->media_picto->alt,
'picto_title' => $section_4->media_picto->title,
'reversedMobile' => true,
'reduction' => $reduction_4,
])
@endif
{{-- OTHER COMMITMENTS --}}
@include('fo.partials.commitments.other-commitments', [
'number' => $commitmentId,
'title' => $staticPageModel->data['common_section']['title'],
'text' => $staticPageModel->data['common_section']['content'],
])
@endsection