Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8700654392 | ||
|
|
d169f18d95 |
24 changed files with 532 additions and 777 deletions
|
|
@ -1,2 +1,3 @@
|
|||
#!/bin/sh
|
||||
npx commitlint --config node_modules/@uwil/husky-config/commitlint.config.js --edit $1
|
||||
|
||||
npx --no -- commitlint --config node_modules/@uwil/husky-config/commitlint.config.cjs --edit $1
|
||||
|
|
|
|||
50
RGPD.md
Normal file
50
RGPD.md
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# RGPD
|
||||
|
||||
## Site
|
||||
|
||||
### En base de données
|
||||
|
||||
| Table | Colonne | Contenu | Utilisation |
|
||||
| ----- | ------- | ------- | ----------- |
|
||||
| activity_logs | user_id | Identifiant de l'utilisateur (back) | Tracer les actions dans le BO |
|
||||
| --- | --- | --- | --- |
|
||||
| job_videos | title | Métier de la personne | Carroussel de vidéos sur "On embauche" |
|
||||
| job_videos | place | Nom de la personne | Carroussel de vidéos sur "On embauche" |
|
||||
| --- | --- | --- | --- |
|
||||
| sites | director_name | Nom du directeur | Affichage sur les pages "Site" |
|
||||
| sites | director_function | Fonction du directeur | Affichage sur les pages "Site" |
|
||||
| sites | employee_name | Nom de l'employé | Affichage sur les pages "Site" |
|
||||
| sites | employee_function | Fonction de l'employé | Affichage sur les pages "Site" |
|
||||
| --- | --- | --- | --- |
|
||||
| testimonials | name | Nom de la personne témoignant | Affichage sur la page "On embauche" |
|
||||
| testimonials | job | Poste de la personne témoignant | Affichage sur la page "On embauche" |
|
||||
| testimonials | picture | Photo de la personne témoignant | Affichage sur la page "On embauche" |
|
||||
| testimonials | picture_alt | Texte alternatif de la photo (nom, prénom, poste) | Affichage sur la page "On embauche" |
|
||||
| testimonials | picture_title | Titre de la photo (nom, prénom, poste) | Affichage sur la page "On embauche" |
|
||||
| --- | --- | --- | --- |
|
||||
| users | first_name | Prénom | Affichage à différents endroits du BO |
|
||||
| users | last_name | Nom | Affichage à différents endroits du BO |
|
||||
| users | email | Adresse mail | Identifiant, sert à la connexion au BO |
|
||||
|
||||
### Formulaire de contact (marketing)
|
||||
|
||||
| Donnée | Contenu |
|
||||
| ------ | ------- |
|
||||
| Nom | Nom de la personne |
|
||||
| Prénom | Prénom de la personne |
|
||||
| Adresse | Adresse de la personne |
|
||||
| Code postal | Code postal de la personne |
|
||||
| Ville | Ville de la personne |
|
||||
| Pays | Pays de la personne |
|
||||
| Entreprise | Entreprise de la personne |
|
||||
| Adresse E-mail | Adresse email de la personne |
|
||||
| Téléphone | Numéro de téléphone de la personne |
|
||||
| Pièce jointe | Photo renseignée par la personne |
|
||||
|
||||
## Cookies
|
||||
|
||||
| Service | Utilité |
|
||||
| ------- | ------- |
|
||||
| Matomo | Mesure d'audience |
|
||||
| Google Recaptcha | Empêcher la soumission de formulaire par des robots |
|
||||
| Youtube | Visionner du contenu disponible sur la plateforme Youtube |
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
<?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,7 +6,6 @@ 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;
|
||||
|
|
@ -82,7 +81,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->getKey())->get();
|
||||
$sectionModels = Section::query()->where('page_id', $staticPageModel->id)->get();
|
||||
$historicalMilestoneModels = HistoricalMilestone::query()->orderBy('year', 'ASC')->get();
|
||||
/** @var \Illuminate\Database\Eloquent\Collection<array-key,\App\Models\Site> */
|
||||
$siteModelList = Site::query()->orderBy('order')->get();
|
||||
|
|
@ -151,8 +150,6 @@ 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',
|
||||
|
|
@ -165,7 +162,6 @@ class StaticPageController extends Controller
|
|||
'earthSection',
|
||||
'feedSection',
|
||||
'testimonialsSection',
|
||||
'navLinks',
|
||||
));
|
||||
}
|
||||
|
||||
|
|
@ -330,22 +326,12 @@ 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,7 +3,6 @@
|
|||
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;
|
||||
|
|
@ -38,10 +37,6 @@ class StoreStickyRequest extends FormRequest
|
|||
'string',
|
||||
'between:3,255'
|
||||
],
|
||||
'color' => [
|
||||
Rule::requiredIf($this->user()->can('create', $this->sticky)),
|
||||
new Enum(StickiesColorEnum::class)
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +51,6 @@ 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,7 +3,6 @@
|
|||
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;
|
||||
|
|
@ -14,7 +13,6 @@ 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.
|
||||
*
|
||||
|
|
@ -33,7 +31,6 @@ class Sticky extends Model
|
|||
'type',
|
||||
'title',
|
||||
'anchor',
|
||||
'color',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -43,7 +40,6 @@ class Sticky extends Model
|
|||
*/
|
||||
protected $casts = [
|
||||
'type' => StaticPageType::class,
|
||||
'color' => StickiesColorEnum::class,
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
1
commitlint.config.cjs
Normal file
1
commitlint.config.cjs
Normal file
|
|
@ -0,0 +1 @@
|
|||
module.exports = require('@uwil/husky-config/commitlint.config.cjs');
|
||||
|
|
@ -1 +0,0 @@
|
|||
export default { extends: ["@uwil/husky-config/commitlint.config.js"] };
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
<?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,7 +3,6 @@
|
|||
namespace Database\Seeders\Mandatory;
|
||||
|
||||
use App\Enums\StaticPageType;
|
||||
use App\Enums\StickiesColorEnum;
|
||||
use App\Models\Sticky;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
|
|
@ -15,171 +14,73 @@ 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',
|
||||
'color' => StickiesColorEnum::primary,
|
||||
'anchor' => 'company-life'
|
||||
],
|
||||
);
|
||||
Sticky::query()->updateOrCreate(
|
||||
[
|
||||
'type' => StaticPageType::we_hire,
|
||||
'anchor' => 'formation',
|
||||
],
|
||||
[
|
||||
'type' => StaticPageType::we_hire,
|
||||
'title' => 'L\'alternance et la formation',
|
||||
'anchor' => 'formation',
|
||||
'color' => StickiesColorEnum::secondary,
|
||||
'anchor' => 'formation'
|
||||
],
|
||||
);
|
||||
Sticky::query()->updateOrCreate(
|
||||
[
|
||||
'type' => StaticPageType::we_hire,
|
||||
'anchor' => 'we-testimonials',
|
||||
],
|
||||
[
|
||||
'type' => StaticPageType::we_hire,
|
||||
'title' => 'Nos collaborateurs témoignent',
|
||||
'anchor' => 'we-testimonials',
|
||||
'color' => StickiesColorEnum::quad,
|
||||
'anchor' => 'we-testimonials'
|
||||
],
|
||||
);
|
||||
Sticky::query()->updateOrCreate(
|
||||
[
|
||||
'type' => StaticPageType::we_hire,
|
||||
'anchor' => 'parity',
|
||||
],
|
||||
[
|
||||
'type' => StaticPageType::we_hire,
|
||||
'title' => 'La parité',
|
||||
'anchor' => 'parity',
|
||||
'color' => StickiesColorEnum::quint,
|
||||
'anchor' => 'parity'
|
||||
],
|
||||
);
|
||||
Sticky::query()->updateOrCreate(
|
||||
[
|
||||
'type' => StaticPageType::we_hire,
|
||||
'anchor' => 'on-se-retrouve',
|
||||
],
|
||||
[
|
||||
'type' => StaticPageType::we_hire,
|
||||
'title' => 'En savoir plus',
|
||||
'anchor' => 'on-se-retrouve',
|
||||
'color' => StickiesColorEnum::sixt,
|
||||
'anchor' => 'on-se-retrouve'
|
||||
],
|
||||
);
|
||||
Sticky::query()->updateOrCreate(
|
||||
[
|
||||
'type' => StaticPageType::unveil,
|
||||
'anchor' => 'key-numbers',
|
||||
],
|
||||
[
|
||||
'type' => StaticPageType::unveil,
|
||||
'title' => 'VOLENA',
|
||||
'anchor' => 'key-numbers',
|
||||
'color' => StickiesColorEnum::primary,
|
||||
'anchor' => 'key-numbers'
|
||||
],
|
||||
);
|
||||
Sticky::query()->updateOrCreate(
|
||||
[
|
||||
'type' => StaticPageType::unveil,
|
||||
'anchor' => 'missions',
|
||||
],
|
||||
[
|
||||
'type' => StaticPageType::unveil,
|
||||
'title' => 'Notre mission',
|
||||
'anchor' => 'missions',
|
||||
'color' => StickiesColorEnum::secondary,
|
||||
'anchor' => 'missions'
|
||||
],
|
||||
);
|
||||
Sticky::query()->updateOrCreate(
|
||||
[
|
||||
'type' => StaticPageType::unveil,
|
||||
'anchor' => 'local',
|
||||
],
|
||||
[
|
||||
'type' => StaticPageType::unveil,
|
||||
'title' => 'Filière 100% française',
|
||||
'anchor' => 'local',
|
||||
'color' => StickiesColorEnum::quad,
|
||||
'anchor' => 'local'
|
||||
],
|
||||
);
|
||||
Sticky::query()->updateOrCreate(
|
||||
[
|
||||
'type' => StaticPageType::unveil,
|
||||
'anchor' => 'sites',
|
||||
],
|
||||
[
|
||||
'type' => StaticPageType::unveil,
|
||||
'title' => 'Nos sites',
|
||||
'anchor' => 'sites',
|
||||
'color' => StickiesColorEnum::quint,
|
||||
'anchor' => 'sites'
|
||||
],
|
||||
);
|
||||
Sticky::query()->updateOrCreate(
|
||||
[
|
||||
'type' => StaticPageType::unveil,
|
||||
'anchor' => 'history',
|
||||
],
|
||||
[
|
||||
'type' => StaticPageType::unveil,
|
||||
'title' => 'Notre histoire',
|
||||
'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,
|
||||
'anchor' => 'history'
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
#!/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,7 +12,6 @@ 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}"
|
||||
|
|
@ -83,40 +82,12 @@ 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: 82
|
||||
runAsGroup: 82
|
||||
fsGroup: 82
|
||||
runAsUser: 33
|
||||
runAsGroup: 33
|
||||
fsGroup: 33
|
||||
fsGroupChangePolicy: "OnRootMismatch"
|
||||
volumes:
|
||||
- name: storage
|
||||
|
|
@ -202,8 +173,8 @@ spec:
|
|||
persistentVolumeClaim:
|
||||
claimName: ${CI_PROJECT_PATH_SLUG}-pvc-storage
|
||||
securityContext:
|
||||
runAsUser: 82
|
||||
runAsGroup: 82
|
||||
fsGroup: 82
|
||||
runAsUser: 33
|
||||
runAsGroup: 33
|
||||
fsGroup: 33
|
||||
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.1.1",
|
||||
"@uwil/husky-config": "^1.0.1",
|
||||
"@vitejs/plugin-basic-ssl": "^1.0.1",
|
||||
"@vitejs/plugin-vue": "^4.6.2",
|
||||
"@vue/compiler-sfc": "latest",
|
||||
|
|
|
|||
|
|
@ -305,6 +305,5 @@ return [
|
|||
'media' => 'média',
|
||||
'anchor' => 'ancre',
|
||||
'link' => 'lien',
|
||||
'color' => 'couleur',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -32,21 +32,21 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
}
|
||||
});
|
||||
|
||||
// * Stickies on mobile.
|
||||
// * Commit Buttons
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const stickyDiv = document.getElementById("sticky-blocks") as HTMLDivElement;
|
||||
if (stickyDiv) {
|
||||
stickyDiv.style.display = "none";
|
||||
const commitDiv = document.getElementById("commit-blocks") as HTMLDivElement;
|
||||
if (commitDiv) {
|
||||
commitDiv.style.display = "none";
|
||||
|
||||
document.onscroll = function () {
|
||||
const stickyDisplayerDiv = document.getElementById("sticky-displayer") as HTMLDivElement;
|
||||
const introCommitDiv = document.getElementById("introduction") as HTMLDivElement;
|
||||
|
||||
if (stickyDisplayerDiv) {
|
||||
if (introCommitDiv) {
|
||||
const scrollTop = (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;
|
||||
if (scrollTop < stickyDisplayerDiv.offsetTop - 100) {
|
||||
stickyDiv.style.display = "none";
|
||||
if (scrollTop < introCommitDiv.offsetTop - 100) {
|
||||
commitDiv.style.display = "none";
|
||||
} else {
|
||||
stickyDiv.style.display = "block";
|
||||
commitDiv.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,27 +86,6 @@
|
|||
</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,21 +7,27 @@
|
|||
@include('fo.layouts.search')
|
||||
</div> --}}
|
||||
</div>
|
||||
|
||||
@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)
|
||||
@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)
|
||||
<div class="col-6 col-md-12 px-md-0 py-md-1 p-2">
|
||||
<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>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -17,32 +17,38 @@
|
|||
|
||||
@section('content')
|
||||
<section class="commit">
|
||||
@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 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>
|
||||
</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>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
<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">
|
||||
<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,32 +17,49 @@
|
|||
|
||||
@section('content')
|
||||
<section class="we-hire">
|
||||
@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 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>
|
||||
</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>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
<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">
|
||||
<span id="sticky-displayer"></span>
|
||||
<div class="container">
|
||||
<div class="row position-relative">
|
||||
<div class="col-12 text-center">
|
||||
|
|
@ -252,7 +269,7 @@
|
|||
</div>
|
||||
</section>
|
||||
{{-- PARITY --}}
|
||||
<section class="parity border-top-curved-upper-tertiary-light anchor-padding overflow-hidden" id="parity">
|
||||
<section class="parity border-top-curved-upper-tertiary-light anchor-padding" 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 justify-content-center">
|
||||
<div class="site-navigation-wrapper show row m-0 p-0">
|
||||
<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,7 +41,6 @@
|
|||
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,32 +17,49 @@
|
|||
|
||||
@section('content')
|
||||
<section class="unveil">
|
||||
@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 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>
|
||||
</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>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
<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">
|
||||
<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');
|
||||
->middleware('htmlsanitize:director_speach,employee_speach,highlights,content');
|
||||
Route::patch('/sites/{site}/change-order/{direction}', [
|
||||
SiteController::class,
|
||||
'changeOrder'
|
||||
|
|
@ -164,8 +164,10 @@ Route::middleware(['admin-secure'])->prefix('bo')
|
|||
'duplicate'
|
||||
])->name('testimonials.duplicate');
|
||||
|
||||
// * NETWORKS.
|
||||
Route::resource('networks', NetworkController::class)->except('show');
|
||||
// * NETWORKS
|
||||
Route::resource('networks', NetworkController::class)->except('show')
|
||||
->withoutMiddleware('htmlsanitize')
|
||||
->middleware('htmlsanitize:content');
|
||||
Route::get('/networks/{network}/duplicate', [
|
||||
NetworkController::class,
|
||||
'duplicate'
|
||||
|
|
@ -179,7 +181,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');
|
||||
|
|
@ -196,7 +198,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');
|
||||
|
|
@ -213,10 +215,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:text');
|
||||
->middleware('htmlsanitize:content');
|
||||
Route::get('/brands/{brand}/duplicate', [
|
||||
BrandController::class,
|
||||
'duplicate'
|
||||
|
|
@ -226,7 +228,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