fix: 🐛 resolve various bugs

This commit is contained in:
Corentin Huet 2026-03-25 12:09:29 +01:00
parent a3a01e5296
commit 5e9e542d87
10 changed files with 114 additions and 191 deletions

View file

@ -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'
]
];

View file

@ -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;
}
}
}
}
}

View file

@ -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)

View file

@ -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"

View file

@ -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");
});
});
});

View file

@ -53,11 +53,7 @@
</fieldset>
</div>
{{-- ANCHOR --}}
<<<<<<< HEAD
@can('create', \App\Models\Sticky::class)
=======
@can('view', \App\Models\Sticky::class)
>>>>>>> ed349bc (feat: :sparkles: implement CRUD stickies)
<div class="col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.anchor')) }}</legend>

View file

@ -11,7 +11,7 @@
</thead>
<tbody>
@foreach ($stickyModels as $stickyModel)
<tr class="border-bottom list-item">
<tr class="border-bottom">
<td class="text-center align-middle">{{ $stickyModel->type->label() }}</td>
<td class="text-center align-middle">{{ $stickyModel->title }}</td>
<td class="text-center align-middle">

View file

@ -17,38 +17,38 @@
@section('content')
<section class="commit">
<div class="sticky-navigation z-2">
<div class="sticky-navigation-wrapper show row m-0 p-0">
{{-- blade-formatter-disable --}}
@php
$commitNav = [
['label' => __('Élever durablement'), 'link' => '#breeding', 'color' => 'tertiary'],
['label' => __('Mieux vivre'), 'link' => '#life', 'color' => 'quad'],
['label' => __('Respecter la terre'), 'link' => '#earth', 'color' => 'quint'],
['label' => __('Bien nourrir'), 'link' => '#feed', 'color' => 'sixt']];
@endphp
{{-- blade-formatter-enable --}}
@foreach ($commitNav as $key => $value)
<div class="col-6 col-md-12 px-md-0 py-md-1 p-2">
<div class="rounded-5 bg-{{ $value['color'] }}-light shadow-sm">
<a class="d-flex justify-content-center align-items-center text-primary text-decoration-none p-sm-3 p-2"
data-bs-toggle="tooltip" href="{{ $value['link'] }}"
title="{{ __('Accéder à la partie :name de la page', ['name' => $value['label']]) }}">
<span class="badge rounded-pill bg-{{ $value['color'] }} d-block me-2"></span>
<small>{{ $value['label'] }}</small>
</a>
</div>
</div>
@endforeach
</div>
<button class="d-none d-md-block btn btn-primary rounded-pill mt-1 w-fit px-3"
title="{{ __('Afficher/Masquer le menu des ancres') }}">
<i class="fa-solid fa-plus d-none"></i>
<i class="fa-solid fa-minus"></i>
</button>
</div>
{{-- AMBITION --}}
<section class="ambition anchor-padding container my-4" id="introduction">
<div class="sticky-navigation z-2">
<div class="sticky-navigation-wrapper show row m-0 p-0">
{{-- blade-formatter-disable --}}
@php
$commitNav = [
['label' => __('Élever durablement'), 'link' => '#breeding', 'color' => 'tertiary'],
['label' => __('Mieux vivre'), 'link' => '#life', 'color' => 'quad'],
['label' => __('Respecter la terre'), 'link' => '#earth', 'color' => 'quint'],
['label' => __('Bien nourrir'), 'link' => '#feed', 'color' => 'sixt']];
@endphp
{{-- blade-formatter-enable --}}
@foreach ($commitNav as $key => $value)
<div class="col-6 col-md-12 px-md-0 py-md-1 p-2">
<div class="rounded-5 bg-{{ $value['color'] }}-light shadow-sm">
<a class="d-flex justify-content-center align-items-center text-primary text-decoration-none p-sm-3 p-2"
data-bs-toggle="tooltip" href="{{ $value['link'] }}"
title="{{ __('Accéder à la partie :name de la page', ['name' => $value['label']]) }}">
<span class="badge rounded-pill bg-{{ $value['color'] }} d-block me-2"></span>
<small>{{ $value['label'] }}</small>
</a>
</div>
</div>
@endforeach
</div>
<button class="d-none d-md-block btn btn-primary rounded-pill mt-1 w-fit px-3"
title="{{ __('Afficher/Masquer le menu des ancres') }}">
<i class="fa-solid fa-plus d-none"></i>
<i class="fa-solid fa-minus"></i>
</button>
</div>
<div class="row mt-3">
<div class="col-12">
<h2 class="h2 fw-bold text-primary text-center">{{ $ambitionSection->h2_title }}</h2>

View file

@ -17,49 +17,49 @@
@section('content')
<section class="we-hire">
<div class="sticky-navigation z-2">
<div class="sticky-navigation-wrapper show row m-0 p-0">
@foreach ($navLinks as $key => $link)
<div class="col-6 col-md-12 px-md-0 py-md-1 p-2">
<div @class([
'rounded-5 shadow-sm h-100',
match($loop->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'
}
])>
<a class="d-flex justify-content-start align-items-center text-primary text-decoration-none p-sm-3 p-2 h-100"
data-bs-toggle="tooltip" href="#{{ $link->anchor }}"
title="{{ __('Accéder à la partie :name de la page', ['name' => $link->title]) }}">
<span @class([
'badge rounded-pill d-block me-2',
match($loop->index) {
0 => 'bg-primary',
1 => 'bg-secondary',
2 => 'bg-quad',
3 => 'bg-quint',
4 => 'bg-sixt',
default => 'bg-primary'
}
])></span>
<small>{{ $link->title }}</small>
</a>
</div>
</div>
@endforeach
</div>
<button class="d-none d-md-block btn btn-primary rounded-pill mt-1 w-fit px-3"
title="{{ __('Afficher/Masquer le menu des ancres') }}">
<i class="fa-solid fa-plus d-none"></i>
<i class="fa-solid fa-minus"></i>
</button>
</div>
{{-- COMPAGNY LIFE --}}
<section class="company-life anchor-padding" id="company-life">
<div class="sticky-navigation z-2">
<div class="sticky-navigation-wrapper show row m-0 p-0">
@foreach ($navLinks as $key => $link)
<div class="col-6 col-md-12 px-md-0 py-md-1 p-2">
<div @class([
'rounded-5 shadow-sm h-100',
match($loop->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'
}
])>
<a class="d-flex justify-content-start align-items-center text-primary text-decoration-none p-sm-3 p-2 h-100"
data-bs-toggle="tooltip" href="#{{ $link->anchor }}"
title="{{ __('Accéder à la partie :name de la page', ['name' => $link->title]) }}">
<span @class([
'badge rounded-pill d-block me-2',
match($loop->index) {
0 => 'bg-primary',
1 => 'bg-secondary',
2 => 'bg-quad',
3 => 'bg-quint',
4 => 'bg-sixt',
default => 'bg-primary'
}
])></span>
<small>{{ $link->title }}</small>
</a>
</div>
</div>
@endforeach
</div>
<button class="d-none d-md-block btn btn-primary rounded-pill mt-1 w-fit px-3"
title="{{ __('Afficher/Masquer le menu des ancres') }}">
<i class="fa-solid fa-plus d-none"></i>
<i class="fa-solid fa-minus"></i>
</button>
</div>
<div class="container">
<div class="row position-relative">
<div class="col-12 text-center">

View file

@ -17,49 +17,49 @@
@section('content')
<section class="unveil">
<div class="sticky-navigation z-2">
<div class="sticky-navigation-wrapper show row m-0 p-0">
@foreach ($navLinks as $key => $link)
<div class="col-6 col-md-12 px-md-0 py-md-1 p-2">
<div @class([
'rounded-5 shadow-sm h-100',
match($loop->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'
}
])>
<a class="d-flex justify-content-start align-items-center text-primary text-decoration-none p-sm-3 p-2 h-100"
data-bs-toggle="tooltip" href="#{{ $link->anchor }}"
title="{{ __('Accéder à la partie :name de la page', ['name' => $link->title]) }}">
<span @class([
'badge rounded-pill d-block me-2',
match($loop->index) {
0 => 'bg-primary',
1 => 'bg-secondary',
2 => 'bg-quad',
3 => 'bg-quint',
4 => 'bg-sixt',
default => 'bg-primary'
}
])></span>
<small>{{ $link->title }}</small>
</a>
</div>
</div>
@endforeach
</div>
<button class="d-none d-md-block btn btn-primary rounded-pill mt-1 w-fit px-3"
title="{{ __('Afficher/Masquer le menu des ancres') }}">
<i class="fa-solid fa-plus d-none"></i>
<i class="fa-solid fa-minus"></i>
</button>
</div>
{{-- KEY NUMBERS --}}
<section class="key-numbers anchor-padding my-5" id="key-numbers">
<div class="unveil-navigation z-2">
<div class="unveil-navigation-wrapper show row m-0 p-0">
@foreach ($navLinks as $key => $link)
<div class="col-6 col-md-12 px-md-0 py-md-1 p-2">
<div @class([
'rounded-5 shadow-sm h-100',
match($loop->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'
}
])>
<a class="d-flex justify-content-start align-items-center text-primary text-decoration-none p-sm-3 p-2 h-100"
data-bs-toggle="tooltip" href="#{{ $link->anchor }}"
title="{{ __('Accéder à la partie :name de la page', ['name' => $link->title]) }}">
<span @class([
'badge rounded-pill d-block me-2',
match($loop->index) {
0 => 'bg-primary',
1 => 'bg-secondary',
2 => 'bg-quad',
3 => 'bg-quint',
4 => 'bg-sixt',
default => 'bg-primary'
}
])></span>
<small>{{ $link->title }}</small>
</a>
</div>
</div>
@endforeach
</div>
<button class="d-none d-md-block btn btn-primary rounded-pill mt-1 w-fit px-3"
title="{{ __('Afficher/Masquer le menu des ancres') }}">
<i class="fa-solid fa-plus d-none"></i>
<i class="fa-solid fa-minus"></i>
</button>
</div>
<div class="container">
<div class="row">
<div class="col-12">