Compare commits

...
Sign in to create a new pull request.

78 commits

Author SHA1 Message Date
Vincent BRIDIER
ad4218da01 Merge branch 'trunk' 2026-10-23 15:51:35 +02:00
Vincent BRIDIER
376c5d3ab1 Merge branch 'develop' into trunk 2026-10-23 15:51:10 +02:00
Vincent BRIDIER
2e07125c62 Merge branch 'fix-user-group' into 'develop'
fix: 🐛 update alpine www-data

See merge request ldc-web/projets/volena!79
2026-10-23 15:50:06 +02:00
Corentin Huet
ef17ae64e3 fix: 🐛 update alpine www-data 2026-10-23 14:33:18 +02:00
K Muller
ea4848ede8 Merge branch 'develop' into trunk 2026-08-13 13:12:23 +02:00
Karl M'muller
d5edac7cba Merge branch 'update' into 'develop'
fix: 🚸 check if nav links is empty, then display or not the...

See merge request ldc-web/projets/volena!78
2026-08-13 11:11:41 +00:00
Alexis Gousseau
74015163b7
chore: ⬆️ bump husky-config to v1.1.1 2026-08-06 10:00:03 +02:00
Alexis Gousseau
c3e34984d6
fix: 🚸 check if nav links is empty, then display or not the button navigation in front 2026-08-06 09:58:18 +02:00
K Muller
10eede1282 Merge branch 'trunk' 2026-07-29 09:01:55 +02:00
K Muller
d695c04d81 Merge branch 'develop' into trunk 2026-07-29 09:01:23 +02:00
Karl M'muller
d7a81c939d Merge branch 'activity-logs-clean' into 'develop'
fix: 🐛 add the queue + env variable

See merge request ldc-web/projets/volena!77
2026-07-29 07:00:44 +00:00
K Muller
f5b0f9fd66 fix: 🐛 add the queue + env variable 2026-07-23 11:09:05 +02:00
K Muller
9007631dc9 fix: 🐛 revolve conflict 2026-07-23 09:08:03 +02:00
karl.muller
a646ecd84b Merge branch 'hotfix' into 'main'
fix: 🐛 testimonials routes missing

See merge request ldc-web/projets/volena!76
2026-06-03 07:59:44 +00:00
K Muller
455277669a fix: 🐛 testimonials routes missing 2026-06-03 09:59:00 +02:00
Noah Lancien
3d86d1fa5f Merge branch 'develop' into trunk 2026-06-02 09:09:38 +02:00
Noah Lancien
5f4a4b4ecb fix: 🐛 broken overflow on hire carousels 2026-06-02 09:09:17 +02:00
karl.muller
d38010dbdc Merge branch 'hotfix' into 'main'
fix: 🐛 update target fields to sanitize #101 - 898ce4d962

See merge request ldc-web/projets/volena!75
2026-06-01 10:57:19 +00:00
K Muller
10e8655192 fix: 🐛 update target fields to sanitize #101 - 898ce4d962 2026-06-01 12:55:50 +02:00
K Muller
2d20d563fe Merge branch 'develop' into trunk 2026-06-01 12:51:22 +02:00
karl.muller
f42a2d7deb Merge branch 'issue-101' into 'develop'
fix: 🐛 update target fields to sanitize #101

See merge request ldc-web/projets/volena!74
2026-06-01 10:50:46 +00:00
K Muller
3948787e3d Merge branch 'develop' into trunk 2026-06-01 11:19:59 +02:00
karl.muller
737d17652a Merge branch '97-stickies' into 'develop'
feat: ✨ Added color column to sticky model + keep sticky displayed on mobile

See merge request ldc-web/projets/volena!73
2026-06-01 09:13:51 +00:00
Alexis Gousseau
898ce4d962
fix: 🐛 update target fields to sanitize #101 2026-06-01 10:51:22 +02:00
Noah Lancien
9f564c61ed feat: ✨ Added color column to sticky model + keep sticky displayed on mobile 2026-05-28 11:54:19 +02:00
Noah Lancien
31b7df079b Merge branch 'develop' into trunk 2026-05-12 15:52:25 +02:00
Noah Lancien
ecc0a42044 Merge branch 'trunk' 2026-04-29 09:12:16 +02:00
Noah Lancien
88c38f7a6c Merge branch 'develop' into trunk 2026-04-29 09:11:39 +02:00
Noah Lancien
b62e258070 Merge branch 'trunk' 2026-04-28 09:18:45 +02:00
Noah Lancien
f415475878 Merge branch 'develop' into trunk 2026-04-28 09:18:33 +02:00
Noah Lancien
79a709e3f4 Merge branch 'trunk' 2026-04-28 09:06:18 +02:00
Noah Lancien
8b582376b0 Merge branch 'develop' into trunk 2026-04-28 09:05:37 +02:00
Noah Lancien
249172d18e Merge branch 'trunk' 2026-04-22 12:08:18 +02:00
Noah Lancien
dd50c67623 Merge branch 'develop' into trunk 2026-04-10 10:31:18 +02:00
Noah Lancien
6a5a679b62 Merge branch 'develop' into trunk 2026-04-10 10:20:19 +02:00
Noah Lancien
2f6948bf5e Merge branch 'develop' into trunk 2026-04-09 10:24:36 +02:00
Noah Lancien
77be8ce26d Merge branch 'develop' into trunk 2026-03-25 15:41:36 +01:00
K Muller
c8ac89ca3a Merge branch 'develop' into trunk 2026-03-12 10:09:23 +01:00
K Muller
7b45466952 Merge branch 'develop' into trunk 2026-03-12 09:34:19 +01:00
Noah Lancien
bbbd9ce526 ci: added UWIL_ADMIN_SECURE_CIDR_PROJECT_ALLOWED_LIST variable 2026-03-05 10:03:34 +01:00
Noah Lancien
33810d36fc Merge branch 'develop' into trunk 2026-03-03 10:16:35 +01:00
Noah Lancien
0fabceb1f3 Merge branch 'develop' into trunk 2026-01-22 11:49:51 +01:00
Noah Lancien
03fdf04437 Merge branch 'develop' into trunk 2026-01-22 11:15:57 +01:00
Noah Lancien
7f5e6173c9 Merge branch 'trunk' 2026-01-12 16:06:14 +01:00
Noah Lancien
7ff95fdb5f Merge branch 'develop' into trunk 2026-01-12 16:05:22 +01:00
Noah Lancien
3a064fd47f Merge branch 'develop' into trunk 2026-01-08 14:46:01 +01:00
Noah Lancien
a0d3c95305 Merge branch 'trunk' 2025-10-16 14:54:10 +02:00
Vincent BRIDIER
4d5bf6a135 fix: Fix redirects domaines ssl challenge 2025-10-16 12:03:26 +02:00
Vincent BRIDIER
ddf876ea0b Merge branch 'develop' into trunk 2025-10-16 11:55:24 +02:00
Noah Lancien
aceee89f39 feat: added volailles ramon redirections to volena.fr 2025-10-16 09:16:36 +02:00
Noah Lancien
abb326134f Merge branch 'develop' into trunk 2025-10-16 09:07:15 +02:00
Noah Lancien
7da3f98667 Merge branch 'develop' into trunk 2025-10-08 10:43:16 +02:00
Noah Lancien
773c59aafc Merge branch 'develop' into trunk 2025-10-08 10:35:03 +02:00
K Muller
9da5674696 Merge branch 'trunk' 2025-09-04 15:56:13 +02:00
K Muller
cab82c9ecd Merge branch 'develop' into trunk 2025-09-04 15:55:49 +02:00
Karl
bd6f7e5358 Merge branch 'trunk' 2025-07-24 10:24:23 +02:00
Karl
6f0348a6ff Merge branch 'develop' into trunk 2025-07-24 10:24:01 +02:00
Noah Lancien
63208d568a Merge branch 'trunk' 2025-07-10 14:39:48 +02:00
Noah Lancien
754ed2c734 Merge branch 'develop' into trunk 2025-07-08 16:41:30 +02:00
Noah Lancien
f09df54d90 Merge branch 'develop' into trunk 2025-07-04 15:24:28 +02:00
Noah Lancien
d59d7a9781 Merge branch 'develop' into trunk 2025-07-03 16:31:58 +02:00
Noah Lancien
2ec44a2584 Merge branch 'develop' into trunk 2025-07-03 16:19:14 +02:00
Karl
abd47e2aed Merge branch 'trunk' 2025-05-15 16:52:59 +02:00
Karl
33f0594bc6 Merge branch 'develop' into trunk 2025-05-15 16:52:28 +02:00
Noah Lancien
dd80e4c8d5 Merge branch 'trunk' 2025-03-14 11:19:38 +01:00
Noah Lancien
24cbab746b Merge branch 'develop' into trunk 2025-03-14 10:54:02 +01:00
Karl Muller
c05d1c3e0a Merge branch 'trunk' 2025-03-06 16:42:48 +00:00
Karl Muller
9959bb4a24 Merge branch 'develop' into trunk 2025-03-06 16:42:34 +00:00
Karl Muller
92800c4282 Merge branch 'trunk' 2025-03-06 15:51:00 +00:00
Karl Muller
fcc49f0189 Merge branch 'develop' into trunk 2025-03-06 15:50:41 +00:00
Karl Muller
cadc478ea9 Merge branch 'trunk' 2025-03-06 15:06:23 +00:00
Karl Muller
6a5fdba063 Merge branch 'develop' into trunk 2025-03-06 15:05:52 +00:00
Noah Lancien
b13b34e860 Merge branch 'develop' into trunk 2025-03-05 11:51:36 +01:00
Noah Lancien
b85ac4fe9d Merge branch 'develop' into trunk 2025-02-27 09:37:40 +01:00
Noah Lancien
cda965c645 Merge branch 'develop' into trunk 2025-02-20 17:40:39 +01:00
Noah Lancien
60607f8931 Merge branch 'develop' into trunk 2025-02-20 14:24:50 +01:00
Vincent BRIDIER
b2f2dc77d5
Merge branch 'trunk' 2025-02-18 12:57:36 +01:00
Vincent BRIDIER
f090b12405
Merge branch 'develop' into trunk 2025-02-18 12:55:10 +01:00
23 changed files with 777 additions and 482 deletions

View file

@ -1,3 +1,2 @@
#!/bin/sh
npx --no -- commitlint --config node_modules/@uwil/husky-config/commitlint.config.cjs --edit $1
npx commitlint --config node_modules/@uwil/husky-config/commitlint.config.js --edit $1

View file

@ -0,0 +1,31 @@
<?php
namespace App\Enums;
use App\Traits\Enums\BaseEnum;
enum StickiesColorEnum: int
{
use BaseEnum;
case primary = 1;
case secondary = 2;
case tertiary = 3;
case quad = 4;
case quint = 5;
case sixt = 6;
/**
* Optionnal labels definition.
*
* @phpstan-ignore-next-line
*/
private const LABELS = [
self::primary->name => 'Primary',
self::secondary->name => 'Secondary',
self::tertiary->name => 'Tertiary',
self::quad->name => 'Quad',
self::quint->name => 'Quint',
self::sixt->name => 'Sixt',
];
}

View file

@ -6,6 +6,7 @@ use App\Enums\Listen\ObjectEnum;
use App\Enums\Sections\PageSectionEnum;
use App\Enums\Slides\SliderTypeEnum;
use App\Enums\StaticPageType;
use App\Enums\StickiesColorEnum;
use App\Enums\Testimonials\TypeEnum;
use App\Http\Controllers\Controller;
use App\Http\Requests\Fo\ListenFormRequest;
@ -81,7 +82,7 @@ class StaticPageController extends Controller
public function unveil(): \Illuminate\Contracts\View\View
{
$staticPageModel = StaticPage::query()->where('type', StaticPageType::unveil)->first();
$sectionModels = Section::query()->where('page_id', $staticPageModel->id)->get();
$sectionModels = Section::query()->where('page_id', $staticPageModel->getKey())->get();
$historicalMilestoneModels = HistoricalMilestone::query()->orderBy('year', 'ASC')->get();
/** @var \Illuminate\Database\Eloquent\Collection<array-key,\App\Models\Site> */
$siteModelList = Site::query()->orderBy('order')->get();
@ -150,6 +151,8 @@ class StaticPageController extends Controller
$feedSection = $sectionModels->where('section', PageSectionEnum::commit_feed)->first();
$testimonialsSection = $sectionModels->where('section', PageSectionEnum::commit_commitments)->first();
$navLinks = Sticky::query()->where('type', StaticPageType::we_commit)->get();
return view('fo.pages.commitments', compact(
'staticPageModel',
'sectionModels',
@ -162,6 +165,7 @@ class StaticPageController extends Controller
'earthSection',
'feedSection',
'testimonialsSection',
'navLinks',
));
}
@ -326,12 +330,22 @@ class StaticPageController extends Controller
];
$initialZoom = 10;
// Create datas similar to Sticky model.
$navLinks = collect([
(object) [
'title' => $site->sticky_title,
'anchor' => $site->sticky_link,
'color' => StickiesColorEnum::quad,
],
]);
return view('fo.pages.site', [
'siteModelList' => $siteModelList,
'siteModel' => $site,
'nextSiteModel' => $nextSiteModel,
'viewBox' => $viewBox,
'initialZoom' => $initialZoom,
'navLinks' => $navLinks,
]);
}
}

View file

@ -3,6 +3,7 @@
namespace App\Http\Requests\Bo\Stickies;
use App\Enums\StaticPageType;
use App\Enums\StickiesColorEnum;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use Illuminate\Validation\Rules\Enum;
@ -37,6 +38,10 @@ class StoreStickyRequest extends FormRequest
'string',
'between:3,255'
],
'color' => [
Rule::requiredIf($this->user()->can('create', $this->sticky)),
new Enum(StickiesColorEnum::class)
],
];
}
@ -51,6 +56,7 @@ class StoreStickyRequest extends FormRequest
'type' => trans('validation.custom.type'),
'title' => trans('validation.attributes.title'),
'anchor' => trans('validation.custom.anchor'),
'color' => trans('validation.custom.color'),
];
}
}

View file

@ -3,6 +3,7 @@
namespace App\Models;
use App\Enums\StaticPageType;
use App\Enums\StickiesColorEnum;
use App\Enums\Users\RoleEnum;
use App\Traits\Models\ActivityLog;
use Illuminate\Auth\Access\AuthorizationException;
@ -13,6 +14,7 @@ use Illuminate\Database\Eloquent\Model;
* @property \App\Enums\StaticPageType $type Page type (StaticPageEnum).
* @property string $title Title for the sticky.
* @property string $anchor Anchor for the sticky.
* @property \App\Enums\StickiesColorEnum $color Color of the button (StickiesColorEnum).
* @property-read \Illuminate\Support\Carbon $created_at Created date.
* @property-read \Illuminate\Support\Carbon $updated_at Updated date.
*
@ -31,6 +33,7 @@ class Sticky extends Model
'type',
'title',
'anchor',
'color',
];
/**
@ -40,6 +43,7 @@ class Sticky extends Model
*/
protected $casts = [
'type' => StaticPageType::class,
'color' => StickiesColorEnum::class,
];
/**

View file

@ -1 +0,0 @@
module.exports = require('@uwil/husky-config/commitlint.config.cjs');

1
commitlint.config.js Normal file
View file

@ -0,0 +1 @@
export default { extends: ["@uwil/husky-config/commitlint.config.js"] };

View file

@ -0,0 +1,35 @@
<?php
use Database\Seeders\Mandatory\StickySeeder;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('stickies', function (Blueprint $table) {
$table->unsignedSmallInteger('color')->comment('Color of the button (StickyColorEnum) based on bootstrap colots')->after('anchor');
});
// Update existing stickies + Add commitments stickies (actually hard-written).
Artisan::call('db:seed', [
'class' => StickySeeder::class
]);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('stickies', function (Blueprint $table) {
$table->removeColumn('color');
});
}
};

View file

@ -3,6 +3,7 @@
namespace Database\Seeders\Mandatory;
use App\Enums\StaticPageType;
use App\Enums\StickiesColorEnum;
use App\Models\Sticky;
use Illuminate\Database\Seeder;
@ -14,73 +15,171 @@ class StickySeeder extends Seeder
public function run(): void
{
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::we_hire,
'anchor' => 'company-life',
],
[
'type' => StaticPageType::we_hire,
'title' => 'La vie d\'entreprise',
'anchor' => 'company-life'
'anchor' => 'company-life',
'color' => StickiesColorEnum::primary,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::we_hire,
'anchor' => 'formation',
],
[
'type' => StaticPageType::we_hire,
'title' => 'L\'alternance et la formation',
'anchor' => 'formation'
'anchor' => 'formation',
'color' => StickiesColorEnum::secondary,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::we_hire,
'anchor' => 'we-testimonials',
],
[
'type' => StaticPageType::we_hire,
'title' => 'Nos collaborateurs témoignent',
'anchor' => 'we-testimonials'
'anchor' => 'we-testimonials',
'color' => StickiesColorEnum::quad,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::we_hire,
'anchor' => 'parity',
],
[
'type' => StaticPageType::we_hire,
'title' => 'La parité',
'anchor' => 'parity'
'anchor' => 'parity',
'color' => StickiesColorEnum::quint,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::we_hire,
'anchor' => 'on-se-retrouve',
],
[
'type' => StaticPageType::we_hire,
'title' => 'En savoir plus',
'anchor' => 'on-se-retrouve'
'anchor' => 'on-se-retrouve',
'color' => StickiesColorEnum::sixt,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::unveil,
'anchor' => 'key-numbers',
],
[
'type' => StaticPageType::unveil,
'title' => 'VOLENA',
'anchor' => 'key-numbers'
'anchor' => 'key-numbers',
'color' => StickiesColorEnum::primary,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::unveil,
'anchor' => 'missions',
],
[
'type' => StaticPageType::unveil,
'title' => 'Notre mission',
'anchor' => 'missions'
'anchor' => 'missions',
'color' => StickiesColorEnum::secondary,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::unveil,
'anchor' => 'local',
],
[
'type' => StaticPageType::unveil,
'title' => 'Filière 100% française',
'anchor' => 'local'
'anchor' => 'local',
'color' => StickiesColorEnum::quad,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::unveil,
'anchor' => 'sites',
],
[
'type' => StaticPageType::unveil,
'title' => 'Nos sites',
'anchor' => 'sites'
'anchor' => 'sites',
'color' => StickiesColorEnum::quint,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::unveil,
'anchor' => 'history',
],
[
'type' => StaticPageType::unveil,
'title' => 'Notre histoire',
'anchor' => 'history'
'anchor' => 'history',
'color' => StickiesColorEnum::sixt,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::we_commit,
'anchor' => 'breeding',
],
[
'type' => StaticPageType::we_commit,
'title' => 'Élever durablement',
'anchor' => 'breeding',
'color' => StickiesColorEnum::tertiary,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::we_commit,
'anchor' => 'life',
],
[
'type' => StaticPageType::we_commit,
'title' => 'Mieux vivre',
'anchor' => 'life',
'color' => StickiesColorEnum::quad,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::we_commit,
'anchor' => 'earth',
],
[
'type' => StaticPageType::we_commit,
'title' => 'Respecter la terre',
'anchor' => 'earth',
'color' => StickiesColorEnum::quint,
],
);
Sticky::query()->updateOrCreate(
[
'type' => StaticPageType::we_commit,
'anchor' => 'feed',
],
[
'type' => StaticPageType::we_commit,
'title' => 'Bien nourrir',
'anchor' => 'feed',
'color' => StickiesColorEnum::sixt,
],
);
}

30
k8s-queues.sh Normal file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env bash
# From https://stackoverflow.com/a/76488746/17320077
work=true
function stopQueues() {
echo "Stopping queues..."
work=false
php artisan queue:restart
sleep 45s
exit 0
}
# handle graceful shutdown
trap "" SIGPIPE
trap stopQueues EXIT
echo "Starting PHP queue workers..."
while $work; do
php artisan queue:work database --queue=default,database --sleep=3 --tries=3 --max-time=3600 --no-interaction
sleep 1
done
# Si besoin de plusieurs threads puis terminer par un done sans &
#(while $work; do
# php artisan queue:work --queue="$(grep -oP 'SQS_QUEUE=\K.*' .env)" --no-interaction
# sleep 1
#done &)

View file

@ -12,6 +12,7 @@ data:
LOG_CHANNEL: "k8s"
DB_HOST: "${APP_DB_HOST}"
DB_DATABASE: "${APP_DB_DATABASE}"
QUEUE_CONNECTION: "${APP_QUEUE_CONNECTION}"
DB_USERNAME: "${APP_DB_USERNAME}"
DB_PASSWORD: "${APP_DB_PASSWORD}"
MAIL_HOST: "${APP_MAIL_HOST}"
@ -82,12 +83,40 @@ spec:
volumeMounts:
- name: storage
mountPath: /app/srcs/storage
- name: ${CI_PROJECT_PATH_SLUG}-queue-worker
image: $IMAGE_TAG
lifecycle:
preStop:
exec:
command:
[
"/bin/sh",
"-c",
"kill -s TERM 1; while test $(ps ax | grep -v grep | grep bash | wc -l) -gt 0; do sleep 2s; done",
]
resources:
limits:
cpu: "${APP_CI_CPU_LIMIT}"
memory: "${APP_CI_MEMORY_LIMIT}"
requests:
cpu: "${APP_CI_CPU_REQUEST}"
memory: "${APP_CI_MEMORY_REQUEST}"
command:
- "bash"
args:
- "k8s-queues.sh"
envFrom:
- configMapRef:
name: ${CI_PROJECT_PATH_SLUG}-config-map
volumeMounts:
- name: storage
mountPath: /app/srcs/storage
imagePullSecrets:
- name: docker-registry-credentials
securityContext:
runAsUser: 33
runAsGroup: 33
fsGroup: 33
runAsUser: 82
runAsGroup: 82
fsGroup: 82
fsGroupChangePolicy: "OnRootMismatch"
volumes:
- name: storage
@ -173,8 +202,8 @@ spec:
persistentVolumeClaim:
claimName: ${CI_PROJECT_PATH_SLUG}-pvc-storage
securityContext:
runAsUser: 33
runAsGroup: 33
fsGroup: 33
runAsUser: 82
runAsGroup: 82
fsGroup: 82
fsGroupChangePolicy: "OnRootMismatch"
restartPolicy: OnFailure

699
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -29,7 +29,7 @@
"@types/toastify-js": "^1.12.1",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.36.2",
"@uwil/husky-config": "^1.0.1",
"@uwil/husky-config": "^1.1.1",
"@vitejs/plugin-basic-ssl": "^1.0.1",
"@vitejs/plugin-vue": "^4.6.2",
"@vue/compiler-sfc": "latest",

View file

@ -305,5 +305,6 @@ return [
'media' => 'média',
'anchor' => 'ancre',
'link' => 'lien',
'color' => 'couleur',
],
];

View file

@ -32,21 +32,21 @@ document.addEventListener("DOMContentLoaded", function () {
}
});
// * Commit Buttons
// * Stickies on mobile.
document.addEventListener("DOMContentLoaded", function () {
const commitDiv = document.getElementById("commit-blocks") as HTMLDivElement;
if (commitDiv) {
commitDiv.style.display = "none";
const stickyDiv = document.getElementById("sticky-blocks") as HTMLDivElement;
if (stickyDiv) {
stickyDiv.style.display = "none";
document.onscroll = function () {
const introCommitDiv = document.getElementById("introduction") as HTMLDivElement;
const stickyDisplayerDiv = document.getElementById("sticky-displayer") as HTMLDivElement;
if (introCommitDiv) {
if (stickyDisplayerDiv) {
const scrollTop = (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;
if (scrollTop < introCommitDiv.offsetTop - 100) {
commitDiv.style.display = "none";
if (scrollTop < stickyDisplayerDiv.offsetTop - 100) {
stickyDiv.style.display = "none";
} else {
commitDiv.style.display = "block";
stickyDiv.style.display = "block";
}
}
};

View file

@ -10,7 +10,7 @@ document.addEventListener("DOMContentLoaded", function () {
const swiperContainers = document.querySelectorAll(".swiper-container");
swiperContainers.forEach((container, index) => {
const carousel = container.querySelector(".swiper-carousels") as HTMLElement,
const carousel = container.querySelector("#swiper-carousels") as HTMLElement,
btnPrev = container.querySelector(".carousel-prev") as HTMLElement,
btnNext = container.querySelector(".carousel-next") as HTMLElement,
pagination = carousel?.querySelector(".swiper-carousels-pagination") as HTMLElement;

View file

@ -86,6 +86,27 @@
</fieldset>
</div>
@endcan
{{-- TYPE --}}
@can('create', \App\Models\Sticky::class)
<div class="col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.color')) }}</legend>
<div class="row">
<div class="col-12">
@include('bo.partials.inputs.tinyint-enum', [
'id' => 'stickyColor',
'label' => __('Associer une couleur'),
'name' => 'color',
'model' => $stickyModel ?? null,
'required' => true,
'associatedModels' => \App\Enums\StickiesColorEnum::toArray(),
'helper' => __('Sélectionnez une couleur dans la liste déroulante.'),
])
</div>
</div>
</fieldset>
</div>
@endcan
<div class="col-12 text-center">
<p><b>{{ __('validation.custom.required_fields') }}</b></p>
</div>

View file

@ -7,27 +7,21 @@
@include('fo.layouts.search')
</div> --}}
</div>
@if (request()->routeIs('fo.commit.show'))
<div class="col-12 d-md-none pointer-events pb-2" id="commit-blocks">
<div class="commit-navigation z-2">
<div class="commit-navigation-wrapper 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)
@if (isset($navLinks))
<div class="col-12 d-md-none pointer-events pb-2" id="sticky-blocks">
<div class="sticky-navigation z-2">
<div class="sticky-navigation-wrapper row m-0 p-0">
@foreach ($navLinks as $link)
<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>
<div class="rounded-5 shadow-sm h-100 bg-{{ $link->color->name }}-light">
@php
$hrefLink = !request()->routeIs('fo.site.show') ? str($link->anchor)->start('#') : $link->anchor
@endphp
<a class="d-flex justify-content-center align-items-center text-primary text-decoration-none p-sm-3 p-2 text-center h-100"
data-bs-toggle="tooltip" href="{{ $hrefLink }}"
title="{{ __('Accéder à la partie :name de la page', ['name' => $link->title]) }}">
<small>{{ $link->title }}</small>
</a>
</div>
</div>

View file

@ -17,38 +17,32 @@
@section('content')
<section class="commit">
<div class="sticky-navigation">
<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 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>
@if ($navLinks->count())
<div class="sticky-navigation">
<div class="sticky-navigation-wrapper show row m-0 p-0">
@foreach ($navLinks as $link)
<div class="col-6 col-md-12 py-md-1 p-2">
<div class="rounded-5 bg-{{ $link->color->name }}-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="#{{ $link->anchor }}"
title="{{ __('Accéder à la partie :name de la page', ['name' => $link->title]) }}">
<span class="badge rounded-pill bg-{{ $link->color->name }} d-block me-2"></span>
<small>{{ $link->title }}</small>
</a>
</div>
</div>
</div>
@endforeach
@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>
<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>
@endif
{{-- AMBITION --}}
<section class="ambition anchor-padding container my-4" id="introduction">
<span id="sticky-displayer"></span>
<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,32 @@
@section('content')
<section class="we-hire">
<div class="sticky-navigation">
<div class="sticky-navigation-wrapper show row m-0 p-0">
@foreach ($navLinks as $key => $link)
<div class="col-6 col-md-12 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>
@if ($navLinks->count())
<div class="sticky-navigation">
<div class="sticky-navigation-wrapper show row m-0 p-0">
@foreach ($navLinks as $link)
<div class="col-6 col-md-12 py-md-1 p-2">
<div class="rounded-5 shadow-sm h-100 bg-{{ $link->color->name }}-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 bg-{{ $link->color->name }}"></span>
<small>{{ $link->title }}</small>
</a>
</div>
</div>
</div>
@endforeach
@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>
<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>
@endif
{{-- COMPAGNY LIFE --}}
<section class="company-life anchor-padding" id="company-life">
<span id="sticky-displayer"></span>
<div class="container">
<div class="row position-relative">
<div class="col-12 text-center">
@ -269,7 +252,7 @@
</div>
</section>
{{-- PARITY --}}
<section class="parity border-top-curved-upper-tertiary-light anchor-padding" id="parity">
<section class="parity border-top-curved-upper-tertiary-light anchor-padding overflow-hidden" id="parity">
<div class="container">
<div class="row">
<div class="col-12 text-primary text-center">

View file

@ -8,7 +8,7 @@
<section class="site">
@if ($siteModel->sticky_title && $siteModel->sticky_link)
<div class="site-navigation z-2">
<div class="site-navigation-wrapper show row m-0 p-0">
<div class="site-navigation-wrapper show row m-0 p-0 justify-content-center">
<div class="col-6 col-md-12 px-md-0 py-md-1 p-2">
<div class="rounded-5 bg-quad-light shadow-sm">
<a class="d-flex justify-content-center align-items-center text-primary text-decoration-none p-sm-3 p-2"
@ -41,6 +41,7 @@
title="{{ __('Retour à la page d\'accueil') }}" alt="{{ __('Flèche vers la gauche') }}">
{{ __('Retour') }}
</a>
<span id="sticky-displayer"></span>
@if ($nextSiteModel)
<a href="{{ route('fo.sites.show', $nextSiteModel) }}"
title="{{ __('Voir le site suivant : :name', ['name' => $nextSiteModel->name]) }}">

View file

@ -17,49 +17,32 @@
@section('content')
<section class="unveil">
<div class="sticky-navigation">
<div class="sticky-navigation-wrapper show row m-0 p-0">
@foreach ($navLinks as $key => $link)
<div class="col-6 col-md-12 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>
@if ($navLinks->count())
<div class="sticky-navigation">
<div class="sticky-navigation-wrapper show row m-0 p-0">
@foreach ($navLinks as $link)
<div class="col-6 col-md-12 py-md-1 p-2">
<div class="rounded-5 shadow-sm h-100 bg-{{ $link->color->name }}-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 bg-{{ $link->color->name }}"></span>
<small>{{ $link->title }}</small>
</a>
</div>
</div>
</div>
@endforeach
@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>
<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>
@endif
{{-- KEY NUMBERS --}}
<section class="key-numbers anchor-padding my-5" id="key-numbers">
<span id="sticky-displayer"></span>
<div class="container">
<div class="row">
<div class="col-12">

View file

@ -89,7 +89,7 @@ Route::middleware(['admin-secure'])->prefix('bo')
// * SITES.
Route::resource('sites', SiteController::class)->except('show')
->withoutMiddleware('htmlsanitize')
->middleware('htmlsanitize:director_speach,employee_speach,highlights,content');
->middleware('htmlsanitize:director_speach,employee_speach,highlights');
Route::patch('/sites/{site}/change-order/{direction}', [
SiteController::class,
'changeOrder'
@ -164,10 +164,8 @@ Route::middleware(['admin-secure'])->prefix('bo')
'duplicate'
])->name('testimonials.duplicate');
// * NETWORKS
Route::resource('networks', NetworkController::class)->except('show')
->withoutMiddleware('htmlsanitize')
->middleware('htmlsanitize:content');
// * NETWORKS.
Route::resource('networks', NetworkController::class)->except('show');
Route::get('/networks/{network}/duplicate', [
NetworkController::class,
'duplicate'
@ -181,7 +179,7 @@ Route::middleware(['admin-secure'])->prefix('bo')
'changePublished'
])->name('networks.change-published');
// * AISLES
// * AISLES.
Route::resource('aisles', AisleController::class)->except('show')
->withoutMiddleware('htmlsanitize')
->middleware('htmlsanitize:text');
@ -198,7 +196,7 @@ Route::middleware(['admin-secure'])->prefix('bo')
'changeCustomOrder'
])->name('aisles.change-order');
// * CAROUSELS
// * CAROUSELS.
Route::resource('carousels', CarouselController::class)->except('show')
->withoutMiddleware('htmlsanitize')
->middleware('htmlsanitize:media');
@ -215,10 +213,10 @@ Route::middleware(['admin-secure'])->prefix('bo')
'changeCustomOrder'
])->name('carousels.change-order');
// * BRANDS
// * BRANDS.
Route::resource('brands', BrandController::class)->except('show')
->withoutMiddleware('htmlsanitize')
->middleware('htmlsanitize:content');
->middleware('htmlsanitize:text');
Route::get('/brands/{brand}/duplicate', [
BrandController::class,
'duplicate'
@ -228,7 +226,7 @@ Route::middleware(['admin-secure'])->prefix('bo')
'changePublished'
])->name('brands.change-published');
// * stickies.
// * STICKIES.
Route::resource('stickies', StickyController::class)->except('show');
Route::get('/stickies/{sticky}/duplicate', [
StickyController::class,