Compare commits
78 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad4218da01 | ||
|
|
376c5d3ab1 | ||
|
|
2e07125c62 | ||
|
|
ef17ae64e3 | ||
|
|
ea4848ede8 | ||
|
|
d5edac7cba | ||
|
|
74015163b7 | ||
|
|
c3e34984d6 | ||
|
|
10eede1282 | ||
|
|
d695c04d81 | ||
|
|
d7a81c939d | ||
|
|
f5b0f9fd66 | ||
|
|
9007631dc9 | ||
|
|
a646ecd84b | ||
|
|
455277669a | ||
|
|
3d86d1fa5f | ||
|
|
5f4a4b4ecb | ||
|
|
d38010dbdc | ||
|
|
10e8655192 | ||
|
|
2d20d563fe | ||
|
|
f42a2d7deb | ||
|
|
3948787e3d | ||
|
|
737d17652a | ||
|
|
898ce4d962 | ||
|
|
9f564c61ed | ||
|
|
31b7df079b | ||
|
|
ecc0a42044 | ||
|
|
88c38f7a6c | ||
|
|
b62e258070 | ||
|
|
f415475878 | ||
|
|
79a709e3f4 | ||
|
|
8b582376b0 | ||
|
|
249172d18e | ||
|
|
dd50c67623 | ||
|
|
6a5a679b62 | ||
|
|
2f6948bf5e | ||
|
|
77be8ce26d | ||
|
|
c8ac89ca3a | ||
|
|
7b45466952 | ||
|
|
bbbd9ce526 | ||
|
|
33810d36fc | ||
|
|
0fabceb1f3 | ||
|
|
03fdf04437 | ||
|
|
7f5e6173c9 | ||
|
|
7ff95fdb5f | ||
|
|
3a064fd47f | ||
|
|
a0d3c95305 | ||
|
|
4d5bf6a135 | ||
|
|
ddf876ea0b | ||
|
|
aceee89f39 | ||
|
|
abb326134f | ||
|
|
7da3f98667 | ||
|
|
773c59aafc | ||
|
|
9da5674696 | ||
|
|
cab82c9ecd | ||
|
|
bd6f7e5358 | ||
|
|
6f0348a6ff | ||
|
|
63208d568a | ||
|
|
754ed2c734 | ||
|
|
f09df54d90 | ||
|
|
d59d7a9781 | ||
|
|
2ec44a2584 | ||
|
|
abd47e2aed | ||
|
|
33f0594bc6 | ||
|
|
dd80e4c8d5 | ||
|
|
24cbab746b | ||
|
|
c05d1c3e0a | ||
|
|
9959bb4a24 | ||
|
|
92800c4282 | ||
|
|
fcc49f0189 | ||
|
|
cadc478ea9 | ||
|
|
6a5fdba063 | ||
|
|
b13b34e860 | ||
|
|
b85ac4fe9d | ||
|
|
cda965c645 | ||
|
|
60607f8931 | ||
|
|
b2f2dc77d5 | ||
|
|
f090b12405 |
23 changed files with 777 additions and 482 deletions
|
|
@ -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
|
||||
|
|
|
|||
31
app/Enums/StickiesColorEnum.php
Normal file
31
app/Enums/StickiesColorEnum.php
Normal 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',
|
||||
];
|
||||
}
|
||||
|
|
@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
module.exports = require('@uwil/husky-config/commitlint.config.cjs');
|
||||
1
commitlint.config.js
Normal file
1
commitlint.config.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
export default { extends: ["@uwil/husky-config/commitlint.config.js"] };
|
||||
|
|
@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -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
30
k8s-queues.sh
Normal 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 &)
|
||||
|
|
@ -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
699
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -305,5 +305,6 @@ return [
|
|||
'media' => 'média',
|
||||
'anchor' => 'ancre',
|
||||
'link' => 'lien',
|
||||
'color' => 'couleur',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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]) }}">
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue