Compare commits

..

1 commit

Author SHA1 Message Date
Noah Lancien
ffda07ed8c docs: 📝 Added rgpd.md 2026-06-05 11:46:49 +02:00
48 changed files with 1986 additions and 3166 deletions

View file

@ -7,7 +7,7 @@ include:
file: 'security/security.yml'
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'build/docker-multistage.yml'
file: 'build/build.yml'
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'test/test.yml'

View file

@ -1,45 +1,5 @@
FROM composer:2.8 AS vendor
ARG GITLAB_USER
ARG GITLAB_PASSWORD
COPY database/ database/
COPY composer.json composer.json
COPY composer.lock composer.lock
RUN composer config gitlab-token.lab.s-web.fr ${GITLAB_USER} ${GITLAB_PASSWORD}
RUN composer install \
--ignore-platform-reqs \
--no-interaction \
--no-plugins \
--no-scripts \
--no-dev \
--prefer-dist
FROM node:20.18 AS frontend
ARG GITLAB_PASSWORD
RUN mkdir -p /app/public/build
COPY package*.json tsconfig.json vite.config.ts .eslintrc.json .stylelintrc.json /app/
COPY resources/ /app/resources/
WORKDIR /app
RUN npm config set @ldc-web:registry https://lab.s-web.fr/api/v4/packages/npm/
RUN npm config set -- '//lab.s-web.fr/api/v4/packages/npm/:_authToken' "${GITLAB_PASSWORD}"
RUN npm ci && npm run prod
ARG PHP_8_5_TAG=latest
FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/uwil-production-8.5:${PHP_8_5_TAG}
ARG USER=www-data
COPY --chown=${USER}:${USER} . /app/srcs
COPY --chown=${USER}:${USER} ./resources/favicon /app/srcs/public
COPY --from=vendor --chown=${USER}:${USER} /app/vendor/ /app/srcs/vendor/
COPY --from=frontend --chown=${USER}:${USER} /app/public/build/ /app/srcs/public/build/
FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/ldcweb-production-8.3:170625-101047
COPY --chown=www-data:www-data . /app/srcs
USER root
RUN chmod -R 755 /app/srcs/storage
USER ${USER}
USER www-data

34
RGPD.md Normal file
View file

@ -0,0 +1,34 @@
# RGPD
## Site
### En base de données
| Table | Colonne | Contenu | Utilisation |
| ----- | ------- | ------- | ----------- |
| activity_logs | user_id | Identifiant de l'utilisateur (back) | Tracer les modifications dans le BO |
| --- | --- | --- | --- |
| 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 |
| ------ | ------- |
| Civilité | M/Mme/Melle |
| Nom | Nom de la personne |
| Prénom | Prénom de la personne |
| Adresse E-mail | Adresse email de la personne |
| Téléphone | Numéro de téléphone de la personne |
| Adresse | Adresse de la personne |
| Code postal | Code postal de la personne |
| Ville | Ville de 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 |

View file

@ -10,10 +10,6 @@ enum StaticPageType: int
case legals = 1;
case confidentiality = 2;
case homepage = 3;
case our_products = 4;
case our_commitments = 5;
case banner_section = 6;
/**
* Optionnal labels definition.
@ -23,9 +19,5 @@ enum StaticPageType: int
private const LABELS = [
self::legals->name => 'Mentions légales',
self::confidentiality->name => 'Confidentialité',
self::homepage->name => 'Accueil',
self::our_products->name => 'Nos produits',
self::our_commitments->name => 'Nos engagements',
self::banner_section->name => 'Section bannière',
];
}

View file

@ -74,20 +74,7 @@ class StaticPageController extends Controller
public function update(UpdateStaticPageRequest $request, StaticPage $static_page): \Illuminate\Http\RedirectResponse
{
return DB::transaction(function () use ($request, $static_page) {
$validated = $request->validated();
$data = $static_page->data;
foreach ($validated['data'] as $key => $input) {
if (isset($input['value']) && is_array($input['value'])) {
$data[$key]['value'] = $input['value'];
}
}
$static_page->data = $data;
$static_page->fill(array_replace_recursive(
$static_page->getFillableFields($static_page),
$validated
));
$static_page->fill($request->validated());
if ($static_page->saveOrFail()) {
return redirect()->route('bo.static_pages.edit', $static_page)

View file

@ -33,7 +33,7 @@ class Controller extends BaseController
protected function searchQuery(
Builder $query,
string $search,
?callable $searchQuery = null,
callable $searchQuery = null,
string ...$fields
): Builder {
if (count($fields)) {
@ -131,7 +131,7 @@ class Controller extends BaseController
*/
protected function paginate(
Builder $query,
?ItemsPerPaginationEnum $pagination = null
ItemsPerPaginationEnum $pagination = null
): \Illuminate\Contracts\Pagination\LengthAwarePaginator {
$currentRoutePath = Str::slug(request()->route()->getName());
$cacheKey = "pagination.{$currentRoutePath}";

View file

@ -1,22 +0,0 @@
<?php
namespace App\Http\Controllers\Fo;
use App\Enums\StaticPageType;
use App\Http\Controllers\Controller;
use App\Models\StaticPage;
class CommitmentController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Contracts\View\View
*/
public function index()
{
$staticPageModel = StaticPage::query()->where('type', StaticPageType::our_commitments)->first();
return view('fo.pages.engagments', compact('staticPageModel'));
}
}

View file

@ -2,11 +2,9 @@
namespace App\Http\Controllers\Fo;
use App\Enums\StaticPageType;
use App\Http\Controllers\Controller;
use App\Models\Range;
use App\Models\Recipe;
use App\Models\StaticPage;
class HomeController extends Controller
{
@ -17,8 +15,6 @@ class HomeController extends Controller
*/
public function index()
{
$staticPageModel = StaticPage::query()->where('type', StaticPageType::homepage)->first();
// Gammes.
$ranges = Range::query()->where('status', true)
->get();
@ -30,6 +26,6 @@ class HomeController extends Controller
->take(3)
->get();
return view('fo.pages.home', compact('staticPageModel', 'ranges', 'publishedRecipes'));
return view('fo.pages.home', compact('ranges', 'publishedRecipes'));
}
}

View file

@ -2,11 +2,9 @@
namespace App\Http\Controllers\Fo;
use App\Enums\StaticPageType;
use App\Http\Controllers\Controller;
use App\Models\Product;
use App\Models\Range;
use App\Models\StaticPage;
use Illuminate\Database\Eloquent\Builder;
class ProductsController extends Controller
@ -18,13 +16,11 @@ class ProductsController extends Controller
*/
public function index()
{
$staticPageModel = StaticPage::query()->where('type', StaticPageType::our_products)->first();
// Gammes.
$ranges = Range::query()->where('status', true)
->get();
return view('fo.pages.products.index', compact('staticPageModel', 'ranges'));
return view('fo.pages.products.index', compact('ranges'));
}
/**

View file

@ -2,7 +2,6 @@
namespace App\Http\Requests\Bo\StaticPages;
use App\Enums\StaticPageType;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Str;
@ -26,7 +25,7 @@ class UpdateStaticPageRequest extends FormRequest
public function prepareForValidation(): void
{
$this->merge([
'content' => $this->input('content') ? Str::of($this->input('content'))->value() : null
'content' => Str::of($this->post('content'))->value()
]);
}
@ -37,39 +36,11 @@ class UpdateStaticPageRequest extends FormRequest
*/
public function rules(): array
{
$rules = [
'seo_title' => 'nullable',
'seo_description' => 'nullable',
return [
'seo_title' => 'required|min:45|max:70',
'seo_description' => 'required|min:50|max:160',
'title' => 'required|min:3|max:255',
'content' => 'nullable',
'data' => 'present|array',
'data.*' => 'required|array',
'content' => 'present',
];
/** @var \App\Models\StaticPage $staticPageModel */
$staticPageModel = request()->route()->parameter('static_page');
if (!$staticPageModel->type->equals(StaticPageType::banner_section)) {
$rules = \array_merge(
$rules,
[
'seo_title' => 'required|min:45|max:70',
'seo_description' => 'required|min:50|max:160',
],
);
}
if (
!$staticPageModel->type->equals(StaticPageType::homepage) &&
!$staticPageModel->type->equals(StaticPageType::our_products) &&
!$staticPageModel->type->equals(StaticPageType::our_commitments) &&
!$staticPageModel->type->equals(StaticPageType::banner_section)
) {
$rules = \array_merge(
$rules,
['content' => ['present']],
);
}
return $rules;
}
}

View file

@ -91,7 +91,7 @@ class FileStorageHelper
Model $model,
$file,
bool $slugify = false,
?string $filename = null,
string $filename = null,
bool $private = false
): string {
// phpcs:enable
@ -152,7 +152,7 @@ class FileStorageHelper
public static function storeModelFilesFromHtml(
Model $model,
string $htmlString,
?string $oldHtmlString = null
string $oldHtmlString = null
): string {
\collect(self::onlyUploadedFilesWithFileManager(self::findFilesInHtml($htmlString)))
->each(function (string $path) use ($model, &$htmlString) {

View file

@ -5,27 +5,24 @@ namespace App\Models;
use App\Enums\StaticPageType;
use App\Lib\Helpers\ToolboxHelper;
use App\Traits\Models\ActivityLog;
use App\Traits\Models\MiniCrudModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
/**
* @property \App\Enums\StaticPageType $type Page type (StaticPageEnum).
* @property string $seo_title Seo title about 70 chars as recommended.
* @property string $seo_description Seo description about 160 chars as recommended.
* @property string $title Title for the page.
* @property string $slug Slug of the title for the page.
* @property string $content WYSIWYG text content using ckeditor.
* @property array<string, array<string, mixed>> $data Static page json data.
* @property-read \Illuminate\Support\Carbon $created_at Created date.
* @property-read \Illuminate\Support\Carbon $updated_at Updated date.
* @property \App\Enums\StaticPageType $type Page type (StaticPageEnum).
* @property string $seo_title Seo title about 70 chars as recommended.
* @property string $seo_description Seo description about 160 chars as recommended.
* @property string $title Title for the page.
* @property string $slug Slug of the title for the page.
* @property string $content WYSIWYG text content using ckeditor.
* @property-read \Illuminate\Support\Carbon $created_at Created date.
* @property-read \Illuminate\Support\Carbon $updated_at Updated date.
*/
class StaticPage extends Model
{
use ActivityLog;
use HasFactory;
use MiniCrudModel;
/**
* The attributes that are mass assignable.
@ -37,7 +34,6 @@ class StaticPage extends Model
'seo_description',
'title',
'content',
'data'
];
/**
@ -47,7 +43,6 @@ class StaticPage extends Model
*/
protected $casts = [
'type' => StaticPageType::class,
'data' => 'object',
];
/**

View file

@ -2,16 +2,14 @@
namespace App\Providers;
use App\Enums\StaticPageType;
use App\Models\Range;
use App\Models\StaticPage;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
@ -76,11 +74,6 @@ class AppServiceProvider extends ServiceProvider
$ranges = Range::query()->where('status', true)->get();
View::share('PublishedRangesGlobal', $ranges);
}
if (Schema::hasTable('static_pages')) {
$bannerSection = StaticPage::query()->where('type', StaticPageType::banner_section->value())->get();
View::share('bannerSection', $bannerSection);
}
}
}
}

View file

@ -11,20 +11,18 @@ trait MiniCrudModel
/**
* Fill the model with an array of attributes.
*
* @param array<string, mixed> $attributes
* @return $this
* @param array $attributes
* @return void
* @throws \Illuminate\Database\Eloquent\MassAssignmentException If fill prop is not allowed.
* @phpcs:disable Squiz.Commenting.FunctionComment.EmptyThrows
*/
public function fill(array $attributes): static
public function fill(array $attributes)
{
// phpcs:enable
parent::fill($attributes);
if (isset($attributes['data'])) {
$this->setData($attributes['data']);
}
return $this;
}
/**
@ -64,6 +62,7 @@ trait MiniCrudModel
*/
public function minicrudUpdated()
{
/** @var array */
foreach ($this->data as $index => $input) {
switch ($input['inputType']) {
case InputType::text->value:
@ -178,21 +177,4 @@ trait MiniCrudModel
} //end foreach
return $data;
}
/**
* Get fillable properties and their values from the model.
*
* @param self $model
* @return array
*/
public function getFillableFields(self $model): array
{
$datas = [];
foreach ($model->toArray() as $property => $value) {
if (in_array($property, $model->getFillable())) {
$datas = array_merge($datas, [$property => $value]);
}
}
return $datas;
}
}

View file

@ -1,33 +0,0 @@
<?php
namespace App\View\Components;
use App\Enums\StaticPageType;
use App\Models\StaticPage;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class LocalBlockComponent extends Component
{
/** @var \App\Models\StaticPage $staticPageModel */
private $staticPageModel;
/**
* Create a new component instance.
*/
public function __construct()
{
$this->staticPageModel = StaticPage::query()->where('type', StaticPageType::our_commitments)->first();
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.local-block-component', [
'staticPageModel' => $this->staticPageModel
]);
}
}

View file

@ -3,8 +3,8 @@
"type": "project",
"description": "Site de la marque Lionor",
"require": {
"php": "^8.5",
"scaler-tech/laravel-saml2": "^2.5",
"php": "^8.3",
"24slides/laravel-saml2": "^2.4",
"axlon/laravel-postal-code-validation": "^3.3",
"carlos-meneses/laravel-mpdf": "^2.1",
"diglactic/laravel-breadcrumbs": "^9.0",
@ -17,7 +17,7 @@
"mews/purifier": "^3.4",
"propaganistas/laravel-phone": "^5.0.3",
"sentry/sentry-laravel": "*",
"uwil/laravel-admin-secure": "^6.0",
"uwil/admin-secure-laravel": "^5.0",
"uwil/k8s-laravel": "^1.4",
"uwil/sitemap-generator": "^3.0"
},

3551
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,29 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('static_pages', function (Blueprint $table) {
$table->text('seo_title')->nullable()->comment('Seo title about 70 chars as recommended')->change();
$table->text('seo_description')->nullable()->comment('Seo description about 160 chars as recommended')->change();
$table->text('content')->nullable()->comment('WYSIWYG text content using ckeditor')->change();
$table->mediumText('data')->nullable()->after('content')->comment('Static page data.');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
}
};

View file

@ -1,154 +0,0 @@
<?php
use App\Enums\InputType;
use App\Enums\StaticPageType;
use App\Models\StaticPage;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
// HOMEPAGE
$data = [
'left_title' => [
'label' => 'Titre de la section de gauche',
'inputType' => InputType::string->value,
'value' => 'Des produits bien élevés qui ont le goût de la qualité',
'validate' => 'required|string|between:3,255',
'required' => true
],
'left_subtitle' => [
'label' => 'Sous-titre de la section de gauche',
'inputType' => InputType::string->value,
'value' => 'Garantis Poulet 100% local',
'validate' => 'required|string|between:3,255',
'required' => true
],
'left_button_text' => [
'label' => 'Texte du bouton de la section de gauche',
'inputType' => InputType::string->value,
'value' => 'Nous Découvrir >',
'validate' => 'required|string|between:3,255',
'required' => true
],
'right_title' => [
'label' => 'Titre de la section de droite',
'inputType' => InputType::string->value,
'value' => 'Des produits de qualité bons et accessibles',
'validate' => 'required|string|between:3,255',
'required' => true
],
'right_subtitle' => [
'label' => 'Sous-titre de la section de droite',
'inputType' => InputType::string->value,
'value' => 'Pour manger sain et régional',
'validate' => 'required|string|between:3,255',
'required' => true
],
'right_button_text' => [
'label' => 'Texte du bouton de la section de gauche',
'inputType' => InputType::string->value,
'value' => 'Voir nos recettes >',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_title' => [
'label' => 'Titre de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Chez Lionor le',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_title_2' => [
'label' => 'Titre n°2 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Poulet 100% local',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_title_3' => [
'label' => 'Titre n°3 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'C\'est...',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_item_1' => [
'label' => 'Texte n°1 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Des Volailles nées, élevées et préparées en Hauts-de-France.',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_item_2' => [
'label' => 'Texte n°2 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Des éleveurs animés par le développement de leur région.',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_item_3' => [
'label' => 'Texte n°3 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Des volailles bien élevées qui assurent des produits bons et accessibles.',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_item_4' => [
'label' => 'Texte n°4 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Une filière soucieuse de la santé des hommes, des animaux et de la terre.',
'validate' => 'required|string|between:3,255',
'required' => true
],
'product_title' => [
'label' => 'Titre de la section n°3',
'inputType' => InputType::string->value,
'value' => 'Découvrez nos volailles bien élevées',
'validate' => 'required|string|between:3,255',
'required' => true
],
'product_subtitle' => [
'label' => 'Titre n°2 de la section n°3',
'inputType' => InputType::string->value,
'value' => 'qui ont le goût de la qualité',
'validate' => 'required|string|between:3,255',
'required' => true
],
];
$staticPage = StaticPage::where('type', StaticPageType::homepage)->first();
if ($staticPage) {
$staticPage->data = $data;
$staticPage->saveQuietly();
} else {
StaticPage::query()->forceCreateQuietly(
[
'type' => StaticPageType::homepage->value(),
'seo_title' => 'Lionor, des volailles en Nord',
'seo_description' => '100% local, des produits bien élevés, de qualité et accessibles.',
'title' => 'Accueil',
'slug' => 'accueil',
'data' => $data
]
);
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('static_pages', function () {
$staticPage = StaticPage::query()->where('type', StaticPageType::homepage)->first();
$staticPage->data = [];
$staticPage->saveQuietly();
});
}
};

View file

@ -1,119 +0,0 @@
<?php
use App\Enums\InputType;
use App\Enums\StaticPageType;
use App\Models\StaticPage;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
// OUR PRODUCTS
$data = [
'page_title' => [
'label' => 'Titre de la section n°1',
'inputType' => InputType::string->value,
'value' => 'Nos volailles bien élevées',
'validate' => 'required|string|between:3,255',
'required' => true
],
'page_title_2' => [
'label' => 'Titre n°2 de la section n°1',
'inputType' => InputType::string->value,
'value' => 'qui ont le goût de la qualité',
'validate' => 'required|string|between:3,255',
'required' => true
],
'left_title_1' => [
'label' => 'Titre n°1 de la section de gauche',
'inputType' => InputType::string->value,
'value' => 'Trouvez l\'inspiration',
'validate' => 'required|string|min:15',
'required' => true
],
'left_title_2' => [
'label' => 'Titre n°2 de la section de gauche',
'inputType' => InputType::string->value,
'value' => 'avec nos recettes',
'validate' => 'required|string|min:15',
'required' => true
],
'left_title_3' => [
'label' => 'Titre n°3 de la section de gauche',
'inputType' => InputType::string->value,
'value' => 'de volailles bonnes',
'validate' => 'required|string|min:15',
'required' => true
],
'left_title_4' => [
'label' => 'Titre n°4 de la section de gauche',
'inputType' => InputType::string->value,
'value' => 'et accessibles',
'validate' => 'required|string|min:15',
'required' => true
],
'right_title_1' => [
'label' => 'Titre n°1 de la section de droite',
'inputType' => InputType::string->value,
'value' => 'Découvrez les engagements',
'validate' => 'required|string|min:15',
'required' => true
],
'right_title_2' => [
'label' => 'Titre n°2 de la section de droite',
'inputType' => InputType::string->value,
'value' => 'd\'une filière engagée',
'validate' => 'required|string|min:15',
'required' => true
],
'right_title_3' => [
'label' => 'Titre n°3 de la section de droite',
'inputType' => InputType::string->value,
'value' => 'pour manger bon, sain',
'validate' => 'required|string|min:15',
'required' => true
],
'right_title_4' => [
'label' => 'Titre n°4 de la section de droite',
'inputType' => InputType::string->value,
'value' => 'et Poulet 100% local',
'validate' => 'required|string|min:15',
'required' => true
],
];
$staticPage = StaticPage::where('type', StaticPageType::our_products)->first();
if ($staticPage) {
$staticPage->data = $data;
$staticPage->saveQuietly();
} else {
StaticPage::query()->forceCreateQuietly(
[
'type' => StaticPageType::our_products->value(),
'seo_title' => 'Nos volailles bien élevées qui ont le goût de la qualité',
'seo_description' => 'Liste de toutes nos gammes de produits.',
'title' => 'Nos produits',
'slug' => 'gammes',
'data' => $data
]
);
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('static_pages', function () {
$staticPage = StaticPage::query()->where('type', StaticPageType::our_products)->first();
$staticPage->data = [];
$staticPage->saveQuietly();
});
}
};

View file

@ -1,162 +0,0 @@
<?php
use App\Enums\InputType;
use App\Enums\StaticPageType;
use App\Models\StaticPage;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
// OUR PRODUCTS
$data = [
'commitment_title_1' => [
'label' => 'Titre de l\'engagement n°1',
'inputType' => InputType::string->value,
'value' => 'Des produits de qualité bons et accessibles',
'validate' => 'required|string|between:3,255',
'required' => true
],
'commitment_subtitle_1' => [
'label' => 'Sous-titre de l\'engagement n°1',
'inputType' => InputType::string->value,
'value' => 'Garantis Poulet 100% Hauts-De-France',
'validate' => 'required|string|between:3,255',
'required' => true
],
'commitment_text_1' => [
'label' => 'Texte de l\'engagement n°1',
'inputType' => InputType::text->value,
'value' => '<p>Avec notre label Poulet 100% LOCAL, certifié et contrôlé par un cahier des charges précis, nous garantissons l\'origine de nos produits issus de poulets nés, élevés et préparés en région des Hauts de France.</p>',
'validate' => 'required|string|min:15',
'required' => true
],
'commitment_title_2' => [
'label' => 'Titre de l\'engagement n°2',
'inputType' => InputType::string->value,
'value' => 'Une filière soucieuse de la santé',
'validate' => 'required|string|between:3,255',
'required' => true
],
'commitment_subtitle_2' => [
'label' => 'Sous-titre de l\'engagement n°2',
'inputType' => InputType::string->value,
'value' => 'Des hommes, des animaux et de la terre',
'validate' => 'required|string|between:3,255',
'required' => true
],
'commitment_text_2' => [
'label' => 'Texte de l\'engagement n°2',
'inputType' => InputType::text->value,
'value' => '<p>LIONOR, c\'est une filière qui s\'engage pour élever des volailles dans le respect du vivant et qui favorise l\'économie locale. Fiers de nos 70 éleveurs et de nos 235 salariés, unis par la passion de leur métier, nous participons activement à la vie sociale et économique de notre région.</p>',
'validate' => 'required|string|min:15',
'required' => true
],
'commitment_title_3' => [
'label' => 'Titre de l\'engagement n°3',
'inputType' => InputType::string->value,
'value' => 'Des femmes et des hommes',
'validate' => 'required|string|between:3,255',
'required' => true
],
'commitment_subtitle_3' => [
'label' => 'Sous-titre de l\'engagement n°3',
'inputType' => InputType::string->value,
'value' => 'Qui maîtrisent la filière du grain à l\'assiette',
'validate' => 'required|string|between:3,255',
'required' => true
],
'commitment_text_3' => [
'label' => 'Texte de l\'engagement n°3',
'inputType' => InputType::text->value,
'value' => '<p>Grâce à la maitrise totale de notre filière, allant de l\'alimentation aux produits régionaux de qualité, en passant pas nos élevages se situant dans un rayon de 50kms autour de notre entreprise, nous garantissons aux consommateurs finaux, une qualité et une traçabilité irréprochables. Notre crédo : "élever bien pour manger sain en région des Hauts de France."</p>',
'validate' => 'required|string|min:15',
'required' => true
],
'container_title' => [
'label' => 'Titre de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Chez Lionor le',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_title_2' => [
'label' => 'Titre n°2 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Poulet 100% local',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_title_3' => [
'label' => 'Titre n°3 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'C\'est...',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_item_1' => [
'label' => 'Texte n°1 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Des Volailles nées, élevées et préparées en Hauts-de-France.',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_item_2' => [
'label' => 'Texte n°2 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Des éleveurs animés par le développement de leur région.',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_item_3' => [
'label' => 'Texte n°3 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Des volailles bien élevées qui assurent des produits bons et accessibles.',
'validate' => 'required|string|between:3,255',
'required' => true
],
'container_item_4' => [
'label' => 'Texte n°4 de la section n°2',
'inputType' => InputType::string->value,
'value' => 'Une filière soucieuse de la santé des hommes, des animaux et de la terre.',
'validate' => 'required|string|between:3,255',
'required' => true
],
];
$staticPage = StaticPage::where('type', StaticPageType::our_commitments)->first();
if ($staticPage) {
$staticPage->data = $data;
$staticPage->saveQuietly();
} else {
StaticPage::query()->forceCreateQuietly(
[
'type' => StaticPageType::our_commitments->value(),
'seo_title' => 'Les engagements Lionor',
'seo_description' => 'Des produits de qualité, une filière soucieuse de la santé, maîtrise la filière du grain à l\'assiette',
'title' => 'Nos engagements',
'slug' => 'nos-engagements',
'data' => $data
]
);
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('static_pages', function () {
$staticPage = StaticPage::query()->where('type', StaticPageType::our_commitments)->first();
$staticPage->data = [];
$staticPage->saveQuietly();
});
}
};

View file

@ -1,110 +0,0 @@
<?php
use App\Enums\InputType;
use App\Enums\StaticPageType;
use App\Models\StaticPage;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
// BANNER SECTION
$data = [
'banner_title_1' => [
'label' => 'Titre n°1 du bandeau',
'inputType' => InputType::string->value,
'value' => 'Choisir',
'validate' => 'required|string|between:3,255',
'required' => true
],
'banner_title_2' => [
'label' => 'Titre n°2 du bandeau',
'inputType' => InputType::string->value,
'value' => 'les volailles',
'validate' => 'required|string|between:3,255',
'required' => true
],
'banner_title_3' => [
'label' => 'Titre n°3 du bandeau',
'inputType' => InputType::string->value,
'value' => 'Lionor, c\'est...',
'validate' => 'required|string|between:3,255',
'required' => true
],
'banner_item_title_1' => [
'label' => 'Titre de l\'élément n°1',
'inputType' => InputType::string->value,
'value' => 'Soutenir',
'validate' => 'required|string|between:3,255',
'required' => true
],
'banner_item_text_1' => [
'label' => 'Texte de l\'élément n°1',
'inputType' => InputType::string->value,
'value' => 'L\'emploi local et les éleveurs régionaux',
'validate' => 'required|string|between:3,255',
'required' => true
],
'banner_item_title_2' => [
'label' => 'Titre de l\'élément n°2',
'inputType' => InputType::string->value,
'value' => 'Choisir la fraîcheur',
'validate' => 'required|string|between:3,255',
'required' => true
],
'banner_item_text_2' => [
'label' => 'Texte de l\'élément n°2',
'inputType' => InputType::string->value,
'value' => 'Et consommer des produits de proximité',
'validate' => 'required|string|between:3,255',
'required' => true
],
'banner_item_title_3' => [
'label' => 'Titre de l\'élément n°3',
'inputType' => InputType::string->value,
'value' => 'Goûter la qualité',
'validate' => 'required|string|between:3,255',
'required' => true
],
'banner_item_text_3' => [
'label' => 'Texte de l\'élément n°3',
'inputType' => InputType::string->value,
'value' => 'D\'un bout à l\'autre de la filière',
'validate' => 'required|string|between:3,255',
'required' => true
],
];
$staticPage = StaticPage::where('type', StaticPageType::banner_section)->first();
if ($staticPage) {
$staticPage->data = $data;
$staticPage->saveQuietly();
} else {
StaticPage::query()->forceCreateQuietly(
[
'type' => StaticPageType::banner_section->value(),
'title' => 'Bannière',
'slug' => 'banner',
'data' => $data
]
);
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('static_pages', function () {
$staticPage = StaticPage::query()->where('type', StaticPageType::banner_section)->first();
$staticPage->data = [];
$staticPage->saveQuietly();
});
}
};

View file

@ -82,9 +82,9 @@ spec:
imagePullSecrets:
- name: docker-registry-credentials
securityContext:
runAsUser: 82
runAsGroup: 82
fsGroup: 82
runAsUser: 33
runAsGroup: 33
fsGroup: 33
fsGroupChangePolicy: "OnRootMismatch"
volumes:
- name: storage
@ -171,8 +171,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

95
package-lock.json generated
View file

@ -1,5 +1,5 @@
{
"name": "srcs",
"name": "lionor",
"lockfileVersion": 3,
"requires": true,
"packages": {
@ -31,7 +31,6 @@
"fslightbox": "^3.4.1",
"laravel-vite-plugin": "latest",
"leaflet": "^1.9.4",
"meow": "^9.0.0",
"postcss-discard-comments": "^5.1.2",
"prettier": "latest",
"resolve-url-loader": "^5.0.0",
@ -2602,7 +2601,8 @@
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.3.tgz",
"integrity": "sha512-ZYFzrvyWUNhaPomn80dsMNgMeXxNWZBdkuG/hWlUvXvbdUH8ZERNBGXnU87McuGcWDsyzX2aChCv/SVN348k3A==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/@types/node": {
"version": "22.14.1",
@ -2617,7 +2617,8 @@
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.2.tgz",
"integrity": "sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/@types/semver": {
"version": "7.5.3",
@ -3303,6 +3304,7 @@
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==",
"dev": true,
"peer": true,
"engines": {
"node": ">=0.10.0"
}
@ -3496,6 +3498,8 @@
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">=6"
}
@ -3505,6 +3509,8 @@
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz",
"integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"camelcase": "^5.3.1",
"map-obj": "^4.0.0",
@ -3789,6 +3795,7 @@
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
"dev": true,
"peer": true,
"engines": {
"node": ">=0.10.0"
}
@ -3798,6 +3805,7 @@
"resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz",
"integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==",
"dev": true,
"peer": true,
"dependencies": {
"decamelize": "^1.1.0",
"map-obj": "^1.0.0"
@ -3814,6 +3822,7 @@
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
"integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==",
"dev": true,
"peer": true,
"engines": {
"node": ">=0.10.0"
}
@ -3884,6 +3893,7 @@
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
"dev": true,
"peer": true,
"dependencies": {
"is-arrayish": "^0.2.1"
}
@ -4588,6 +4598,7 @@
"resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz",
"integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==",
"dev": true,
"peer": true,
"engines": {
"node": ">=6"
}
@ -4624,6 +4635,7 @@
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",
"integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==",
"dev": true,
"peer": true,
"dependencies": {
"lru-cache": "^6.0.0"
},
@ -4636,6 +4648,7 @@
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dev": true,
"peer": true,
"dependencies": {
"yallist": "^4.0.0"
},
@ -4647,7 +4660,8 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/html-tags": {
"version": "3.3.1",
@ -4723,6 +4737,8 @@
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
"integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">=8"
}
@ -4754,7 +4770,8 @@
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/is-binary-path": {
"version": "2.1.0",
@ -4834,6 +4851,7 @@
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
"integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==",
"dev": true,
"peer": true,
"engines": {
"node": ">=0.10.0"
}
@ -4894,7 +4912,8 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
@ -4946,6 +4965,7 @@
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
"dev": true,
"peer": true,
"engines": {
"node": ">=0.10.0"
}
@ -4995,7 +5015,8 @@
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/loader-utils": {
"version": "2.0.4",
@ -5083,6 +5104,7 @@
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz",
"integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==",
"dev": true,
"peer": true,
"engines": {
"node": ">=8"
},
@ -5113,6 +5135,8 @@
"resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz",
"integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"@types/minimist": "^1.2.0",
"camelcase-keys": "^6.2.2",
@ -5139,6 +5163,8 @@
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz",
"integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">=10"
},
@ -5194,6 +5220,7 @@
"resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
"integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
"dev": true,
"peer": true,
"engines": {
"node": ">=4"
}
@ -5215,6 +5242,7 @@
"resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz",
"integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==",
"dev": true,
"peer": true,
"dependencies": {
"arrify": "^1.0.1",
"is-plain-obj": "^1.1.0",
@ -5271,6 +5299,7 @@
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
"integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
"dev": true,
"peer": true,
"dependencies": {
"hosted-git-info": "^4.0.1",
"is-core-module": "^2.5.0",
@ -5286,6 +5315,7 @@
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dev": true,
"peer": true,
"dependencies": {
"yallist": "^4.0.0"
},
@ -5298,6 +5328,7 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dev": true,
"peer": true,
"dependencies": {
"lru-cache": "^6.0.0"
},
@ -5312,7 +5343,8 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/normalize-path": {
"version": "3.0.0",
@ -5408,6 +5440,8 @@
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">=6"
}
@ -5429,6 +5463,7 @@
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
"integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"peer": true,
"dependencies": {
"@babel/code-frame": "^7.0.0",
"error-ex": "^1.3.1",
@ -5708,6 +5743,8 @@
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz",
"integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">=8"
}
@ -5717,6 +5754,8 @@
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz",
"integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"@types/normalize-package-data": "^2.4.0",
"normalize-package-data": "^2.5.0",
@ -5732,6 +5771,8 @@
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz",
"integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"find-up": "^4.1.0",
"read-pkg": "^5.2.0",
@ -5749,6 +5790,8 @@
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
@ -5762,6 +5805,8 @@
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"p-locate": "^4.1.0"
},
@ -5774,6 +5819,8 @@
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"p-try": "^2.0.0"
},
@ -5789,6 +5836,8 @@
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"p-limit": "^2.2.0"
},
@ -5801,6 +5850,8 @@
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
"integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">=8"
}
@ -5809,13 +5860,17 @@
"version": "2.8.9",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"dev": true
"dev": true,
"optional": true,
"peer": true
},
"node_modules/read-pkg/node_modules/normalize-package-data": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
"integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"hosted-git-info": "^2.1.4",
"resolve": "^1.10.0",
@ -5828,6 +5883,8 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"optional": true,
"peer": true,
"bin": {
"semver": "bin/semver"
}
@ -5837,6 +5894,8 @@
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz",
"integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">=8"
}
@ -5858,6 +5917,8 @@
"resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz",
"integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"indent-string": "^4.0.0",
"strip-indent": "^3.0.0"
@ -6307,6 +6368,7 @@
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
"integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==",
"dev": true,
"peer": true,
"dependencies": {
"spdx-expression-parse": "^3.0.0",
"spdx-license-ids": "^3.0.0"
@ -6316,13 +6378,15 @@
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
"integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/spdx-expression-parse": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
"integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
"dev": true,
"peer": true,
"dependencies": {
"spdx-exceptions": "^2.1.0",
"spdx-license-ids": "^3.0.0"
@ -6332,7 +6396,8 @@
"version": "3.0.16",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz",
"integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/string-width": {
"version": "4.2.3",
@ -6366,6 +6431,8 @@
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
"integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"min-indent": "^1.0.0"
},
@ -6991,6 +7058,8 @@
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz",
"integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">=8"
}
@ -7164,6 +7233,7 @@
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
"integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
"dev": true,
"peer": true,
"dependencies": {
"spdx-correct": "^3.0.0",
"spdx-expression-parse": "^3.0.0"
@ -7791,6 +7861,7 @@
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
"integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true,
"peer": true,
"engines": {
"node": ">=10"
}

View file

@ -38,7 +38,6 @@
"fslightbox": "^3.4.1",
"laravel-vite-plugin": "latest",
"leaflet": "^1.9.4",
"meow": "^9.0.0",
"postcss-discard-comments": "^5.1.2",
"prettier": "latest",
"resolve-url-loader": "^5.0.0",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View file

@ -1,19 +0,0 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

View file

@ -1,266 +0,0 @@
{{-- MINI CRUD EDIT WHEN JSON IS TRANSLATABLE --}}
@php
$lastPrefix = null;
@endphp
@foreach ($data as $k => $input)
@if (!isset($input['inputType']))
@continue
@endif
@php
$prefix = str_contains($k, '_') ? explode('_', $k)[0] : null;
$displaySeparator = $lastPrefix !== null && $prefix !== $lastPrefix;
$lastPrefix = $prefix;
@endphp
@if ($displaySeparator)
<div class="my-4"></div>
@endif
@switch(intval($input['inputType']))
@case(intval(\App\Enums\InputType::string->value))
<div class="minicrud-input col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ $input['label'] }} *</legend>
<div class="row">
<div class="col-12 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => str($input['label'])->slug(),
'label' => $input['label'],
'hasWordCounter' => true,
'name' => 'data[' . $k . '][value]',
'value' => old("data.{$k}.value", $input['value'] ?? null),
'required' => isset($input['required']) ? !empty($input['required']) : true,
'model' => $model ?? null,
'helper' => __('validation.between.string', [
'attribute' => $input['label'],
'min' => 3,
'max' => 255,
]),
])
@include('modules.input-error', [
'inputName' => "data.{$k}.value",
])
</div>
</div>
</fieldset>
</div>
@break
@case(intval(\App\Enums\InputType::number->value))
<div class="minicrud-input col-12 mb-3">
<fieldset class="mb-3 border p-3">
<div class="d-flex justify-content-start align-items-center mb-2 flex-row">
<legend class="m-0 w-auto">
<label class="col-form-label" for="number{{ $k }}">
<b>{{ $input['label'] }}</b>
</label>
</legend>
@if (!empty($input['tooltip']))
<span class="ms-1" data-bs-toggle="tooltip" data-bs-html="true" title="{{ $input['tooltip'] }}">
<i class="fa fa-question-circle"></i>
</span>
@endif
</div>
<div class="row mb-3">
<div class="form-group">
<input class="form-control" id="number{{ $k }}" name="data[{{ $k }}][value]" type="number"
value="{{ old("data.{$k}.value") ?? ($input['value'] ?? '') }}" aria-describedby="NumberHelp{{ $k }}"
step="0.01" placeholder="{{ $input['label'] }}" @if (!isset($input['required']) or $input['required']) required @endif>
@include('modules.input-error', [
'inputName' => "data.{$k}.value",
'helperId' => "NumberHelp{$k}",
'helper' => $input['helper'] ?? '',
])
</div>
</div>
</fieldset>
</div>
@break
@case(intval(\App\Enums\InputType::text->value))
<div class="minicrud-input col-12 mb-3">
<fieldset class="border p-3">
<legend>{{ $input['label'] }} *</legend>
<div class="row mb-3">
<div class="col-12">
@include('bo.partials.inputs.text-html', [
'id' => str($input['label'])->slug(),
'name' => "data[{$k}][value]",
'value' => old("data.{$k}.value", $input['value'] ?? null),
'model' => $model ?? null,
'helper' =>
__('crud.minicrud.text_warning') .
'. ' .
__('validation.min.string', [
'attribute' => $input['label'],
'min' => 3,
]),
])
@include('modules.input-error', [
'inputName' => "data.{$k}.value",
])
</div>
</div>
</fieldset>
</div>
@break
@case(intval(\App\Enums\InputType::boolean->value))
<div class="minicrud-input col-12 col-md-6 mb-3">
<fieldset class="border p-3">
<legend>{{ $input['label'] }} *</legend>
<div class="row mb-3">
<div class="col-12">
<label class="col-form-label"
for="{{ str($input['label'])->slug() }}"><b>{{ __('crud.minicrud.visibility_label') }}</b></label>
<div class="form-check form-switch ms-2">
<input class="form-check-input ml-2" id="{{ str($input['label'])->slug() }}" name="data[{{ $k }}][value]"
type="checkbox" value="1" aria-describedby="{{ str($input['label'])->slug() }}Help"
@if (old("data.{$k}.value", old('_token') ? false : $input['value'] ?? (null ?? false))) checked @endif>
</div>
@include('modules.input-error', [
'inputName' => "data.{$k}.value",
'helperId' => str($input['label'])->slug() . 'Help',
'helper' => __('crud.minicrud.visibility_helper'),
])
</div>
</div>
</fieldset>
</div>
@break
@case(intval(\App\Enums\InputType::image->value))
<div class="minicrud-input col-12 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ $input['label'] }} *</legend>
<div class="row">
{{-- PICTURE_ALT --}}
<div class="col-12 col-md-6 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => str($input['label'])->slug() . '-alt',
'label' => __('crud.minicrud.picture_alt_label'),
'hasWordCounter' => true,
'name' => 'data[' . $k . '][alt]',
'value' => old("data.{$k}.alt", $input['alt'] ?? null),
'required' => is_bool($input['required'] ?? null) ? $input['required'] : true,
'model' => $model ?? null,
'helper' =>
__('crud.minicrud.picture_alt_helper') .
'. ' .
__('validation.min.string', [
'attribute' => __('crud.minicrud.picture_alt_label'),
'min' => 3,
]),
])
@include('modules.input-error', [
'inputName' => "data.{$k}.alt",
])
</div>
{{-- PICTURE_TITLE --}}
<div class="col-12 col-md-6 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => str($input['label'])->slug() . '-title',
'label' => __('crud.minicrud.picture_title_label'),
'hasWordCounter' => true,
'name' => 'data[' . $k . '][title]',
'value' => old("data.{$k}.title", $input['title'] ?? null),
'required' => is_bool($input['required'] ?? null) ? $input['required'] : true,
'model' => $model ?? null,
'helper' =>
__('crud.minicrud.picture_title_helper') .
'. ' .
__('validation.min.string', [
'attribute' => __('crud.minicrud.picture_title_label'),
'min' => 3,
]),
])
@include('modules.input-error', [
'inputName' => "data.{$k}.title",
])
</div>
{{-- PICTURE --}}
<div class="col-12 mb-3">
@include('bo.partials.inputs.varchar-picture', [
'id' => str($input['label'])->slug(),
'name' => "data[{$k}][value]",
'width' => $input['dimensions']['width'],
'height' => $input['dimensions']['height'],
'model' => $model ?? null,
'value' => old("data.{$k}.value", $input['value'] ?? null),
'required' => is_bool($input['required'] ?? null) ? $input['required'] : true,
'preview' => true,
])
@include('modules.input-error', [
'inputName' => "data.{$k}.value",
])
</div>
</div>
</fieldset>
</div>
@break
@case(\App\Enums\InputType::email->value)
<div class="minicrud-input col-12 col-md-6 mb-3">
<fieldset class="mb-3 border p-3">
<div class="d-flex justify-content-start align-items-center mb-2 flex-row">
<legend class="m-0 w-auto">
<label class="col-form-label" for="title{{ $k }}">
<b>{{ $input['label'] }}</b>
</label>
</legend>
@if (!empty($input['tooltip']))
<span class="ms-1" data-bs-toggle="tooltip" data-bs-html="true" title="{{ $input['tooltip'] }}">
<i class="fa fa-question-circle"></i>
</span>
@endif
</div>
<div class="row mb-3">
<div class="form-group">
<input class="form-control" id="title{{ $k }}" name="data[{{ $k }}][value]" type="email"
value="{{ old("data.{$k}.value") ?? ($input['value'] ?? '') }}" placeholder="{{ $input['label'] }}"
@if (!isset($input['required']) or $input['required']) required @endif>
@include('modules.input-error', [
'inputName' => "data.{$k}.value",
'helperId' => "{$k}StringHelp",
'helper' => $input['helper'] ?? '',
])
</div>
</div>
</fieldset>
</div>
@break
@case(intval(\App\Enums\InputType::url->value))
<div class="minicrud-input col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ $input['label'] }} *</legend>
<div class="row">
<div class="col-12 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => str($input['label'])->slug(),
'label' => $input['label'],
'hasWordCounter' => true,
'name' => 'data[' . $k . '][value]',
'value' => old("data.{$k}.value", $input['value'] ?? null),
'required' => isset($input['required']) ? !empty($input['required']) : true,
'model' => $model ?? null,
'helper' => __('validation.between.string', [
'attribute' => $input['label'],
'min' => 3,
'max' => 255,
]),
])
@include('modules.input-error', [
'inputName' => "data.{$k}.value",
])
</div>
</div>
</fieldset>
</div>
@break
@default
@php throw new Exception('Input type not handled'); @endphp
@endswitch
@endforeach

View file

@ -45,128 +45,109 @@
</div>
</div>
@if (
!$staticPageModel->type->equals(\App\Enums\StaticPageType::banner_section)
)
<div class="row">
{{-- SEO_TITLE --}}
<div class="col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.seo_title')) }}</legend>
<div class="row">
<div class="col-12 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => 'staticPagesSeoTitle',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_title')),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
'hasWordCounter' => true,
'name' => 'seo_title',
'required' => true,
'model' => $staticPageModel ?? null,
'helper' => sprintf(
'%s %s',
__('crud.helpers.seo_title'),
__('validation.between.string', [
'attribute' => __(':field :inter:model', [
'field' => __('validation.custom.seo_title'),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
'min' => 45,
'max' => 70,
])),
'placeholder' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_title')),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
])
</div>
<div class="row">
{{-- SEO_TITLE --}}
<div class="col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.seo_title')) }}</legend>
<div class="row">
<div class="col-12 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => 'staticPagesSeoTitle',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_title')),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
'hasWordCounter' => true,
'name' => 'seo_title',
'required' => true,
'model' => $staticPageModel ?? null,
'helper' => sprintf(
'%s %s',
__('crud.helpers.seo_title'),
__('validation.between.string', [
'attribute' => __(':field :inter:model', [
'field' => __('validation.custom.seo_title'),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
'min' => 45,
'max' => 70,
])),
'placeholder' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_title')),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
])
</div>
</fieldset>
</div>
{{-- SEO_DESCRIPTION --}}
<div class="col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.seo_description')) }}</legend>
<div class="row">
<div class="col-12">
@include('bo.partials.inputs.varchar-multiline', [
'id' => 'staticPagesSeoDescription',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_description')),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
'name' => 'seo_description',
'model' => $staticPageModel ?? null,
'required' => true,
'helper' => sprintf(
'%s %s',
__('crud.helpers.seo_description'),
__('validation.between.string', [
'attribute' => __(':field :inter:model', [
'field' => __('validation.custom.seo_description'),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
'min' => 50,
'max' => 160,
])),
'placeholder' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_description')),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
])
</div>
</div>
</fieldset>
</div>
</div>
</fieldset>
</div>
@endif
@if (
!$staticPageModel->type->equals(\App\Enums\StaticPageType::homepage) &&
!$staticPageModel->type->equals(\App\Enums\StaticPageType::our_products) &&
!$staticPageModel->type->equals(\App\Enums\StaticPageType::our_commitments) &&
!$staticPageModel->type->equals(\App\Enums\StaticPageType::banner_section)
)
<div class="row">
{{-- CONTENT --}}
<div class="col-12 mb-3">
<fieldset class="border p-3">
<legend>{{ Str::ucfirst(__('validation.attributes.content')) }}</legend>
<div class="row mb-3">
<div class="col-12">
@include('bo.partials.inputs.text-html', [
'id' => 'articleContent',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.attributes.content')),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
'name' => 'content',
'model' => $staticPageModel ?? null,
'required' => true,
'helper' => __('validation.custom.text_proofread'),
])
</div>
{{-- SEO_DESCRIPTION --}}
<div class="col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.seo_description')) }}</legend>
<div class="row">
<div class="col-12">
@include('bo.partials.inputs.varchar-multiline', [
'id' => 'staticPagesSeoDescription',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_description')),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
'name' => 'seo_description',
'model' => $staticPageModel ?? null,
'required' => true,
'helper' => sprintf(
'%s %s',
__('crud.helpers.seo_description'),
__('validation.between.string', [
'attribute' => __(':field :inter:model', [
'field' => __('validation.custom.seo_description'),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
'min' => 50,
'max' => 160,
])),
'placeholder' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_description')),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
])
</div>
</fieldset>
</div>
</div>
</fieldset>
</div>
@endif
</div>
<div class="row">
{{-- DATA --}}
@include('bo.modules.minicrud-form-inputs', [
'data' => json_decode(json_encode($staticPageModel->data), true),
'model' => $staticPageModel,
])
{{-- CONTENT --}}
<div class="col-12 mb-3">
<fieldset class="border p-3">
<legend>{{ Str::ucfirst(__('validation.attributes.content')) }}</legend>
<div class="row mb-3">
<div class="col-12">
@include('bo.partials.inputs.text-html', [
'id' => 'articleContent',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.attributes.content')),
'inter' => __('validation.custom.of_the.female'),
'model' => trans_choice('models.classes.static_page', 1),
]),
'name' => 'content',
'model' => $staticPageModel ?? null,
'required' => true,
'helper' => __('validation.custom.text_proofread'),
])
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">

View file

@ -3,34 +3,27 @@
<div class="bckg-red reassurances position-relative py-4">
<div class="d-md-flex align-items-center container">
<div class="offset-lg-2 text-uppercase flex-shrink-0">
<p class="font-amatic font-amatic-45">
{{ $bannerSection[0]->data['banner_title_1']['value'] }}
<span class="d-block">
{{ $bannerSection[0]->data['banner_title_2']['value'] }}
</span>
<span class="d-block">
{{ $bannerSection[0]->data['banner_title_3']['value'] }}
</span>
</p>
<p class="font-amatic font-amatic-45">{{ __('Choisir') }}<span class="d-block">{{ __('les volailles') }}</span><span
class="d-block">{{ __('Lionor, c\'est...') }}</span></p>
</div>
<div class="d-md-flex flex-grow-1 text-center">
<div class="col reassurance-item mx-4">
<img class="img-fluid" src="{{ Vite::asset('resources/assets/images/Check.svg') }}"
alt="Une case cochée surmontée d'une crète de poulet">
<p class="font-amatic font-amatic-40">{{ $bannerSection[0]->data['banner_item_title_1']['value'] }}</p>
<p>{{ $bannerSection[0]->data['banner_item_text_1']['value'] }}</p>
<p class="font-amatic font-amatic-40">{{ __('Soutenir') }}</p>
<p>{{ __('L\'emploi local et les éleveurs régionaux') }}</p>
</div>
<div class="col reassurance-item mx-4">
<img class="img-fluid" src="{{ Vite::asset('resources/assets/images/Check.svg') }}"
alt="Une case cochée surmontée d'une crète de poulet">
<p class="font-amatic font-amatic-40">{{ $bannerSection[0]->data['banner_item_title_2']['value'] }}</p>
<p>{{ $bannerSection[0]->data['banner_item_text_2']['value'] }}</p>
<p class="font-amatic font-amatic-40">{{ __('Choisir la fraîcheur') }}</p>
<p>{{ __('Et consommer des produits de proximité') }}</p>
</div>
<div class="col reassurance-item mx-4">
<img class="img-fluid" src="{{ Vite::asset('resources/assets/images/Check.svg') }}"
alt="Une case cochée surmontée d'une crète de poulet">
<p class="font-amatic font-amatic-40">{{ $bannerSection[0]->data['banner_item_title_3']['value'] }}</p>
<p>{{ $bannerSection[0]->data['banner_item_text_3']['value'] }}</p>
<p class="font-amatic font-amatic-40">{{ __('Goûter la qualité') }}</p>
<p>{{ __('D\'un bout à l\'autre de la filière') }}</p>
</div>
</div>
</div>

View file

@ -34,25 +34,29 @@
<div class="about mt-4 text-center">
<div class="row about-one position-relative mb-5">
<div class="col-lg-8 offset-lg-2 bckg-red opacity position-relative p-5">
<h2 class="fw-bold text-uppercase">{{ $staticPageModel->data['commitment_title_1']['value'] }}</h2>
<h3 class="text-uppercase">{{ $staticPageModel->data['commitment_subtitle_1']['value'] }}</h3>
<p>{!! clean($staticPageModel->data['commitment_text_1']['value']) !!}</p>
<h2 class="fw-bold text-uppercase">{{ __('Des produits de qualité bons et accessibles') }}</h2>
<h3 class="text-uppercase">{{ __('Garantis Poulet 100% Hauts-De-France') }}</h3>
<p>{{ __('Avec notre label Poulet 100% LOCAL, certifié et contrôlé par un cahier des charges précis, nous garantissons l\'origine de nos produits issus de poulets nés, élevés et préparés en région des Hauts de France.') }}
</p>
</div>
</div>
<div class="row about-two position-relative mb-5">
<div class="col-lg-8 offset-lg-2 bckg-yellow opacity position-relative pe-5 ps-5 pt-5">
<h2 class="fw-bold text-uppercase">{{ $staticPageModel->data['commitment_title_2']['value'] }}</h2>
<h3 class="text-uppercase">{{ $staticPageModel->data['commitment_subtitle_2']['value'] }}</h3>
<p>{!! $staticPageModel->data['commitment_text_2']['value'] !!}</p>
<h2 class="fw-bold text-uppercase">{{ __('Une filière soucieuse de la santé') }}</h2>
<h3 class="text-uppercase">{{ __('Des hommes, des animaux et de la terre') }}</h3>
<p>{{ __('LIONOR, c\'est une filière qui s\'engage pour élever des volailles dans le respect du vivant et qui favorise l\'économie locale. Fiers de nos 70 éleveurs et de nos 235 salariés, unis par la passion de leur métier, nous participons activement à la vie sociale et économique de notre région.') }}
</p>
</div>
</div>
<div class="row about-three position-relative mb-5">
<div class="col-lg-8 offset-lg-2 bckg-red opacity position-relative pe-5 ps-5 pt-5">
<h2 class="fw-bold text-uppercase">{{ $staticPageModel->data['commitment_title_3']['value'] }}</h2>
<h3 class="text-uppercase">{{ $staticPageModel->data['commitment_subtitle_3']['value'] }}</h3>
<p>{!! clean($staticPageModel->data['commitment_text_3']['value']) !!}</p>
<h2 class="fw-bold text-uppercase">{{ __('Des femmes et des hommes') }}</h2>
<h3 class="text-uppercase">{{ __('Qui maîtrisent la filière du grain à l\'assiette') }}</h3>
<p>{{ __('Grâce à la maitrise totale de notre filière, allant de l\'alimentation aux produits régionaux de qualité, en passant pas nos élevages se situant dans un rayon de 50kms autour de notre entreprise, nous garantissons aux consommateurs finaux, une qualité et une traçabilité irréprochables.
Notre crédo : "élever bien pour manger sain en région des Hauts de France."') }}
</p>
</div>
</div>
</div>
@ -60,6 +64,6 @@
</div>
<!-- LOCAL BLOCK -->
<x-local-block-component />
@include('fo.partials.local-block')
@endsection

View file

@ -10,43 +10,32 @@
<div class="hero-left bckg-yellow col-md-6 position-relative text-uppercase">
<img class="img-fluid" src="{{ Vite::asset('resources/assets/images/Eleveur.jpg') }}" alt="Un éleveur posant avec un poulet">
<section class="hero-content bckg-yellow opacity hero_content hero_left bottom-0 end-0 start-0">
<h2>{{ $staticPageModel->data['left_title']['value'] }}</h2>
<h3>{{ $staticPageModel->data['left_subtitle']['value'] }}</h3>
<a
class="btn btn-light mb-5 mt-2"
href="{{ route('engagments') }}"
title="{!! clean($staticPageModel->data['left_button_text']['value']) !!}"
>
{!! clean($staticPageModel->data['left_button_text']['value']) !!}
</a>
<h2>{{ __('Des produits bien élevés qui ont le goût de la qualité') }}</h2>
<h3>{{ __('Garantis Poulet 100% local') }}</h3>
<a class="btn btn-light mb-5 mt-2" href="{{ route('engagments') }}" title="Nous découvrir">{{ __('Nous Découvrir >') }}</a>
</section>
</div>
<div class="hero-right bckg-red col-md-6 position-relative text-uppercase">
<img class="img-fluid" src="{{ Vite::asset('resources/assets/images/Brochette.jpg') }}"
alt="Une assiette de brochette de volaille prise en gros plan">
<section class="hero-content bckg-red opacity hero_content hero_right bottom-0 end-0 start-0">
<h2>{{ $staticPageModel->data['right_title']['value'] }}</h2>
<h3>{{ $staticPageModel->data['right_subtitle']['value'] }}</h3>
<a
class="btn btn-light mb-5 mt-2"
href="{{ route('recipes.index') }}"
title="{!! clean($staticPageModel->data['right_button_text']['value']) !!}"
>
{!! clean($staticPageModel->data['right_button_text']['value']) !!}
</a>
<h2>{{ __('Des produits de qualité bons et accessibles') }}</h2>
<h3>{{ __('Pour manger sain et régional') }}</h3>
<a class="btn btn-light mb-5 mt-2" href="{{ route('recipes.index') }}"
title="Voir nos recettes">{{ __('Voir nos recettes >') }}</a>
</section>
</div>
</div>
<!-- LOCAL BLOCK -->
<x-local-block-component />
@include('fo.partials.local-block')
<!-- GAMMES -->
<div class="container-fluid pt-5 text-center">
<div class="row">
<section class="col-md-8 offset-md-2 stripes">
<h2 class="text-uppercase font-amatic font-amatic-48">
{{ $staticPageModel->data['product_title']['value'] }}
<span class="font-amatic-red">{{ $staticPageModel->data['product_subtitle']['value'] }}</span>
</h2>
<h2 class="text-uppercase font-amatic font-amatic-48">{{ __('Découvrez nos volailles bien élevées') }}<span
class="font-amatic-red">{{ __('qui ont le goût de la qualité') }}</span></h2>
</section>
</div>
<div class="row mt-4 overflow-hidden">

View file

@ -118,6 +118,6 @@
</div>
<!-- LOCAL BLOCK -->
<x-local-block-component />
@include('fo.partials.local-block')
@endsection

View file

@ -30,10 +30,8 @@
<div class="position-relative container pt-5">
<div class="row">
<section class="col-md-8 offset-md-2 stripes">
<h1 class="text-uppercase font-amatic font-amatic-48">
{{ $staticPageModel->data['page_title']['value'] }}
<span class="font-amatic-red">{{ $staticPageModel->data['page_title_2']['value'] }}</span>
</h1>
<h1 class="text-uppercase font-amatic font-amatic-48">{{ __('Nos volailles bien élevées') }}<span
class="font-amatic-red">{{ __('qui ont le goût de la qualité') }}</span></h1>
</section>
</div>
@ -58,16 +56,8 @@
<div class="row img-110 text-center">
<section class="col-md-5">
<img src="{{ Vite::asset('resources/assets/images/Toque.svg') }}" alt="Une illustration d'une toque de cuisinier">
<h2 class="text-uppercase font-amatic font-amatic-60">
{{ $staticPageModel->data['left_title_1']['value'] }}
<br />
{{ $staticPageModel->data['left_title_2']['value'] }}
<span class="font-amatic-red">
{{ $staticPageModel->data['left_title_3']['value'] }}
<br />
{{ $staticPageModel->data['left_title_4']['value'] }}
</span>
</h2>
<h2 class="text-uppercase font-amatic font-amatic-60">{{ __('Trouvez l\'inspiration') }}<br>{{ __('avec nos recettes') }}<span
class="font-amatic-red">{{ __('de volailles bonnes') }}<br>{{ __('et accessibles') }}</span></h2>
<a class="btn btn-primary text-uppercase mt-3" href="{{ route('recipes.index') }}"
title="{{ __('Voir toutes nos recettes') }}">{{ __('Voir les recettes >') }}</a>
</section>
@ -75,15 +65,8 @@
<section class="col-md-5">
<img src="{{ Vite::asset('resources/assets/images/Region.svg') }}" alt="Une illustration d'une tour dans un soleil">
<h2 class="text-uppercase font-amatic font-amatic-60">
{{ $staticPageModel->data['right_title_1']['value'] }}
<br />
{{ $staticPageModel->data['right_title_2']['value'] }}
<span class="font-amatic-red">
{{ $staticPageModel->data['right_title_3']['value'] }}
<br />
{{ $staticPageModel->data['right_title_4']['value'] }}
</span>
</h2>
{{ __('Découvrez les engagements') }}<br>{{ __('d\'une filière engagée') }}<span
class="font-amatic-red">{{ __('pour manger bon, sain') }}<br>{{ __('et Poulet 100% local') }}</span></h2>
<a class="btn btn-primary text-uppercase mt-3" href="{{ route('local') }}"
title="{{ __('En savoir plus sur le 100% local') }}">{{ __('En savoir plus >') }}</a>
</section>

View file

@ -5,28 +5,24 @@
<img src="{{ Vite::asset('resources/assets/images/logo-poulet-100-local-big.png') }}" alt="Logo 100% local" class="img-fluid">
</div>
<div class="flex-shrink-0 text-uppercase ms-3 me-5">
<h2 class="position-relative font-amatic">
<span class="font-amatic-50">{{ $staticPageModel->data['container_title']['value'] }}</span>
<span class="d-block font-amatic-60 font-amatic-red">{{ $staticPageModel->data['container_title_2']['value'] }}</span>
<span class="d-block font-amatic-50 font-amatic-red">{{ $staticPageModel->data['container_title_3']['value'] }}</span>
</h2>
<h2 class="position-relative font-amatic"><span class="font-amatic-50">{{ __('Chez Lionor le') }}</span><span class="d-block font-amatic-60 font-amatic-red">{{ __('Poulet 100% local') }}</span><span class="d-block font-amatic-50 font-amatic-red">{{ __('C\'est...') }}</span></h2>
</div>
<div class="d-lg-flex flex-grow-1 text-center">
<div class="local-item mx-2 mb-sm-5 position-relative">
<img src="{{ Vite::asset('resources/assets/images/Couvoir.svg') }}" alt="Une illustration d'un poussin sorant de sa coquille" class="img-fluid">
<p class="mt-3">{{ $staticPageModel->data['container_item_1']['value'] }}</p>
<p class="mt-3">{{ __('Des Volailles nées, élevées et préparées en Hauts-de-France.') }}</p>
</div>
<div class="local-item mx-2 mb-sm-5 position-relative">
<img src="{{ Vite::asset('resources/assets/images/Poulailler.svg') }}" alt="Une illustration d'une tour dans un soleil" class="img-fluid">
<p class="mt-3">{{ $staticPageModel->data['container_item_2']['value'] }}</p>
<p class="mt-3">{{ __('Des éleveurs animés par le développement de leur région.') }}</p>
</div>
<div class="local-item mx-2 mb-sm-5 position-relative">
<img src="{{ Vite::asset('resources/assets/images/Smile.svg') }}" alt="Une illustration d'une assiette souriant" class="img-fluid">
<p class="mt-3">{{ $staticPageModel->data['container_item_3']['value'] }}</p>
<p class="mt-3">{{ __('Des volailles bien élevées qui assurent des produits bons et accessibles.') }}</p>
</div>
<div class="local-item mx-2 mb-sm-5 position-relative">
<img src="{{ Vite::asset('resources/assets/images/Transport.svg') }}" alt="Une illustration d'une main portant un poulet" class="img-fluid">
<p class="mt-3">{{ $staticPageModel->data['container_item_4']['value'] }}</p>
<p class="mt-3">{{ __('Une filière soucieuse de la santé des hommes, des animaux et de la terre.') }}</p>
</div>
</div>
</div>

View file

@ -64,6 +64,6 @@ Route::prefix('bo')->name('bo.')->middleware(['admin-secure', 'throttle:credenti
])->parameters(['pages' => 'static_page'])
->only(['index', 'edit', 'update'])
->withoutMiddleware('htmlsanitize')
->middleware('htmlsanitize:content,data');
->middleware('htmlsanitize:content');
});
});

View file

@ -1,20 +1,21 @@
<?php
use App\Http\Controllers\Fo\CommitmentController;
use App\Http\Controllers\Fo\StaticPageController;
use App\Http\Controllers\Fo\ShopController;
use App\Http\Controllers\Fo\ContactController;
use App\Http\Controllers\Fo\HomeController;
use App\Http\Controllers\Fo\ProductsController;
use App\Http\Controllers\Fo\RecipesController;
use App\Http\Controllers\Fo\ShopController;
use App\Http\Controllers\Fo\StaticPageController;
use Illuminate\Support\Facades\Route;
Route::namespace('\App\Http\Controllers\Fo')->middleware(['throttle:credentials'])->group(function () {
Route::get('/', [HomeController::class, 'index'])->name('home');
Route::get('/nos-engagements', [CommitmentController::class, 'index'])->name('engagments');
Route::prefix('/nos-engagements')
->group(function () {
Route::view('/', 'fo.pages.engagments')->name('engagments');
});
Route::view('/100-pour-100-local', 'fo.pages.local')->name('local');
Route::get('/recettes', [RecipesController::class, 'index'])->name('recipes.index');