From edd9028336152f9bc235e6aabee52be2ec6aa33e Mon Sep 17 00:00:00 2001 From: Corentin Huet Date: Thu, 5 Mar 2026 10:35:06 +0100 Subject: [PATCH 1/4] feat: :sparkles: implement CRUD stickies --- .../Controllers/Fo/StaticPageController.php | 2 +- resources/sass/fo/pages/_hire.scss | 41 +++++++++++++++++++ resources/ts/fo/fo.ts | 4 ++ resources/ts/fo/pages/we-hire.ts | 17 ++++++++ .../views/bo/pages/stickies/form.blade.php | 4 ++ 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 resources/ts/fo/pages/we-hire.ts diff --git a/app/Http/Controllers/Fo/StaticPageController.php b/app/Http/Controllers/Fo/StaticPageController.php index 8490373..b3a06ee 100644 --- a/app/Http/Controllers/Fo/StaticPageController.php +++ b/app/Http/Controllers/Fo/StaticPageController.php @@ -277,7 +277,7 @@ class StaticPageController extends Controller $paritySection = $sectionModels->where('section', PageSectionEnum::hire_parity)->first(); $findSection = $sectionModels->where('section', PageSectionEnum::hire_find)->first(); $carouselSectionParity = Carousel::query()->where('section_id', PageSectionEnum::hire_parity)->where('published', true)->get(); - $navLinks = Sticky::query()->where('type', StaticPageType::we_hire)->get(); + $navLinks = Sticky::query()->where('type', StaticPageType::we_hire)->get(); return view('fo.pages.hire', \compact( 'staticPageModel', diff --git a/resources/sass/fo/pages/_hire.scss b/resources/sass/fo/pages/_hire.scss index e36241e..2230e7c 100644 --- a/resources/sass/fo/pages/_hire.scss +++ b/resources/sass/fo/pages/_hire.scss @@ -47,4 +47,45 @@ filter: invert(1); } } + + .we-hire-navigation { + @include media-breakpoint-up(md) { + position: fixed; + z-index: 10; + bottom: 4rem; + left: 4rem; + max-width: 15rem; + + &-wrapper { + height: 0; + opacity: 0; + transform: translateY(25%); + transition: .3s; + visibility: hidden; + + &.show { + height: auto; + opacity: 1; + transform: translateY(0); + visibility: visible; + } + } + } + + .col-md-12 { + @include media-breakpoint-up(md) { + width: fit-content; + } + + .badge { + width: .5rem; + height: .5rem; + + @include media-breakpoint-up(md) { + width: 1rem; + height: 1rem; + } + } + } + } } diff --git a/resources/ts/fo/fo.ts b/resources/ts/fo/fo.ts index c1c5da6..72ab4c7 100644 --- a/resources/ts/fo/fo.ts +++ b/resources/ts/fo/fo.ts @@ -21,5 +21,9 @@ import "./base/sticky"; // PAGES import "./pages/unveil"; +<<<<<<< HEAD import "./pages/site"; +======= +import "./pages/we-hire"; +>>>>>>> ed349bc (feat: :sparkles: implement CRUD stickies) diff --git a/resources/ts/fo/pages/we-hire.ts b/resources/ts/fo/pages/we-hire.ts new file mode 100644 index 0000000..bbea9d7 --- /dev/null +++ b/resources/ts/fo/pages/we-hire.ts @@ -0,0 +1,17 @@ +document.addEventListener("DOMContentLoaded", function () { + const weHire = document.querySelector("section.we-hire"); + if (weHire === null) { + return; + } + + const button = document.querySelector(".we-hire-navigation .btn") as HTMLButtonElement; + const navWrapper = document.querySelectorAll(".we-hire-navigation-wrapper "); + button.addEventListener("click", () => { + navWrapper.forEach((element: Element) => { + element.classList.toggle("show"); + }); + document.querySelectorAll(".we-hire-navigation .btn svg").forEach(icon => { + icon.classList.toggle("d-none"); + }); + }); +}); diff --git a/resources/views/bo/pages/stickies/form.blade.php b/resources/views/bo/pages/stickies/form.blade.php index 42d5af4..6f2d9a1 100644 --- a/resources/views/bo/pages/stickies/form.blade.php +++ b/resources/views/bo/pages/stickies/form.blade.php @@ -53,7 +53,11 @@ {{-- ANCHOR --}} +<<<<<<< HEAD @can('create', \App\Models\Sticky::class) +======= + @can('view', \App\Models\Sticky::class) +>>>>>>> ed349bc (feat: :sparkles: implement CRUD stickies)
{{ Str::ucfirst(__('validation.custom.anchor')) }} From a3a01e5296f4e8c344e7c3df96e95f402d2522fb Mon Sep 17 00:00:00 2001 From: Corentin Huet Date: Thu, 5 Mar 2026 10:54:49 +0100 Subject: [PATCH 2/4] feat: :sparkles: add stickies on unveil page --- .../Controllers/Fo/StaticPageController.php | 4 +- database/seeders/Mandatory/StickySeeder.php | 35 +++++++++++++++ resources/sass/fo/pages/_unveil.scss | 41 ++++++++++++++++++ resources/ts/fo/pages/unveil.ts | 11 +++++ resources/views/fo/pages/unveil.blade.php | 43 ++++++++++++++++++- 5 files changed, 132 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Fo/StaticPageController.php b/app/Http/Controllers/Fo/StaticPageController.php index b3a06ee..32bcbf4 100644 --- a/app/Http/Controllers/Fo/StaticPageController.php +++ b/app/Http/Controllers/Fo/StaticPageController.php @@ -91,6 +91,7 @@ class StaticPageController extends Controller $siteSection = $sectionModels->where('section', PageSectionEnum::unveil_sites)->first(); $historySection = $sectionModels->where('section', PageSectionEnum::unveil_history)->first(); $commitmentSection = $sectionModels->where('section', PageSectionEnum::unveil_commitments)->first(); + $navLinks = Sticky::query()->where('type', StaticPageType::unveil)->get(); $viewBox = null; $initialZoom = null; @@ -119,7 +120,8 @@ class StaticPageController extends Controller 'localSection', 'siteSection', 'historySection', - 'commitmentSection' + 'commitmentSection', + 'navLinks' )); } diff --git a/database/seeders/Mandatory/StickySeeder.php b/database/seeders/Mandatory/StickySeeder.php index 13c42dd..0f580ba 100644 --- a/database/seeders/Mandatory/StickySeeder.php +++ b/database/seeders/Mandatory/StickySeeder.php @@ -48,5 +48,40 @@ class StickySeeder extends Seeder 'anchor' => 'on-se-retrouve' ], ); + Sticky::query()->updateOrCreate( + [ + 'type' => StaticPageType::unveil, + 'title' => 'VOLENA', + 'anchor' => 'key-numbers' + ], + ); + Sticky::query()->updateOrCreate( + [ + 'type' => StaticPageType::unveil, + 'title' => 'Notre mission', + 'anchor' => 'missions' + ], + ); + Sticky::query()->updateOrCreate( + [ + 'type' => StaticPageType::unveil, + 'title' => 'Filière 100% française', + 'anchor' => 'local' + ], + ); + Sticky::query()->updateOrCreate( + [ + 'type' => StaticPageType::unveil, + 'title' => 'Nos sites', + 'anchor' => 'sites' + ], + ); + Sticky::query()->updateOrCreate( + [ + 'type' => StaticPageType::unveil, + 'title' => 'Notre histoire', + 'anchor' => 'history' + ], + ); } } diff --git a/resources/sass/fo/pages/_unveil.scss b/resources/sass/fo/pages/_unveil.scss index 3e3a095..36269fc 100644 --- a/resources/sass/fo/pages/_unveil.scss +++ b/resources/sass/fo/pages/_unveil.scss @@ -139,4 +139,45 @@ } } } + + .unveil-navigation { + @include media-breakpoint-up(md) { + position: fixed; + z-index: 10; + bottom: 4rem; + left: 4rem; + max-width: 15rem; + + &-wrapper { + height: 0; + opacity: 0; + transform: translateY(25%); + transition: .3s; + visibility: hidden; + + &.show { + height: auto; + opacity: 1; + transform: translateY(0); + visibility: visible; + } + } + } + + .col-md-12 { + @include media-breakpoint-up(md) { + width: fit-content; + } + + .badge { + width: .5rem; + height: .5rem; + + @include media-breakpoint-up(md) { + width: 1rem; + height: 1rem; + } + } + } + } } diff --git a/resources/ts/fo/pages/unveil.ts b/resources/ts/fo/pages/unveil.ts index fa9f8f6..4591d02 100644 --- a/resources/ts/fo/pages/unveil.ts +++ b/resources/ts/fo/pages/unveil.ts @@ -7,6 +7,17 @@ document.addEventListener("DOMContentLoaded", function () { return; } + const button = document.querySelector(".unveil-navigation .btn") as HTMLButtonElement; + const navWrapper = document.querySelectorAll(".unveil-navigation-wrapper "); + button.addEventListener("click", () => { + navWrapper.forEach((element: Element) => { + element.classList.toggle("show"); + }); + document.querySelectorAll(".unveil-navigation .btn svg").forEach(icon => { + icon.classList.toggle("d-none"); + }); + }); + // The colors to use in the carousel, in this order. const colors = [ "quint", "secondary", "sixt", "quad" diff --git a/resources/views/fo/pages/unveil.blade.php b/resources/views/fo/pages/unveil.blade.php index 30147fa..d322276 100644 --- a/resources/views/fo/pages/unveil.blade.php +++ b/resources/views/fo/pages/unveil.blade.php @@ -19,6 +19,47 @@
{{-- KEY NUMBERS --}}
+
+
+ @foreach ($navLinks as $key => $link) +
+
index) { + 0 => 'bg-primary-light', + 1 => 'bg-secondary-light', + 2 => 'bg-quad-light', + 3 => 'bg-quint-light', + 4 => 'bg-sixt-light', + default => 'bg-primary-light' + } + ])> + + index) { + 0 => 'bg-primary', + 1 => 'bg-secondary', + 2 => 'bg-quad', + 3 => 'bg-quint', + 4 => 'bg-sixt', + default => 'bg-primary' + } + ])> + {{ $link->title }} + +
+
+ @endforeach +
+ +
@@ -130,7 +171,7 @@
{{-- OUR HISTORY --}} -
+
From 5e9e542d8779ba36fbb8191501f6e75750b162aa Mon Sep 17 00:00:00 2001 From: Corentin Huet Date: Wed, 25 Mar 2026 12:09:29 +0100 Subject: [PATCH 3/4] fix: :bug: resolve various bugs --- resources/lang/fr/models.php | 2 +- resources/sass/fo/pages/_hire.scss | 41 ---------- resources/ts/fo/fo.ts | 4 - resources/ts/fo/pages/unveil.ts | 11 --- resources/ts/fo/pages/we-hire.ts | 17 ---- .../views/bo/pages/stickies/form.blade.php | 4 - .../bo/pages/stickies/index-list.blade.php | 2 +- .../views/fo/pages/commitments.blade.php | 60 +++++++------- resources/views/fo/pages/hire.blade.php | 82 +++++++++---------- resources/views/fo/pages/unveil.blade.php | 82 +++++++++---------- 10 files changed, 114 insertions(+), 191 deletions(-) delete mode 100644 resources/ts/fo/pages/we-hire.ts diff --git a/resources/lang/fr/models.php b/resources/lang/fr/models.php index d219ee3..85f0428 100644 --- a/resources/lang/fr/models.php +++ b/resources/lang/fr/models.php @@ -17,7 +17,7 @@ return [ 'network' => 'réseau|réseaux', 'aisle' => 'rayon', 'brand' => 'marque', - 'carousel' => 'carrousel|carrousels' + 'carousel' => 'carrousel|carrousels', 'sticky' => 'menu d\'ancre|menu d\'ancres' ] ]; diff --git a/resources/sass/fo/pages/_hire.scss b/resources/sass/fo/pages/_hire.scss index 2230e7c..e36241e 100644 --- a/resources/sass/fo/pages/_hire.scss +++ b/resources/sass/fo/pages/_hire.scss @@ -47,45 +47,4 @@ filter: invert(1); } } - - .we-hire-navigation { - @include media-breakpoint-up(md) { - position: fixed; - z-index: 10; - bottom: 4rem; - left: 4rem; - max-width: 15rem; - - &-wrapper { - height: 0; - opacity: 0; - transform: translateY(25%); - transition: .3s; - visibility: hidden; - - &.show { - height: auto; - opacity: 1; - transform: translateY(0); - visibility: visible; - } - } - } - - .col-md-12 { - @include media-breakpoint-up(md) { - width: fit-content; - } - - .badge { - width: .5rem; - height: .5rem; - - @include media-breakpoint-up(md) { - width: 1rem; - height: 1rem; - } - } - } - } } diff --git a/resources/ts/fo/fo.ts b/resources/ts/fo/fo.ts index 72ab4c7..c1c5da6 100644 --- a/resources/ts/fo/fo.ts +++ b/resources/ts/fo/fo.ts @@ -21,9 +21,5 @@ import "./base/sticky"; // PAGES import "./pages/unveil"; -<<<<<<< HEAD import "./pages/site"; -======= -import "./pages/we-hire"; ->>>>>>> ed349bc (feat: :sparkles: implement CRUD stickies) diff --git a/resources/ts/fo/pages/unveil.ts b/resources/ts/fo/pages/unveil.ts index 4591d02..fa9f8f6 100644 --- a/resources/ts/fo/pages/unveil.ts +++ b/resources/ts/fo/pages/unveil.ts @@ -7,17 +7,6 @@ document.addEventListener("DOMContentLoaded", function () { return; } - const button = document.querySelector(".unveil-navigation .btn") as HTMLButtonElement; - const navWrapper = document.querySelectorAll(".unveil-navigation-wrapper "); - button.addEventListener("click", () => { - navWrapper.forEach((element: Element) => { - element.classList.toggle("show"); - }); - document.querySelectorAll(".unveil-navigation .btn svg").forEach(icon => { - icon.classList.toggle("d-none"); - }); - }); - // The colors to use in the carousel, in this order. const colors = [ "quint", "secondary", "sixt", "quad" diff --git a/resources/ts/fo/pages/we-hire.ts b/resources/ts/fo/pages/we-hire.ts deleted file mode 100644 index bbea9d7..0000000 --- a/resources/ts/fo/pages/we-hire.ts +++ /dev/null @@ -1,17 +0,0 @@ -document.addEventListener("DOMContentLoaded", function () { - const weHire = document.querySelector("section.we-hire"); - if (weHire === null) { - return; - } - - const button = document.querySelector(".we-hire-navigation .btn") as HTMLButtonElement; - const navWrapper = document.querySelectorAll(".we-hire-navigation-wrapper "); - button.addEventListener("click", () => { - navWrapper.forEach((element: Element) => { - element.classList.toggle("show"); - }); - document.querySelectorAll(".we-hire-navigation .btn svg").forEach(icon => { - icon.classList.toggle("d-none"); - }); - }); -}); diff --git a/resources/views/bo/pages/stickies/form.blade.php b/resources/views/bo/pages/stickies/form.blade.php index 6f2d9a1..42d5af4 100644 --- a/resources/views/bo/pages/stickies/form.blade.php +++ b/resources/views/bo/pages/stickies/form.blade.php @@ -53,11 +53,7 @@
{{-- ANCHOR --}} -<<<<<<< HEAD @can('create', \App\Models\Sticky::class) -======= - @can('view', \App\Models\Sticky::class) ->>>>>>> ed349bc (feat: :sparkles: implement CRUD stickies)
{{ Str::ucfirst(__('validation.custom.anchor')) }} diff --git a/resources/views/bo/pages/stickies/index-list.blade.php b/resources/views/bo/pages/stickies/index-list.blade.php index 74a3241..0db8cff 100644 --- a/resources/views/bo/pages/stickies/index-list.blade.php +++ b/resources/views/bo/pages/stickies/index-list.blade.php @@ -11,7 +11,7 @@ @foreach ($stickyModels as $stickyModel) - + {{ $stickyModel->type->label() }} {{ $stickyModel->title }} diff --git a/resources/views/fo/pages/commitments.blade.php b/resources/views/fo/pages/commitments.blade.php index ce2cb54..bcb1eb8 100644 --- a/resources/views/fo/pages/commitments.blade.php +++ b/resources/views/fo/pages/commitments.blade.php @@ -17,38 +17,38 @@ @section('content')
+ {{-- AMBITION --}}
-

{{ $ambitionSection->h2_title }}

diff --git a/resources/views/fo/pages/hire.blade.php b/resources/views/fo/pages/hire.blade.php index 5606669..a23853d 100644 --- a/resources/views/fo/pages/hire.blade.php +++ b/resources/views/fo/pages/hire.blade.php @@ -17,49 +17,49 @@ @section('content')
+ {{-- COMPAGNY LIFE --}}
-
diff --git a/resources/views/fo/pages/unveil.blade.php b/resources/views/fo/pages/unveil.blade.php index d322276..bba27b7 100644 --- a/resources/views/fo/pages/unveil.blade.php +++ b/resources/views/fo/pages/unveil.blade.php @@ -17,49 +17,49 @@ @section('content')
+ {{-- KEY NUMBERS --}}
-
-
- @foreach ($navLinks as $key => $link) -
-
index) { - 0 => 'bg-primary-light', - 1 => 'bg-secondary-light', - 2 => 'bg-quad-light', - 3 => 'bg-quint-light', - 4 => 'bg-sixt-light', - default => 'bg-primary-light' - } - ])> - - index) { - 0 => 'bg-primary', - 1 => 'bg-secondary', - 2 => 'bg-quad', - 3 => 'bg-quint', - 4 => 'bg-sixt', - default => 'bg-primary' - } - ])> - {{ $link->title }} - -
-
- @endforeach -
- -
From 906e81cda7c35afea2158cb27d30ae1e4848a735 Mon Sep 17 00:00:00 2001 From: Corentin Huet Date: Wed, 25 Mar 2026 15:13:06 +0100 Subject: [PATCH 4/4] feat: :sparkles: add migration to seed sticky elements --- .../2026_03_25_150536_stickies_seeder.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 database/migrations/2026_03_25_150536_stickies_seeder.php diff --git a/database/migrations/2026_03_25_150536_stickies_seeder.php b/database/migrations/2026_03_25_150536_stickies_seeder.php new file mode 100644 index 0000000..a853afb --- /dev/null +++ b/database/migrations/2026_03_25_150536_stickies_seeder.php @@ -0,0 +1,26 @@ + StickySeeder::class + ]); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // + } +};