Compare commits

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

83 commits

Author SHA1 Message Date
Jeremy Munsch
f7f93bb47b
Merge branch 'trunk' 2026-10-26 12:46:50 +01:00
Jeremy Munsch
db840f94a9
Merge branch 'develop' into trunk 2026-10-26 12:46:45 +01:00
Jeremy Munsch
b058a1a8e2
build: fix manifest user to 82 2026-10-26 12:46:39 +01:00
Noah Lancien
60d9bda89f Merge branch 'trunk' 2026-10-22 17:56:23 +02:00
Noah Lancien
99d2df7711 Merge branch 'develop' into trunk 2026-10-22 17:56:00 +02:00
Noix
d3e4075dc7 Merge branch 'issue-61' into 'develop'
chore: ⬆️ bump php to 8.5 #61

See merge request ldc-web/projets/lionor!56
2026-10-22 15:54:08 +00:00
Alexis Gousseau
9081187949
fix: 🚨 resolve phpstan errors 2026-10-22 17:37:44 +02:00
Alexis Gousseau
2dc3dd08aa
chore: ⬆️ bump php to 8.5 #61 2026-10-22 17:37:28 +02:00
K Muller
af077eb74a Merge branch 'trunk' 2026-07-15 10:08:57 +02:00
K Muller
7f71e3550d Merge branch 'develop' into trunk 2026-07-09 10:05:01 +02:00
Karl M'muller
2bc0d1b30d Merge branch 'fix-local' into 'develop'
fix: 🐛 local page was not a static page

See merge request ldc-web/projets/lionor!55
2026-07-09 08:04:38 +00:00
K Muller
a7fa202f4c fix: 🐛 local page was not a static page 2026-07-09 09:57:52 +02:00
K Muller
9cd61a1c6e Merge branch 'trunk' 2026-07-08 09:34:19 +02:00
K Muller
b061599ab1 Merge branch 'develop' into trunk 2026-06-18 15:22:30 +02:00
karl.muller
0a94df329a Merge branch 'fix-docker-multistage' into 'develop'
fix: 🐛 add multi stage for php 8.3

See merge request ldc-web/projets/lionor!54
2026-06-18 13:21:56 +00:00
K Muller
2f99b0f5fa fix: 🐛 add multi stage for php 8.3 2026-06-18 15:10:51 +02:00
K Muller
04910c331e Merge branch 'develop' into trunk 2026-06-18 11:29:01 +02:00
karl.muller
d6b77b6a50 Merge branch '56-admin-content' into 'develop'
feat: ✨ add global text administration

See merge request ldc-web/projets/lionor!53
2026-06-18 09:27:39 +00:00
Corentin Huet
1152dcb995 feat: ✨ add global text administration 2026-06-11 17:04:36 +02:00
Vincent BRIDIER
608ede77e2 Merge branch 'trunk' 2026-02-09 11:45:03 +01:00
Vincent BRIDIER
7875d41a7b Merge branch 'develop' into trunk 2026-02-09 11:44:54 +01:00
Noah Lancien
0c03ee97e7 Merge branch 'develop' into trunk 2026-02-05 11:36:02 +01:00
Noah Lancien
c3dd439ea0 Merge branch 'develop' into trunk 2026-01-27 10:20:55 +01:00
Noah Lancien
6ac4d8b7df Merge branch 'develop' into trunk 2026-01-15 09:47:48 +01:00
Noah Lancien
8df51ef55d Merge branch 'trunk' 2026-01-12 15:01:38 +01:00
Noah Lancien
12fb5dfd12 Merge branch 'develop' into trunk 2026-01-12 14:53:19 +01:00
Noah Lancien
ee1a56e232 Merge branch 'develop' into trunk 2026-01-09 09:25:34 +01:00
Noah Lancien
2e3d03e53b Merge branch 'trunk' 2025-11-20 10:22:09 +01:00
Noah Lancien
3fc041d9a8 Merge branch 'develop' into trunk 2025-11-12 17:11:19 +01:00
Noah Lancien
c1713e38a2 Merge branch 'develop' into trunk 2025-11-12 16:54:10 +01:00
Noah Lancien
7a14c0542f Merge branch 'develop' into trunk 2025-11-12 16:44:07 +01:00
Noah Lancien
6dbedc0af9 Merge branch 'trunk' 2025-04-16 09:33:30 +02:00
Noah Lancien
c33ad114f0 Merge branch 'develop' into trunk 2025-04-16 09:18:51 +02:00
Noah Lancien
6f02efb2d9 Merge branch 'trunk' 2025-03-17 14:38:01 +01:00
Noah Lancien
c836b36751 Merge branch 'develop' into trunk 2025-03-17 12:21:54 +01:00
Noah Lancien
2dc7a1ee86 Merge branch 'develop' into trunk 2025-03-17 11:31:18 +01:00
Noah Lancien
c1f966bdd4 Merge branch 'trunk' 2025-03-11 12:51:13 +01:00
Noah Lancien
9fcf5f8c08 Merge branch 'develop' into trunk 2025-03-11 12:35:39 +01:00
Noah Lancien
eeff942229 Merge branch 'trunk' 2025-01-14 15:30:39 +01:00
Noah Lancien
db54ff36f9 Merge branch 'develop' into trunk 2025-01-14 15:30:29 +01:00
Noah Lancien
fba3a18795 Merge branch 'trunk' 2025-01-14 15:21:23 +01:00
Noah Lancien
14d536f58d Merge branch 'develop' into trunk 2025-01-14 15:21:09 +01:00
Noah Lancien
b234ecefab Merge branch 'trunk' 2024-09-06 11:58:41 +02:00
Noah Lancien
dfa574c548 Merge branch 'develop' into trunk 2024-09-06 11:46:38 +02:00
Noah Lancien
08480aed92 Merge branch 'develop' into trunk 2024-09-06 10:55:43 +02:00
Vincent BRIDIER
55e5871096
Merge branch 'trunk' 2024-07-19 09:27:58 +02:00
Vincent BRIDIER
d75d51af8c
Merge branch 'develop' into trunk 2024-07-19 09:27:28 +02:00
Vincent BRIDIER
0943b300d1
Merge branch 'develop' into trunk 2024-07-19 08:40:17 +02:00
Vincent BRIDIER
bfcffbb223
Merge branch 'develop' into trunk 2024-07-18 10:05:34 +02:00
Thibault Raquet
6128e763eb Merge branch 'trunk' into 'master'
Trunk

See merge request ldc-web/projets/lionor!38
2024-07-10 07:55:05 +00:00
Thibault Raquet
4de27ac36c Merge branch 'develop' into 'trunk'
Update manifest.yaml

See merge request ldc-web/projets/lionor!37
2024-07-10 07:53:18 +00:00
Thibault Raquet
f1c1f185e3 Merge branch 'trunk' into 'master'
Trunk

See merge request ldc-web/projets/lionor!36
2024-07-09 13:43:15 +00:00
Thibault Raquet
0878350923 Merge branch 'develop' into 'trunk'
Update manifest.yaml

See merge request ldc-web/projets/lionor!35
2024-07-09 13:42:38 +00:00
Vincent BRIDIER
1716fb8adf Merge branch 'trunk' into 'master'
Trunk

See merge request ldc-web/projets/lionor!34
2024-07-05 13:15:02 +00:00
Louis Rossignol
80c5b7d916 Merge branch 'develop' into 'trunk'
Préparation migration

See merge request ldc-web/projets/lionor!33
2024-07-01 08:02:56 +00:00
Vincent BRIDIER
e580f7f56f
Merge branch 'develop' into trunk 2024-06-24 14:03:11 +02:00
Vincent BRIDIER
eafaffe116
Merge branch 'develop' into trunk 2024-06-21 10:21:28 +02:00
Vincent BRIDIER
ff44ac613b
Merge branch 'develop' into trunk 2024-06-21 08:55:21 +02:00
Vincent BRIDIER
1c67975317 Merge branch 'develop' into trunk 2024-06-20 17:48:05 +02:00
Vincent BRIDIER
0a7809ed7f Merge branch 'trunk' 2024-05-30 11:14:51 +02:00
Vincent BRIDIER
a1424d0348 Merge branch 'develop' into trunk 2024-05-30 11:14:28 +02:00
Vincent BRIDIER
d495c928c8
Merge branch 'trunk' 2024-05-27 15:42:15 +02:00
Vincent BRIDIER
d4c9c96173
Merge branch 'develop' into trunk 2024-05-27 15:10:08 +02:00
Vincent BRIDIER
59b3db0ae1
Merge branch 'trunk' 2023-11-08 11:22:43 +01:00
Vincent BRIDIER
ac7335c312
Merge branch 'develop' into trunk 2023-11-08 11:22:26 +01:00
Vincent BRIDIER
9177972a4c Merge branch 'trunk' 2023-11-03 09:47:39 +01:00
Vincent BRIDIER
dec24e1342 Merge branch 'develop' into trunk 2023-11-03 09:47:25 +01:00
Vincent BRIDIER
949c80e6d3
Merge branch 'trunk' 2023-11-02 14:49:21 +01:00
Vincent BRIDIER
a37537b48b
Merge branch 'develop' into trunk 2023-11-02 14:49:03 +01:00
Vincent BRIDIER
d1ff745707
Merge branch 'trunk' 2023-11-02 12:41:31 +01:00
Vincent BRIDIER
52f144d96e
Merge branch 'develop' into trunk 2023-11-02 12:41:10 +01:00
Jérémy Munsch
689fe2b23d
Merge branch 'trunk' 2023-10-31 15:14:50 +01:00
Jérémy Munsch
ecb359a73a
Merge branch 'develop' into trunk 2023-10-25 12:22:41 +02:00
Jérémy Munsch
bef0cc1cc7
Merge branch 'develop' into trunk 2023-10-25 09:36:47 +02:00
Jérémy Munsch
2c94a47891
Merge branch 'develop' into trunk 2023-10-24 13:41:23 +02:00
Jérémy Munsch
60deae8b64
Merge branch 'develop' into trunk 2023-10-23 12:47:04 +02:00
Vincent BRIDIER
80294115f6
Merge branch 'develop' into trunk 2023-10-11 12:13:13 +02:00
Vincent BRIDIER
77780724cc
Merge branch 'develop' into trunk 2023-09-25 15:04:21 +02:00
Vincent BRIDIER
e78738ead9 Merge branch 'develop' into trunk 2023-09-07 15:19:02 +02:00
Vincent BRIDIER
bed321e492
Merge branch 'develop' into trunk 2023-09-05 17:17:12 +02:00
Vincent BRIDIER
57638149d3
Merge branch 'develop' into trunk 2023-09-05 17:04:18 +02:00
Vincent BRIDIER
879197c215
Merge branch 'develop' into trunk 2023-08-28 11:01:36 +02:00
Vincent BRIDIER
6bf8bd2c31
Merge branch 'develop' into trunk 2023-06-23 17:05:23 +02:00
47 changed files with 3157 additions and 1943 deletions

View file

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

View file

@ -1,5 +1,45 @@
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
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/
USER root
RUN chmod -R 755 /app/srcs/storage
USER www-data
USER ${USER}

View file

@ -10,6 +10,10 @@ 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.
@ -19,5 +23,9 @@ 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,7 +74,20 @@ class StaticPageController extends Controller
public function update(UpdateStaticPageRequest $request, StaticPage $static_page): \Illuminate\Http\RedirectResponse
{
return DB::transaction(function () use ($request, $static_page) {
$static_page->fill($request->validated());
$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
));
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

@ -0,0 +1,22 @@
<?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,9 +2,11 @@
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
{
@ -15,6 +17,8 @@ class HomeController extends Controller
*/
public function index()
{
$staticPageModel = StaticPage::query()->where('type', StaticPageType::homepage)->first();
// Gammes.
$ranges = Range::query()->where('status', true)
->get();
@ -26,6 +30,6 @@ class HomeController extends Controller
->take(3)
->get();
return view('fo.pages.home', compact('ranges', 'publishedRecipes'));
return view('fo.pages.home', compact('staticPageModel', 'ranges', 'publishedRecipes'));
}
}

View file

@ -2,9 +2,11 @@
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
@ -16,11 +18,13 @@ 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('ranges'));
return view('fo.pages.products.index', compact('staticPageModel', 'ranges'));
}
/**

View file

@ -2,6 +2,7 @@
namespace App\Http\Requests\Bo\StaticPages;
use App\Enums\StaticPageType;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Str;
@ -25,7 +26,7 @@ class UpdateStaticPageRequest extends FormRequest
public function prepareForValidation(): void
{
$this->merge([
'content' => Str::of($this->post('content'))->value()
'content' => $this->input('content') ? Str::of($this->input('content'))->value() : null
]);
}
@ -36,11 +37,39 @@ class UpdateStaticPageRequest extends FormRequest
*/
public function rules(): array
{
return [
'seo_title' => 'required|min:45|max:70',
'seo_description' => 'required|min:50|max:160',
$rules = [
'seo_title' => 'nullable',
'seo_description' => 'nullable',
'title' => 'required|min:3|max:255',
'content' => 'present',
'content' => 'nullable',
'data' => 'present|array',
'data.*' => 'required|array',
];
/** @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,24 +5,27 @@ 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-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 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.
*/
class StaticPage extends Model
{
use ActivityLog;
use HasFactory;
use MiniCrudModel;
/**
* The attributes that are mass assignable.
@ -34,6 +37,7 @@ class StaticPage extends Model
'seo_description',
'title',
'content',
'data'
];
/**
@ -43,6 +47,7 @@ class StaticPage extends Model
*/
protected $casts = [
'type' => StaticPageType::class,
'data' => 'object',
];
/**

View file

@ -2,14 +2,16 @@
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
{
@ -74,6 +76,11 @@ 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,18 +11,20 @@ trait MiniCrudModel
/**
* Fill the model with an array of attributes.
*
* @param array $attributes
* @return void
* @param array<string, mixed> $attributes
* @return $this
* @throws \Illuminate\Database\Eloquent\MassAssignmentException If fill prop is not allowed.
* @phpcs:disable Squiz.Commenting.FunctionComment.EmptyThrows
*/
public function fill(array $attributes)
public function fill(array $attributes): static
{
// phpcs:enable
parent::fill($attributes);
if (isset($attributes['data'])) {
$this->setData($attributes['data']);
}
return $this;
}
/**
@ -62,7 +64,6 @@ trait MiniCrudModel
*/
public function minicrudUpdated()
{
/** @var array */
foreach ($this->data as $index => $input) {
switch ($input['inputType']) {
case InputType::text->value:
@ -177,4 +178,21 @@ 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

@ -0,0 +1,33 @@
<?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.3",
"24slides/laravel-saml2": "^2.4",
"php": "^8.5",
"scaler-tech/laravel-saml2": "^2.5",
"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/admin-secure-laravel": "^5.0",
"uwil/laravel-admin-secure": "^6.0",
"uwil/k8s-laravel": "^1.4",
"uwil/sitemap-generator": "^3.0"
},

3531
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,29 @@
<?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

@ -0,0 +1,154 @@
<?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

@ -0,0 +1,119 @@
<?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

@ -0,0 +1,162 @@
<?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

@ -0,0 +1,110 @@
<?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: 33
runAsGroup: 33
fsGroup: 33
runAsUser: 82
runAsGroup: 82
fsGroup: 82
fsGroupChangePolicy: "OnRootMismatch"
volumes:
- name: storage
@ -171,8 +171,8 @@ spec:
persistentVolumeClaim:
claimName: ${CI_PROJECT_PATH_SLUG}-pvc-storage
securityContext:
runAsUser: 33
runAsGroup: 33
fsGroup: 33
runAsUser: 82
runAsGroup: 82
fsGroup: 82
fsGroupChangePolicy: "OnRootMismatch"
restartPolicy: OnFailure

95
package-lock.json generated
View file

@ -1,5 +1,5 @@
{
"name": "lionor",
"name": "srcs",
"lockfileVersion": 3,
"requires": true,
"packages": {
@ -31,6 +31,7 @@
"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",
@ -2601,8 +2602,7 @@
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.3.tgz",
"integrity": "sha512-ZYFzrvyWUNhaPomn80dsMNgMeXxNWZBdkuG/hWlUvXvbdUH8ZERNBGXnU87McuGcWDsyzX2aChCv/SVN348k3A==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/@types/node": {
"version": "22.14.1",
@ -2617,8 +2617,7 @@
"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,
"peer": true
"dev": true
},
"node_modules/@types/semver": {
"version": "7.5.3",
@ -3304,7 +3303,6 @@
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==",
"dev": true,
"peer": true,
"engines": {
"node": ">=0.10.0"
}
@ -3498,8 +3496,6 @@
"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"
}
@ -3509,8 +3505,6 @@
"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",
@ -3795,7 +3789,6 @@
"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"
}
@ -3805,7 +3798,6 @@
"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"
@ -3822,7 +3814,6 @@
"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"
}
@ -3893,7 +3884,6 @@
"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"
}
@ -4598,7 +4588,6 @@
"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"
}
@ -4635,7 +4624,6 @@
"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"
},
@ -4648,7 +4636,6 @@
"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"
},
@ -4660,8 +4647,7 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/html-tags": {
"version": "3.3.1",
@ -4737,8 +4723,6 @@
"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"
}
@ -4770,8 +4754,7 @@
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/is-binary-path": {
"version": "2.1.0",
@ -4851,7 +4834,6 @@
"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"
}
@ -4912,8 +4894,7 @@
"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,
"peer": true
"dev": true
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
@ -4965,7 +4946,6 @@
"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"
}
@ -5015,8 +4995,7 @@
"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,
"peer": true
"dev": true
},
"node_modules/loader-utils": {
"version": "2.0.4",
@ -5104,7 +5083,6 @@
"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"
},
@ -5135,8 +5113,6 @@
"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",
@ -5163,8 +5139,6 @@
"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"
},
@ -5220,7 +5194,6 @@
"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"
}
@ -5242,7 +5215,6 @@
"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",
@ -5299,7 +5271,6 @@
"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",
@ -5315,7 +5286,6 @@
"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"
},
@ -5328,7 +5298,6 @@
"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"
},
@ -5343,8 +5312,7 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/normalize-path": {
"version": "3.0.0",
@ -5440,8 +5408,6 @@
"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"
}
@ -5463,7 +5429,6 @@
"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",
@ -5743,8 +5708,6 @@
"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"
}
@ -5754,8 +5717,6 @@
"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",
@ -5771,8 +5732,6 @@
"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",
@ -5790,8 +5749,6 @@
"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"
@ -5805,8 +5762,6 @@
"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"
},
@ -5819,8 +5774,6 @@
"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"
},
@ -5836,8 +5789,6 @@
"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"
},
@ -5850,8 +5801,6 @@
"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"
}
@ -5860,17 +5809,13 @@
"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,
"optional": true,
"peer": true
"dev": 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",
@ -5883,8 +5828,6 @@
"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"
}
@ -5894,8 +5837,6 @@
"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"
}
@ -5917,8 +5858,6 @@
"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"
@ -6368,7 +6307,6 @@
"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"
@ -6378,15 +6316,13 @@
"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,
"peer": true
"dev": 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"
@ -6396,8 +6332,7 @@
"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,
"peer": true
"dev": true
},
"node_modules/string-width": {
"version": "4.2.3",
@ -6431,8 +6366,6 @@
"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"
},
@ -7058,8 +6991,6 @@
"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"
}
@ -7233,7 +7164,6 @@
"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"
@ -7861,7 +7791,6 @@
"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,6 +38,7 @@
"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.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,19 @@
{
"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

@ -0,0 +1,266 @@
{{-- 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,109 +45,128 @@
</div>
</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),
]),
])
@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>
</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),
]),
])
</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>
</div>
</fieldset>
</fieldset>
</div>
</div>
</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>
</div>
</fieldset>
</div>
</div>
@endif
<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>
</div>
</fieldset>
</div>
{{-- DATA --}}
@include('bo.modules.minicrud-form-inputs', [
'data' => json_decode(json_encode($staticPageModel->data), true),
'model' => $staticPageModel,
])
</div>
<div class="row">

View file

@ -5,24 +5,28 @@
<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">{{ __('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>
<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>
</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">{{ __('Des Volailles nées, élevées et préparées en Hauts-de-France.') }}</p>
<p class="mt-3">{{ $staticPageModel->data['container_item_1']['value'] }}</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">{{ __('Des éleveurs animés par le développement de leur région.') }}</p>
<p class="mt-3">{{ $staticPageModel->data['container_item_2']['value'] }}</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">{{ __('Des volailles bien élevées qui assurent des produits bons et accessibles.') }}</p>
<p class="mt-3">{{ $staticPageModel->data['container_item_3']['value'] }}</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">{{ __('Une filière soucieuse de la santé des hommes, des animaux et de la terre.') }}</p>
<p class="mt-3">{{ $staticPageModel->data['container_item_4']['value'] }}</p>
</div>
</div>
</div>

View file

@ -3,27 +3,34 @@
<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">{{ __('Choisir') }}<span class="d-block">{{ __('les volailles') }}</span><span
class="d-block">{{ __('Lionor, c\'est...') }}</span></p>
<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>
</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">{{ __('Soutenir') }}</p>
<p>{{ __('L\'emploi local et les éleveurs régionaux') }}</p>
<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>
</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">{{ __('Choisir la fraîcheur') }}</p>
<p>{{ __('Et consommer des produits de proximité') }}</p>
<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>
</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">{{ __('Goûter la qualité') }}</p>
<p>{{ __('D\'un bout à l\'autre de la filière') }}</p>
<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>
</div>
</div>
</div>

View file

@ -34,29 +34,25 @@
<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">{{ __('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>
<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>
</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">{{ __('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>
<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>
</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">{{ __('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>
<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>
</div>
</div>
</div>
@ -64,6 +60,6 @@
</div>
<!-- LOCAL BLOCK -->
@include('fo.partials.local-block')
<x-local-block-component />
@endsection

View file

@ -10,32 +10,43 @@
<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>{{ __('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>
<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>
</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>{{ __('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>
<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>
</section>
</div>
</div>
<!-- LOCAL BLOCK -->
@include('fo.partials.local-block')
<x-local-block-component />
<!-- 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">{{ __('Découvrez nos volailles bien élevées') }}<span
class="font-amatic-red">{{ __('qui ont le goût de la qualité') }}</span></h2>
<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>
</section>
</div>
<div class="row mt-4 overflow-hidden">

View file

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

View file

@ -30,8 +30,10 @@
<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">{{ __('Nos volailles bien élevées') }}<span
class="font-amatic-red">{{ __('qui ont le goût de la qualité') }}</span></h1>
<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>
</section>
</div>
@ -56,8 +58,16 @@
<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">{{ __('Trouvez l\'inspiration') }}<br>{{ __('avec nos recettes') }}<span
class="font-amatic-red">{{ __('de volailles bonnes') }}<br>{{ __('et accessibles') }}</span></h2>
<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>
<a class="btn btn-primary text-uppercase mt-3" href="{{ route('recipes.index') }}"
title="{{ __('Voir toutes nos recettes') }}">{{ __('Voir les recettes >') }}</a>
</section>
@ -65,8 +75,15 @@
<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">
{{ __('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>
{{ $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>
<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

@ -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');
->middleware('htmlsanitize:content,data');
});
});

View file

@ -1,21 +1,20 @@
<?php
use App\Http\Controllers\Fo\StaticPageController;
use App\Http\Controllers\Fo\ShopController;
use App\Http\Controllers\Fo\CommitmentController;
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::prefix('/nos-engagements')
->group(function () {
Route::view('/', 'fo.pages.engagments')->name('engagments');
});
Route::get('/nos-engagements', [CommitmentController::class, 'index'])->name('engagments');
Route::view('/100-pour-100-local', 'fo.pages.local')->name('local');
Route::get('/recettes', [RecipesController::class, 'index'])->name('recipes.index');