Updated unveil page

This commit is contained in:
Noah Lancien 2024-03-20 15:30:15 +01:00
parent d30cc71978
commit 0035e56ea0
5 changed files with 89 additions and 70 deletions

View file

@ -13,30 +13,31 @@ enum PageSectionEnum: int
case home_team = 3;
case home_life = 4;
case unveil_pole = 5;
case unveil_local = 6;
case unveil_sites = 7;
case unveil_history = 8;
case unveil_commitments = 9;
case hire_life = 10;
case hire_formation = 11;
case hire_grow = 12;
case hire_parity = 13;
case hire_find = 14;
case commit_ambition = 15;
case commit_breeding = 16;
case commit_living = 17;
case commit_respect_earth = 18;
case commit_feed = 19;
case commit_commitments = 20;
case move_life = 21;
case move_commitments = 22;
case produce_local = 23;
case produce_gms = 24;
case produce_rhd = 25;
case produce_export = 26;
case produce_quality = 27;
case produce_linking = 28;
case listening_study = 29;
case unveil_missions = 6;
case unveil_local = 7;
case unveil_sites = 8;
case unveil_history = 9;
case unveil_commitments = 10;
case hire_life = 11;
case hire_formation = 12;
case hire_grow = 13;
case hire_parity = 14;
case hire_find = 15;
case commit_ambition = 16;
case commit_breeding = 17;
case commit_living = 18;
case commit_respect_earth = 19;
case commit_feed = 20;
case commit_commitments = 21;
case move_life = 22;
case move_commitments = 23;
case produce_local = 24;
case produce_gms = 25;
case produce_rhd = 26;
case produce_export = 27;
case produce_quality = 28;
case produce_linking = 29;
case listening_study = 30;
/**
* Optionnal labels definition.
@ -49,6 +50,7 @@ enum PageSectionEnum: int
self::home_team->name => 'L\'équipe VOLENA',
self::home_life->name => 'La vie chez VOLENA',
self::unveil_pole->name => 'Le Pôle Volena',
self::unveil_missions->name => 'Nos Missions',
self::unveil_local->name => 'Notre Filière Locale',
self::unveil_sites->name => 'Nos Sites',
self::unveil_history->name => 'Histoire',
@ -96,6 +98,7 @@ enum PageSectionEnum: int
self::commit_feed,
self::move_commitments,
self::produce_linking => true,
self::unveil_missions,
self::unveil_local,
self::unveil_sites,
self::unveil_history,
@ -131,6 +134,7 @@ enum PageSectionEnum: int
self::unveil_history,
self::unveil_commitments => \App\Enums\CkEditorConfigName::base->label(),
self::unveil_pole,
self::unveil_missions,
self::unveil_local,
self::hire_life,
self::hire_formation,

View file

@ -58,6 +58,7 @@ class SectionSeeder extends Seeder
PageSectionEnum::home_missions,
PageSectionEnum::home_team => StaticPage::where('type', StaticPageType::home)->first()->id,
PageSectionEnum::unveil_pole,
PageSectionEnum::unveil_missions,
PageSectionEnum::unveil_local,
PageSectionEnum::unveil_sites,
PageSectionEnum::unveil_history,

View file

@ -21,6 +21,13 @@ $theme-colors: map.merge($theme-colors, $light-colors);
text-transform: inherit;
}
// Fix: header overlapped a section when we clicked on an anchor.
// DO NOT apply this class WITH border-top-curved-*. This is not necessary and will cause bugs.
.anchor-padding {
padding-top: $header-height;
margin-top: -$header-height;
}
.video-frame {
.video-thumbnail {
height: 100%;

View file

@ -17,7 +17,7 @@
@section('content')
{{-- LOCAL --}}
<section class="container my-4 text-center">
<section class="anchor-padding container my-4 text-center" id="local">
<div class="row">
<div class="col-12">
<h2 class="h2 fw-bold text-primary">{{ $localSection->h2_title }}</h2>

View file

@ -11,7 +11,7 @@
'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' => '#local',
'buttonLink' => '#missions',
])
@endsection
@ -34,7 +34,7 @@
'color' => 'sixt',
'value' => $keySection->data['bloc_key_sites']['value'],
'text' => 'sites',
'link' => '#FIXME: url "Nos Sites : acteur de nos campagnes"',
'link' => '#sites',
])
</div>
<div class="col-12 col-sm-6 col-lg-3 col-xl-2 my-4">
@ -42,7 +42,7 @@
'color' => 'quad',
'value' => $keySection->data['bloc_key_especes']['value'],
'text' => 'espèces',
'link' => '#FIXME: url "Notre Filière Locale, 100% française"',
'link' => '#local',
])
</div>
<div class="col-12 col-sm-6 col-lg-3 col-xl-2 my-4">
@ -50,7 +50,7 @@
'color' => 'tertiary',
'value' => $keySection->data['bloc_key_ca']['value'],
'text' => 'millions de ca',
'link' => '#FIXME: url "large gamme locale"',
'link' => route('fo.produce.show') . '#local',
])
</div>
<div class="col-12 col-sm-6 col-lg-3 col-xl-2 my-4">
@ -58,58 +58,66 @@
'color' => 'quint',
'value' => $keySection->data['bloc_key_collaborateurs']['value'],
'text' => 'collaborateurs',
'link' => '#FIXME: url "On Embauche"',
'link' => route('fo.hire.show'),
])
</div>
</div>
</div>
</section>
{{-- MISSIONS --}}
@php
$missionsSection = $sectionModels->where('section', \App\Enums\Sections\PageSectionEnum::unveil_missions)->first();
@endphp
<section class="missions border-top-curved-primary" id="missions">
<div class="text-bg-primary">
<div class="container">
<div class="row align-items-center">
<div class="col-12 mb-2 text-center">
<h2 class="h2 fw-bold">{{ $missionsSection->h2_title }}</h2>
@if ($missionsSection->text)
<div class="ck-content">
{!! clean($missionsSection->text) !!}
</div>
@endif
</div>
</div>
</div>
</div>
</section>
{{-- LOCAL --}}
@php
$localSection = $sectionModels->where('section', \App\Enums\Sections\PageSectionEnum::unveil_local)->first();
@endphp
<section class="local border-top-curved-primary" id="local">
<div class="text-bg-primary">
<div class="container">
<div class="row align-items-center">
{{-- FIXME: Ajouter une image éditable dans ce minicrud --}}
<div class="col-12 col-lg-6 d-flex justify-content-center mb-3">
<img class="h-fit" src="{{ Vite::asset('resources/assets/images/logo.png') }}" alt="{{ __('CHANGEME') }}"
title="{{ __('CHANGEME') }}>
</div>
<div class="col-12 col-lg-6
mb-2 text-center">
<h2 class="h2 fw-bold">{{ $localSection->h2_title }}</h2>
@if ($localSection->text)
<div class="ck-content">
{!! clean($localSection->text) !!}
</div>
@endif
</div>
<section class="local border-top-curved-upper-primary mb-5" id="local">
<div class="container">
<div class="row align-items-center">
<div class="col-12 mb-2">
<h2 class="h2 fw-bold text-primary text-center">{{ $localSection->h2_title }}</h2>
@if ($localSection->text)
<div class="ck-content">
{!! clean($localSection->text) !!}
</div>
@endif
</div>
</div>
</div>
</section>
{{-- FIXME: Entre la partie en bleu et la partie 'nos sites' est visible une autre partie sur la créa, or toutes les sections sont déjà utilisées. Qu'est-ce que c'est ? REDECOUPAGE A FAIRE DES SECTIONS --}}
{{-- FIXME: Dans cette même partie, il y a 3 images accompagnées d'une légende et d'un texte qui sont en colonne pour le mobile et en slider pour le desktop. Actuellement, ces images sont dans un WYSIWYG. On rend administrables les images ? OUI --}}
{{-- SITES --}}
@php
$siteSection = $sectionModels->where('section', \App\Enums\Sections\PageSectionEnum::unveil_sites)->first();
@endphp
<section class="sites border-top-curved-white mb-5">
<section class="sites anchor-padding mb-5" id="sites">
<div class="container">
<div class="row text-bg-primary rounded-3 p-4 text-center">
<div class="row text-bg-primary rounded-3 p-4">
<div class="col-12 col-lg-6">
<div class="">
<h2 class="h2 fw-bold">{{ $siteSection->h2_title }}</h2>
@if ($siteSection->text)
<div class="ck-content">
{!! clean($siteSection->text) !!}
</div>
@endif
</div>
<h2 class="h2 fw-bold text-center">{{ $siteSection->h2_title }}</h2>
@if ($siteSection->text)
<div class="ck-content">
{!! clean($siteSection->text) !!}
</div>
@endif
</div>
<div class="col-12 col-lg-6 order-lg-first d-flex justify-content-center">
<div class="col-12 col-lg-6 d-flex justify-content-center">
{{-- FIXME: Quelles coordonnées pour la map ? --}}
<div class="embed-map w-100 my-3">
<iframe class="rounded-3"
@ -128,8 +136,8 @@
<section class="history mb-5 overflow-hidden pb-5">
<div class="container">
<div class="row">
<div class="col-12 text-center">
<h2 class="h2 fw-bold text-primary">{{ $historySection->h2_title }}</h2>
<div class="col-12">
<h2 class="h2 fw-bold text-primary text-center">{{ $historySection->h2_title }}</h2>
@if ($historySection->text)
<div class="ck-content text-primary">
{!! clean($historySection->text) !!}
@ -138,14 +146,13 @@
</div>
{{-- HISTORICAL MILESTONES SWIPER --}}
<div class="col-12 position-relative">
{{-- FIXME: en desktop, le carousel-indicators n'est pas mis à jour au clic. La slide change mais pas l'indicateur... --}}
@php
$colors = ['quint', 'secondary', 'sixt', 'quad'];
@endphp
<div class="carousel slide carousel-fade pb-5" id="historical-milestone-carousel">
<div class="d-lg-none">
<div class="carousel-indicators justify-content-between">
<div class="swiper swiper-year mt-lg-0 w-100 mt-5 h-fit overflow-visible" id="swiper-year">
<div class="swiper swiper-year w-100 h-fit overflow-visible" id="swiper-year">
<div class="swiper-wrapper">
@foreach ($historicalMilestoneModels as $historicalMilestoneModel)
<div class="swiper-slide d-flex justify-content-center">
@ -187,7 +194,7 @@
</div>
</div>
<div class="carousel-inner overflow-visible">
<div class="carousel-inner overflow-visible pb-4">
@foreach ($historicalMilestoneModels as $historicalMilestoneModel)
<div @class(['carousel-item bg-body', 'active' => $loop->first])>
@if ($historicalMilestoneModel->picture)
@ -214,7 +221,7 @@
@endif
</div>
@if ($historicalMilestoneModel->button_status)
<a class="btn btn-{{ $colors[$loop->index % 4] }} rounded-5 mt-3 text-white"
<a class="btn btn-{{ $colors[$loop->index % 4] }} rounded-5 mt-3 text-inherit text-white"
href="{{ $historicalMilestoneModel->button_url }}"
@if ($historicalMilestoneModel->button_new_tab) target="_blank" @endif>
{{ $historicalMilestoneModel->button_label }}
@ -239,15 +246,15 @@
<div class="container">
<div class="row">
<div class="col-12">
<div class="text-bg-quint rounded-3 text-lg-center p-4">
<h2>{{ $commitmentSection->h2_title }}</h2>
<div class="text-bg-quint rounded-3 p-4">
<h2 class="h2 text-lg-center">{{ $commitmentSection->h2_title }}</h2>
@if ($commitmentSection->text)
<div class="ck-content">
{!! clean($commitmentSection->text) !!}
</div>
@endif
<div class="d-flex justify-content-center my-4">
<a class="btn btn-white text-quint rounded-5 fw-bold" href="#CHANGEME"
<a class="btn btn-white text-quint rounded-5 fw-bold text-inherit" href="{{ route('fo.commit.show') }}"
title="{{ __('Accéder à la page \'On s\'engage\'') }}">{{ __('On s\'engage') }}</a>
</div>
</div>