From 0035e56ea0fad7f9aa776188ea2f8526cee16c35 Mon Sep 17 00:00:00 2001 From: Noah Lancien Date: Wed, 20 Mar 2024 15:30:15 +0100 Subject: [PATCH] Updated unveil page --- app/Enums/Sections/PageSectionEnum.php | 52 +++++----- .../seeders/Development/SectionSeeder.php | 1 + resources/sass/fo/base/_common.scss | 7 ++ .../views/fo/pages/produce/show.blade.php | 2 +- resources/views/fo/pages/unveil.blade.php | 97 ++++++++++--------- 5 files changed, 89 insertions(+), 70 deletions(-) diff --git a/app/Enums/Sections/PageSectionEnum.php b/app/Enums/Sections/PageSectionEnum.php index 7910060..5e75372 100644 --- a/app/Enums/Sections/PageSectionEnum.php +++ b/app/Enums/Sections/PageSectionEnum.php @@ -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, diff --git a/database/seeders/Development/SectionSeeder.php b/database/seeders/Development/SectionSeeder.php index c41df6e..d0a8656 100644 --- a/database/seeders/Development/SectionSeeder.php +++ b/database/seeders/Development/SectionSeeder.php @@ -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, diff --git a/resources/sass/fo/base/_common.scss b/resources/sass/fo/base/_common.scss index a7df212..abafa5e 100644 --- a/resources/sass/fo/base/_common.scss +++ b/resources/sass/fo/base/_common.scss @@ -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%; diff --git a/resources/views/fo/pages/produce/show.blade.php b/resources/views/fo/pages/produce/show.blade.php index e1c09e6..6a96233 100644 --- a/resources/views/fo/pages/produce/show.blade.php +++ b/resources/views/fo/pages/produce/show.blade.php @@ -17,7 +17,7 @@ @section('content') {{-- LOCAL --}} -
+

{{ $localSection->h2_title }}

diff --git a/resources/views/fo/pages/unveil.blade.php b/resources/views/fo/pages/unveil.blade.php index 5a0503f..6f0f015 100644 --- a/resources/views/fo/pages/unveil.blade.php +++ b/resources/views/fo/pages/unveil.blade.php @@ -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', ])
@@ -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', ])
@@ -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', ])
@@ -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'), ])
+ {{-- MISSIONS --}} + @php + $missionsSection = $sectionModels->where('section', \App\Enums\Sections\PageSectionEnum::unveil_missions)->first(); + @endphp +
+
+
+
+
+

{{ $missionsSection->h2_title }}

+ @if ($missionsSection->text) +
+ {!! clean($missionsSection->text) !!} +
+ @endif +
+
+
+
+
{{-- LOCAL --}} @php $localSection = $sectionModels->where('section', \App\Enums\Sections\PageSectionEnum::unveil_local)->first(); @endphp -
-
-
-
- {{-- FIXME: Ajouter une image éditable dans ce minicrud --}} -
- {{ __('CHANGEME') }} -

{{ $localSection->h2_title }}

- @if ($localSection->text) -
- {!! clean($localSection->text) !!} -
- @endif -
+
+
+
+
+

{{ $localSection->h2_title }}

+ @if ($localSection->text) +
+ {!! clean($localSection->text) !!} +
+ @endif
- {{-- 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 -
+
-
+
-
-

{{ $siteSection->h2_title }}

- @if ($siteSection->text) -
- {!! clean($siteSection->text) !!} -
- @endif -
+

{{ $siteSection->h2_title }}

+ @if ($siteSection->text) +
+ {!! clean($siteSection->text) !!} +
+ @endif
-
+
{{-- FIXME: Quelles coordonnées pour la map ? --}}