fix commitment page

This commit is contained in:
Alexis Gousseau 2024-03-20 15:23:42 +01:00
parent 54317c0e58
commit d30cc71978
5 changed files with 52 additions and 40 deletions

View file

@ -123,7 +123,7 @@ class Section extends Model
}
/**
* Empty bloc for link associated to the picture.
* Empty bloc for link.
*
* @param array $data
* @param string $url
@ -131,13 +131,13 @@ class Section extends Model
* @param string $name
* @return array
*/
public static function emptyPictureLinkBloc(
public static function emptyLinkBloc(
array $data,
string $url = '',
bool $required = false,
string $name = "URL à ouvrir",
) {
$data["bloc_image_link"] = [
$data["bloc_link"] = [
'label' => $name,
'inputType' => InputType::url->value,
'value' => $url,

View file

@ -388,6 +388,7 @@ class SectionSeeder extends Seeder
$data,
$section->emptyWysiwygBloc([], 'numéro 2', clean(\fake()->randomHtml()), CkEditorConfigName::advanced)
);
$data = array_merge($data, $section->emptyLinkBloc([], 'https://www.google.com', true));
return $data;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

View file

@ -1,5 +1,5 @@
import Swiper from "swiper";
import { Keyboard, Navigation, Pagination } from "swiper/modules";
import { Autoplay, Keyboard, Navigation, Pagination } from "swiper/modules";
document.addEventListener("DOMContentLoaded", function () {
// Define a multiplier according to the window size.
@ -45,10 +45,14 @@ document.addEventListener("DOMContentLoaded", function () {
}
},
"swiper-teams": {
modules: [Navigation, Pagination],
modules: [Autoplay, Navigation, Pagination],
grabCursor: true,
slidesPerView: 1,
loop: true,
autoplay: {
delay: 3000,
disableOnInteraction: false,
},
pagination: {
el: ".swiper-teams-pagination",
clickable: true,
@ -232,6 +236,7 @@ document.addEventListener("DOMContentLoaded", function () {
modules: [Navigation, Keyboard],
grabCursor: true,
slidesPerView: 1.1,
spaceBetween: 10,
navigation: {
nextEl: ".swiper-commitments-testimonials-button-next",
prevEl: ".swiper-commitments-testimonials-button-prev",

View file

@ -11,20 +11,20 @@
'title' => __('Paysage d\'un champs de blé au soleil couchant avec une lisière en fond de tableau'),
'alt' => __('Image de fond'),
'displayArrow' => true,
'buttonLink' => '#breeding',
'buttonLink' => '#introduction',
])
@endsection
@section('content')
<section class="commit">
{{-- AMBITION --}}
<section class="ambition my-4">
<section class="ambition my-4" id="introduction">
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="h2 fw-bold text-primary text-center">{{ $ambitionSection->h2_title }}</h2>
@if ($ambitionSection->text)
<div class="ck-content text-primary">
<div class="ck-content text-primary text-center">
{!! clean($ambitionSection->text) !!}
</div>
@endif
@ -70,7 +70,7 @@
<div class="col-12">
<h2 class="h2 fw-bold text-center">{{ $breedingSection->h2_title }}</h2>
@if ($breedingSection->text)
<div class="ck-content">
<div class="ck-content text-center">
{!! clean($breedingSection->text) !!}
</div>
@endif
@ -86,10 +86,11 @@
'position' => 'right',
])
</div>
<div class="col-12 col-md-6 d-flex flex-column justify-content-center overflow-hidden">
<div class="col-12 col-md-6 d-flex flex-column justify-content-center overflow-hidden text-center">
{!! clean($breedingSection->data['bloc_images_content']['value']) !!}
@if ($breedingSection->data['bloc_button_on_temoigne_engagements']['value'])
<a class="btn btn-primary rounded-pill w-fit" href="#CHANGEME">{{ __('On témoigne') }}</a>
<a class="btn btn-primary rounded-pill mx-auto w-fit"
href="{{ route('fo.hire.show') }}#we-testimonials">{{ __('On témoigne') }}</a>
@endif
</div>
</div>
@ -105,10 +106,16 @@
<div class="border-bottom-curved-tertiary w-100"></div>
<div class="breeding-light bg-tertiary-light">
<div class="container">
{{-- FIXME: le document synthèse BO prévoyait un WYSIWYG, le doc de fonctionnalité et la créa demandent des images avec légendes ainsi qu'une vidéo ... Ils seraient donc à rentrer dans le WYSIWYG --}}
<div class="ck-content">
{{-- {!! clean($breedingSection->data['bloc_images_content']['value']) !!} --}}
<p class="m-0">ceci est un paragraphe de remplacement</p>
<div class="row flex-column align-items-center justify-content-center">
<div class="col-12">
<h2 class="h2 fw-bold text-primary text-center">{{ __('Faîtes vous votre avis vous-même') }}</h2>
</div>
<div class="col-12 col-sm-4">
<a href="https://www.youtube.com/channel/UCiOgBdc7eaU5vp4VPEk4s8w" target="_blank">
<img class="img-fluid" src="{{ Vite::asset('resources/assets/images/others/logo_nature_eleveurs.png') }}"
alt="{{ __('Logo Nature d\'éleveurs') }}">
</a>
</div>
</div>
</div>
</div>
@ -129,7 +136,7 @@
<div class="row justify-content-md-between align-items-center">
<div class="commit-text-absolute col-12 col-md-4 col-lg-5 py-md-0 pb-3">
@if ($lifeSection->text)
<div class="ck-content text-primary">
<div class="ck-content text-primary text-center">
{!! clean($lifeSection->text) !!}
</div>
@endif
@ -161,10 +168,9 @@
</div>
</div>
@endif
{{-- FIXME: partie remerciement à compléter --}}
<div class="row py-4">
<div class="col-12">
<div class="ck-content text-primary">
<div class="ck-content text-primary text-center">
{!! clean($lifeSection->data['bloc_numero2_content']['value']) !!}
</div>
</div>
@ -172,7 +178,7 @@
@if ($lifeSection->data['bloc_button_on_bouge']['value'])
<div class="row">
<div class="col-12">
<a class="btn btn-primary rounded-pill" data-bs-toggle="tooltip" href="#CHANGEME: vers page on bouge ensemble"
<a class="btn btn-primary rounded-pill" data-bs-toggle="tooltip" href="{{ route('fo.news.index') }}"
title="{{ __('Accéder à la page On bouge ensemble') }}">{{ __('On bouge ensemble') }}</a>
</div>
</div>
@ -218,7 +224,8 @@
@if ($earthSection->data['bloc_button_on_temoigne_engagements']['value'])
<div class="row pt-4">
<div class="col-12">
<a class="btn btn-primary rounded-pill" href="#CHANGEME: Anchor on témoigne">{{ __('On témoigne') }}</a>
<a class="btn btn-primary rounded-pill"
href="{{ route('fo.hire.show') }}#we-testimonials">{{ __('On témoigne') }}</a>
</div>
</div>
@endif
@ -249,7 +256,8 @@
</div>
<div class="text-start">
<a class="btn btn-primary rounded-pill mb-0 mb-3 mt-3 text-inherit"
href="#CHANGEME">{{ __('En savoir plus sur BREEAM') }}</a>
href="{{ $earthSection->data['bloc_link']['value'] }}"
target="_blank">{{ __('En savoir plus sur BREEAM') }}</a>
</div>
</div>
</div>
@ -257,7 +265,6 @@
</div>
</div>
</div>
{{-- FIXME: sliders (image/text) à compléter ici --}}
</div>
</div>
</section>
@ -276,7 +283,7 @@
<div class="row justify-content-md-between align-items-center">
<div class="commit-text-absolute col-12 col-md-4 col-lg-5 py-md-0 pb-3">
@if ($feedSection->text)
<div class="ck-content text-primary">
<div class="ck-content text-primary text-center">
{!! clean($feedSection->text) !!}
</div>
@endif
@ -300,34 +307,35 @@
])
</div>
</div>
{{-- @if ($feedSection->data['bloc_button_on_temoigne_engagements']['value']) --}}
<div class="row mb-4">
<div class="col-12 d-flex justify-content-center">
<a class="btn btn-primary rounded-pill" href="#CHANGEME: Anchor on témoigne">{{ __('On témoigne') }}</a>
@if ($feedSection->data['bloc_button_on_temoigne_engagements']['value'])
<div class="row mb-4">
<div class="col-12 d-flex justify-content-center">
<a class="btn btn-primary rounded-pill"
href="{{ route('fo.hire.show') }}#we-testimonials">{{ __('On témoigne') }}</a>
</div>
</div>
</div>
{{-- @endif --}}
@endif
<div class="row">
<div class="col-12">
<div class="ck-content text-primary">
<div class="ck-content text-primary text-center">
{!! clean($feedSection->data['bloc_numero2_content']['value']) !!}
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="ck-content text-primary">
<div class="ck-content text-primary text-center text-center">
{!! clean($feedSection->data['bloc_numero3_content']['value']) !!}
</div>
</div>
</div>
{{-- @if ($feedSection->data['bloc_button_on_produit']['value']) --}}
<div class="row">
<div class="col-12 d-flex justify-content-center">
<a class="btn btn-primary rounded-pill" href="#CHANGEME">{{ __('On produit') }}</a>
@if ($feedSection->data['bloc_button_on_produit']['value'])
<div class="row">
<div class="col-12 d-flex justify-content-center mt-3">
<a class="btn btn-primary rounded-pill" href="{{ route('fo.produce.show') }}">{{ __('On produit') }}</a>
</div>
</div>
</div>
{{-- @endif --}}
@endif
</div>
</section>
{{-- TESTIMONIALS --}}
@ -352,7 +360,6 @@
<div class="swiper swiper-commitments-testimonials mt-lg-0 mt-5 h-fit overflow-visible"
id="swiper-commitments-testimonials">
<div class="swiper-wrapper h-fit">
{{-- FIXME: Dans le doc fonctionnalité, il est dit que la coulur de fond change en fonction du type de témoignage. Dans la créa, c'est seulement la couleur du job qui change. Qu'est-ce qu'on fait ? --}}
@foreach ($testimonialModels as $testimonial)
<div class="swiper-slide h-auto">
@include('fo.partials.testimonials.card', [
@ -394,8 +401,7 @@
{{ $testimonialsSection->data['bloc_string_titre_h3_de_la_section_numero2']['value'] }}
</h3>
@if ($testimonialsSection->text)
<div class="ck-content text-primary">
{{-- FIXME: un lien est prévu dans la créa et pas dans le bo, il peut être inséré via le WYSIWYG --}}
<div class="ck-content text-primary text-center">
{!! clean($testimonialsSection->text) !!}
</div>
@endif