Compare commits
No commits in common. "addBanner" and "fix-linters" have entirely different histories.
addBanner
...
fix-linter
15
.env.example
|
|
@ -56,14 +56,6 @@ MAIL_PASSWORD=null
|
|||
MAIL_FROM_ADDRESS="hello@example.com"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
MAIL_LIST_BREEDER=
|
||||
MAIL_LIST_COMMITMENTS=
|
||||
MAIL_LIST_EXPORT=
|
||||
MAIL_LIST_FINANCE=
|
||||
MAIL_LIST_INFO=
|
||||
MAIL_LIST_PRESS=
|
||||
MAIL_LIST_RESTAURATION=
|
||||
|
||||
VITE_APP_NAME="${APP_NAME}"
|
||||
|
||||
# TELESCOPE
|
||||
|
|
@ -88,10 +80,3 @@ MEILISEARCH_KEY=
|
|||
UWIL_ADMIN_SECURE_CIDR_LIST=""
|
||||
UWIL_ADMIN_SECURE_CIDR_PROJECT_ALLOWED_LIST=""
|
||||
|
||||
# MATOMO
|
||||
MATOMO_SITE_ID=
|
||||
|
||||
# RECAPTCHA
|
||||
GOOGLE_RECAPTCHA_PUBLIC=
|
||||
GOOGLE_RECAPTCHA_PRIVATE=
|
||||
GOOGLE_RECAPTCHA_VERSION=
|
||||
|
|
@ -33,7 +33,7 @@ RUN npm config set @uwil:registry=https://lab.s-web.fr/api/v4/groups/ldc-web/-/p
|
|||
RUN npm config set -- '//lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/:_authToken' "${GITLAB_PASSWORD}"
|
||||
RUN npm ci && npm run prod
|
||||
|
||||
FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/uwil-production-8.5:${PHP_8_5_TAG}
|
||||
FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/uwil-production-8.4:170625-130159
|
||||
|
||||
ARG USER=www-data
|
||||
|
||||
|
|
|
|||
|
|
@ -49,16 +49,34 @@ enum ContactFormType: int
|
|||
{
|
||||
// phpcs:enable
|
||||
return match ($this) {
|
||||
self::breeder => config('mail.to.breeder'),
|
||||
self::restauration => config('mail.to.restauration'),
|
||||
self::export => config('mail.to.export'),
|
||||
self::finance => config('mail.to.finance'),
|
||||
self::commitments => config('mail.to.commitments'),
|
||||
self::info => config('mail.to.info'),
|
||||
self::press => config('mail.to.press'),
|
||||
self::collaborator,
|
||||
self::product,
|
||||
self::professional => null
|
||||
self::collaborator => [],
|
||||
self::breeder => [
|
||||
'marie-charlotte.garnier@ldc.fr',
|
||||
'dylan.chevalier@ldc.fr',
|
||||
],
|
||||
self::professional => null,
|
||||
self::restauration => [
|
||||
'rhd@ldc.fr',
|
||||
],
|
||||
self::export => [
|
||||
'alexis.lambert@ldc.fr',
|
||||
'bruno.lafon@ldc.fr',
|
||||
],
|
||||
self::finance => [
|
||||
'david.eluaud@ldc.fr',
|
||||
'malaury.offe@ldc.fr',
|
||||
],
|
||||
self::commitments => [
|
||||
'claire-marie.gesland@ldc.fr',
|
||||
],
|
||||
self::product => [],
|
||||
self::info => [
|
||||
'blandine.durand-gratian@ldc.fr',
|
||||
'malaury.offe@ldc.fr',
|
||||
],
|
||||
self::press => [
|
||||
'communicationgroupe@ldc.fr',
|
||||
],
|
||||
// phpcs:ignore Squiz.Commenting.InlineComment
|
||||
}; //end match
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class TranslationHelper
|
|||
->whereKeyNot($model->getKey())
|
||||
->whereRaw("JSON_SEARCH(`{$dbAttribute}`, 'one', ?) IS NOT NULL", [$value]);
|
||||
|
||||
if ($anotherDbAttribute !== null) {
|
||||
if ($anotherDbAttribute !== null && $anotherValue !== null) {
|
||||
$query->where($anotherDbAttribute, $anotherValue);
|
||||
}
|
||||
if ($query->exists()) {
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
use App\Models\Company;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class CompanyController
|
||||
{
|
||||
/**
|
||||
* Retrieve all published companies with their associated activity and sector.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function getCompanies(): \Illuminate\Http\JsonResponse
|
||||
{
|
||||
$companies = Company::query()->where('published', true)->with('companyActivity', 'companySector')->get();
|
||||
|
||||
$data = $companies->map(function ($company) {
|
||||
return array_filter([
|
||||
'name' => $company->name,
|
||||
'logo' => $company->logo,
|
||||
'informations' => $company->informations,
|
||||
'responsable' => $company->responsable,
|
||||
'employees' => $company->employees,
|
||||
'url' => $company->url,
|
||||
'latitude' => $company->latitude,
|
||||
'longitude' => $company->longitude,
|
||||
'type_activite' => Str::lower($company->companyActivity->name),
|
||||
'filiere' => $company->companySector?->name,
|
||||
], fn($value) => !is_null($value));
|
||||
});
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Back;
|
||||
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Uwil\LaravelBackend\Controllers\AuthenticatedSessionController as PackageAuthenticatedSessionController;
|
||||
|
||||
class AuthenticatedSessionController extends PackageAuthenticatedSessionController
|
||||
{
|
||||
/**
|
||||
* Destroy an authenticated session.
|
||||
*/
|
||||
public function destroy(Request $request): RedirectResponse
|
||||
{
|
||||
Auth::guard('backend')->logout();
|
||||
|
||||
$request->session()->invalidate();
|
||||
$request->session()->regenerateToken();
|
||||
|
||||
return to_route('front.dynamic-pages.accueil.fr');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@ class ContactRequest extends FormRequest
|
|||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
ToolboxHelper::validateRecaptcha($this, \config('services.google.recaptcha.version'));
|
||||
// ToolboxHelper::validateRecaptcha($this, \config('services.google.recaptcha.version'));
|
||||
|
||||
$typeContactForm = $this->input('enumType');
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,10 @@
|
|||
|
||||
namespace App\Http\Requests\Front;
|
||||
|
||||
use App\Traits\Requests\Api\HasLaravelFailedValidation;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class PostsRequest extends FormRequest
|
||||
{
|
||||
use HasLaravelFailedValidation;
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
|
|
@ -19,7 +16,7 @@ class PostsRequest extends FormRequest
|
|||
return [
|
||||
'page' => 'required|integer',
|
||||
'category' => 'required|string',
|
||||
'locale' => ['required', 'string', Rule::in(config('app.locales'))],
|
||||
'locale' => 'required|string',
|
||||
'filters' => 'nullable|array',
|
||||
'filters.order' => 'nullable|string|in:asc,desc',
|
||||
'filters.tags' => 'nullable|array',
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use App\Enums\Document\DocumentStatusEnum;
|
|||
use App\Enums\YearsEnum;
|
||||
use App\Helpers\DocumentHelper;
|
||||
use App\Helpers\TranslationHelper;
|
||||
use App\Models\Documentable;
|
||||
use App\Traits\Models\HasCache;
|
||||
use App\Traits\Models\HasTranslations;
|
||||
use App\Traits\Models\HasUwilImages;
|
||||
|
|
@ -388,7 +387,7 @@ class Document extends Model implements TranslatableModel
|
|||
'documentables',
|
||||
'document_id',
|
||||
'documentable_id'
|
||||
)->using(Documentable::class)->withTimestamps();
|
||||
)->withTimestamps();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -404,6 +403,6 @@ class Document extends Model implements TranslatableModel
|
|||
'documentables',
|
||||
'document_id',
|
||||
'documentable_id'
|
||||
)->using(Documentable::class)->withTimestamps();
|
||||
)->withTimestamps();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\MorphPivot;
|
||||
|
||||
/**
|
||||
* @property integer $id Id of the document.
|
||||
* @property \App\Models\Document $document_id Name of the document.
|
||||
* @property \App\Models\DocumentCategory|\App\Models\DocumentTag $documentable_id Name of the category or tag.
|
||||
* @property class-string<static> $documentable_type Class of the category or tag.
|
||||
* @property-read \Carbon\Carbon $created_at Created date of the document.
|
||||
* @property-read \Carbon\Carbon $updated_at Updated date of the document.
|
||||
*/
|
||||
class Documentable extends MorphPivot
|
||||
{
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
protected $table = 'documentables';
|
||||
|
||||
/**
|
||||
* Perform any actions required after the model boots.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::created(fn() => Document::resetCache());
|
||||
static::updated(fn() => Document::resetCache());
|
||||
static::deleted(fn() => Document::resetCache());
|
||||
}
|
||||
}
|
||||
|
|
@ -67,6 +67,7 @@ class News extends Model implements TranslatableModel, LocalizedUrlRoutable, Sit
|
|||
use HasFactory;
|
||||
use HasTranslations;
|
||||
use SoftDeletes;
|
||||
use HasCache;
|
||||
use HasUwilImages {
|
||||
HasUwilImages::inertiaFill as traitInertiaFill;
|
||||
}
|
||||
|
|
@ -527,7 +528,7 @@ class News extends Model implements TranslatableModel, LocalizedUrlRoutable, Sit
|
|||
'newsables',
|
||||
'news_id',
|
||||
'newsable_id'
|
||||
)->using(Newsable::class);
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -543,6 +544,6 @@ class News extends Model implements TranslatableModel, LocalizedUrlRoutable, Sit
|
|||
'newsables',
|
||||
'news_id',
|
||||
'newsable_id'
|
||||
)->using(Newsable::class)->withTimestamps();
|
||||
)->withTimestamps();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\MorphPivot;
|
||||
|
||||
/**
|
||||
* @property integer $id Id of the news.
|
||||
* @property \App\Models\News $news_id Name of the news.
|
||||
* @property \App\Models\NewsCategory|\App\Models\NewsTag $newsable_id Name of the category or tag.
|
||||
* @property class-string<static> $newsable_type Class of the category or tag.
|
||||
* @property-read \Carbon\Carbon $created_at Created date of the news.
|
||||
* @property-read \Carbon\Carbon $updated_at Updated date of the news.
|
||||
*/
|
||||
class Newsable extends MorphPivot
|
||||
{
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
protected $table = 'newsables';
|
||||
|
||||
/**
|
||||
* Perform any actions required after the model boots.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::created(fn() => News::resetCache());
|
||||
static::updated(fn() => News::resetCache());
|
||||
static::deleted(fn() => News::resetCache());
|
||||
}
|
||||
}
|
||||
|
|
@ -14,7 +14,6 @@ return Application::configure(basePath: dirname(__DIR__))
|
|||
__DIR__ . '/../routes/web-front.php',
|
||||
__DIR__ . '/../routes/web-back.php',
|
||||
],
|
||||
api: __DIR__.'/../routes/api.php',
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
"sentry/sentry-laravel": "^4.18",
|
||||
"spatie/laravel-translatable": "^6.11",
|
||||
"tightenco/ziggy": "^2.5",
|
||||
"uwil/admin-secure-laravel": "^5.1",
|
||||
"uwil/admin-secure-laravel": "^5.0",
|
||||
"uwil/k8s-laravel": "^2.0",
|
||||
"uwil/laravel-backend": "^3.0",
|
||||
"uwil/laravel-common": "^4.1",
|
||||
|
|
|
|||
14
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "d944917fa28bb94b07707f1de2bc091d",
|
||||
"content-hash": "054df53d23e7f8da15dccdd780ce20dd",
|
||||
"packages": [
|
||||
{
|
||||
"name": "24slides/laravel-saml2",
|
||||
|
|
@ -8432,22 +8432,22 @@
|
|||
},
|
||||
{
|
||||
"name": "uwil/admin-secure-laravel",
|
||||
"version": "5.1.0",
|
||||
"version": "5.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "git@lab.s-web.fr:ldc-web/projets/ldc-web-admin-secure-laravel.git",
|
||||
"reference": "0299d8397111b5a80ea3200a9fd387b94c34f208"
|
||||
"reference": "7d9c052db4318752a312dc9763bc8c31ea053aa2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://lab.s-web.fr/api/v4/projects/20/packages/composer/archives/uwil/admin-secure-laravel.zip?sha=0299d8397111b5a80ea3200a9fd387b94c34f208",
|
||||
"reference": "0299d8397111b5a80ea3200a9fd387b94c34f208",
|
||||
"url": "https://lab.s-web.fr/api/v4/projects/20/packages/composer/archives/uwil/admin-secure-laravel.zip?sha=7d9c052db4318752a312dc9763bc8c31ea053aa2",
|
||||
"reference": "7d9c052db4318752a312dc9763bc8c31ea053aa2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"dxw/cidr": "^3.2",
|
||||
"illuminate/support": "~11|~12|~13",
|
||||
"laravel/framework": "~11|~12|~13",
|
||||
"illuminate/support": "~11|~12",
|
||||
"laravel/framework": "~11|~12",
|
||||
"php": "^8.3",
|
||||
"symfony/options-resolver": "^7.0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ return [
|
|||
*
|
||||
*/
|
||||
|
||||
'default' => env('MAIL_MAILER', 'smtp'),
|
||||
'default' => env('MAIL_MAILER', 'log'),
|
||||
|
||||
/**
|
||||
*--------------------------------------------------------------------------
|
||||
|
|
@ -114,14 +114,4 @@ return [
|
|||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
],
|
||||
|
||||
'to' => [
|
||||
'breeder' => explode(',', env('MAIL_LIST_BREEDER')) ?? [],
|
||||
'commitments' => explode(',', env('MAIL_LIST_COMMITMENTS')) ?? [],
|
||||
'export' => explode(',', env('MAIL_LIST_EXPORT')) ?? [],
|
||||
'finance' => explode(',', env('MAIL_LIST_FINANCE')) ?? [],
|
||||
'info' => explode(',', env('MAIL_LIST_INFO')) ?? [],
|
||||
'press' => explode(',', env('MAIL_LIST_PRESS')) ?? [],
|
||||
'restauration' => explode(',', env('MAIL_LIST_RESTAURATION')) ?? [],
|
||||
]
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SCOUT_DRIVER', null),
|
||||
'driver' => env('SCOUT_DRIVER', 'meilisearch'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -37,14 +37,5 @@ return [
|
|||
|
||||
'google' => [
|
||||
'maps' => env('GOOGLE_MAPS_KEY'),
|
||||
'recaptcha' => [
|
||||
'public' => env('GOOGLE_RECAPTCHA_PUBLIC'),
|
||||
'private' => env('GOOGLE_RECAPTCHA_PRIVATE'),
|
||||
'version' => env('GOOGLE_RECAPTCHA_VERSION', "3") === "3" ? true : false
|
||||
]
|
||||
],
|
||||
|
||||
'matomo' => [
|
||||
'site_id' => env('MATOMO_SITE_ID')
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
<?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('news', function (Blueprint $table) {
|
||||
$table->dropColumn('vimeo_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('news', function (Blueprint $table) {
|
||||
$table->text('vimeo_id')->nullable()->comment('Vimeo id associated.')->after('content');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -23,13 +23,6 @@ data:
|
|||
MAIL_ENCRYPTION: "${APP_MAIL_ENCRYPTION}"
|
||||
MAIL_FROM_ADDRESS: "${APP_MAIL_FROM_ADDRESS}"
|
||||
MAIL_FROM_NAME: "${APP_APP_NAME}"
|
||||
MAIL_LIST_BREEDER: "${APP_MAIL_LIST_BREEDER}"
|
||||
MAIL_LIST_COMMITMENTS: "${APP_MAIL_LIST_COMMITMENTS}"
|
||||
MAIL_LIST_EXPORT: "${APP_MAIL_LIST_EXPORT}"
|
||||
MAIL_LIST_FINANCE: "${APP_MAIL_LIST_FINANCE}"
|
||||
MAIL_LIST_INFO: "${APP_MAIL_LIST_INFO}"
|
||||
MAIL_LIST_PRESS: "${APP_MAIL_LIST_PRESS}"
|
||||
MAIL_LIST_RESTAURATION: "${APP_MAIL_LIST_RESTAURATION}"
|
||||
SENTRY_LARAVEL_DSN: "${APP_SENTRY_LARAVEL_DSN}"
|
||||
TELESCOPE_ENABLED: "${APP_TELESCOPE_ENABLED}"
|
||||
CRM_ENDPOINT: "${APP_CRM_ENDPOINT}"
|
||||
|
|
@ -172,22 +165,10 @@ spec:
|
|||
port: 80
|
||||
middlewares:
|
||||
- name: redirect-no-www-to-www
|
||||
- name: redirect-ldc-rgpd-to-rgpd
|
||||
|
||||
tls:
|
||||
secretName: ${CRT_TLS_NAME}
|
||||
---
|
||||
# Redirect with domain replacement
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: redirect-ldc-rgpd-to-rgpd
|
||||
spec:
|
||||
redirectRegex:
|
||||
regex: ^https://${REDIRECT}${APP_DOMAIN}/rgpd/(professionnels|salaries|consommateurs)(/(en|de))?
|
||||
replacement: https://rgpd.ldc.fr/fr/${1}
|
||||
permanent: true
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
|
|
|
|||
45
package-lock.json
generated
|
|
@ -89,6 +89,7 @@
|
|||
"@typescript-eslint/parser": "^8.39.0",
|
||||
"@vitejs/plugin-react": "^4.7.0",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"baseline-browser-mapping": "^2.9.19",
|
||||
"concurrently": "^9.2.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
|
|
@ -6145,16 +6146,13 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/baseline-browser-mapping": {
|
||||
"version": "2.10.42",
|
||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.42.tgz",
|
||||
"integrity": "sha512-c/jurFrDLyui7o1J86yLkRu4LMsTYcBohveus7/I2Hzdn9KIP2bdJPTue/lR1KH46enoPbD77GKeSYNdyPoD3Q==",
|
||||
"version": "2.9.19",
|
||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz",
|
||||
"integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"baseline-browser-mapping": "dist/cli.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
"baseline-browser-mapping": "dist/cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
|
|
@ -6326,9 +6324,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001803",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001803.tgz",
|
||||
"integrity": "sha512-g/uHREV2ZpK9qMalCsWaxmA6ol+DX8GYhuf3T40RKoP+oL7vhRJh8LNt73PCjpnR6l14FzfPrB5Yux4PKm2meg==",
|
||||
"version": "1.0.30001755",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001755.tgz",
|
||||
"integrity": "sha512-44V+Jm6ctPj7R52Na4TLi3Zri4dWUljJd+RDm+j8LtNCc/ihLCT+X1TzoOAkRETEWqjuLnh9581Tl80FvK7jVA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -8789,6 +8787,14 @@
|
|||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/immutable": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz",
|
||||
"integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/import-fresh": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
|
||||
|
|
@ -11744,6 +11750,25 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.51.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.51.0.tgz",
|
||||
"integrity": "sha512-haGdpTgywJTvHC2b91GSq+clTKGbtkkZmVAb82jZQN/wTy6qs8DdFm2lhEQbEwrY0QDRgSQ3xDurqM977C3noA==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
"immutable": "^4.0.0",
|
||||
"source-map-js": ">=0.6.2 <2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"sass": "sass.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded": {
|
||||
"version": "1.93.3",
|
||||
"resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.93.3.tgz",
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
"@typescript-eslint/parser": "^8.39.0",
|
||||
"@vitejs/plugin-react": "^4.7.0",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"baseline-browser-mapping": "^2.9.19",
|
||||
"concurrently": "^9.2.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
|
|
|
|||
|
|
@ -18,10 +18,6 @@
|
|||
RewriteCond %{REQUEST_URI} (.+)/$
|
||||
RewriteRule ^ %1 [L,R=301]
|
||||
|
||||
# Redirect /index.php/anything to /anything
|
||||
RewriteCond %{THE_REQUEST} /index\.php/([^\s?]*) [NC]
|
||||
RewriteRule ^index\.php/(.*)$ /$1 [L,R=301,NC]
|
||||
|
||||
# Send Requests To Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
|
|
@ -130,70 +126,4 @@
|
|||
Redirect 301 "/en/the-ldc-group-creates-a-partnership-with-citeo-for-the-development-of-a-polystyrene-recycling-industry-in-france" "/en/news/the-ldc-group-creates-a-partnership-with-citeo-for-the-development-of-a-polystyrene-recycling-industry-in-france"
|
||||
Redirect 301 "/en/top-start-for-the-vendee-globe-with-maitre-coq" "/en/news/top-start-for-the-vendee-globe-with-maitre-coq"
|
||||
Redirect 301 "/search" "/recherche"
|
||||
Redirect 301 "/nous-contacter/nos-engagements" "/nous-contacter/engagements"
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
|
||||
# Images
|
||||
ExpiresByType image/jpg "access plus 1 year"
|
||||
ExpiresByType image/jpeg "access plus 1 year"
|
||||
ExpiresByType image/png "access plus 1 year"
|
||||
ExpiresByType image/gif "access plus 1 year"
|
||||
ExpiresByType image/webp "access plus 1 year"
|
||||
ExpiresByType image/svg+xml "access plus 1 year"
|
||||
|
||||
# CSS / JS
|
||||
ExpiresByType text/css "access plus 1 year"
|
||||
ExpiresByType text/javascript "access plus 1 year"
|
||||
ExpiresByType application/javascript "access plus 1 year"
|
||||
ExpiresByType application/x-javascript "access plus 1 year"
|
||||
|
||||
# WOFF / WOFF2 / Fonts
|
||||
ExpiresByType application/font-woff "access plus 1 year"
|
||||
ExpiresByType font/woff "access plus 1 year"
|
||||
ExpiresByType application/font-woff2 "access plus 1 year"
|
||||
ExpiresByType font/woff2 "access plus 1 year"
|
||||
|
||||
# Favicon
|
||||
ExpiresByType image/x-icon "access plus 1 year"
|
||||
</IfModule>
|
||||
|
||||
<FilesMatch "\.(jpe?g|png|gif|webp|css|js|woff|woff2|ico)$">
|
||||
Header set Cache-Control "public, max-age=31536000, immutable"
|
||||
</FilesMatch>
|
||||
|
||||
<IfModule mod_brotli.c>
|
||||
AddOutputFilterByType BROTLI_COMPRESS text/html text/css text/plain text/xml text/javascript application/javascript application/x-javascript
|
||||
AddType text/plain .br
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE text/html
|
||||
AddOutputFilterByType DEFLATE text/plain
|
||||
AddOutputFilterByType DEFLATE text/xml
|
||||
AddOutputFilterByType DEFLATE text/css
|
||||
AddOutputFilterByType DEFLATE text/javascript
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
AddOutputFilterByType DEFLATE application/xml
|
||||
AddOutputFilterByType DEFLATE application/xhtml+xml
|
||||
AddOutputFilterByType DEFLATE application/rss+xml
|
||||
AddOutputFilterByType DEFLATE image/svg+xml
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_mime.c>
|
||||
AddType application/javascript .js
|
||||
AddType font/woff2 .woff2
|
||||
AddType application/font-woff2 .woff2
|
||||
AddType application/font-woff .woff
|
||||
AddType font/woff .woff
|
||||
AddType image/svg+xml .svg
|
||||
</IfModule>
|
||||
|
||||
<FilesMatch "\.(css|js|jpg|jpeg|gif|png|ico|svg|woff|woff2)$">
|
||||
FileETag None
|
||||
Header unset ETag
|
||||
Header unset Set-Cookie
|
||||
</FilesMatch>
|
||||
|
|
|
|||
|
|
@ -448,6 +448,7 @@
|
|||
padding-left: 10px;
|
||||
}
|
||||
[data-menu="submenu-2951"] .mobile-menu__level {
|
||||
padding-top: 0;
|
||||
min-height: calc(100vh - 80px);
|
||||
}
|
||||
.offer-form {
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.9 KiB |
BIN
public/assets/img/logo_en.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
public/assets/img/logo_en_2026.jpg
Normal file
|
After Width: | Height: | Size: 336 KiB |
BIN
public/news/26_01_07/img/header.jpg
Normal file
|
After Width: | Height: | Size: 368 KiB |
|
Before Width: | Height: | Size: 730 KiB |
|
|
@ -1,8 +0,0 @@
|
|||
<svg width="294" height="337" viewBox="0 0 294 337" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.4228 111.776C14.6117 110.408 25.7752 110.685 28.852 111.103C37.1063 112.231 64.4775 121.512 69.5848 127.591C70.4727 128.638 72.0427 131.006 71.9117 132.281C71.2439 133.656 70.4943 135.273 69.007 135.8C64.0032 137.596 39.3983 133.232 33.1303 131.412C28.0684 129.948 0.834785 119.02 12.4179 111.762" fill="white"/>
|
||||
<path d="M2.97139 193.412C4.55436 191.287 15.073 187.284 18.0841 186.505C26.1789 184.414 54.8679 182.618 61.7042 186.336C62.8749 186.981 65.1454 188.588 65.4632 189.813C65.3042 191.356 65.1572 193.152 63.9439 194.213C59.8699 197.795 35.4282 203.133 28.956 203.822C23.7339 204.385 -5.39998 204.59 2.96651 193.398" fill="white"/>
|
||||
<path d="M75.2995 40.5103C77.803 40.9766 86.0923 48.8901 88.1699 51.3401C93.7375 57.8946 108.805 83.7796 108.956 91.9089C108.984 93.2947 108.718 96.178 107.854 97.0673C106.509 97.6501 104.936 98.3556 103.492 97.741C98.5929 95.6417 82.6162 75.3846 78.9803 69.6842C76.0412 65.0878 62.0826 38.0233 75.3044 40.5244" fill="white"/>
|
||||
<path d="M151.519 3.32306C153.617 4.87176 158.163 15.7889 159.131 18.9375C161.715 27.4087 165.61 57.8236 162.682 65.3407C162.179 66.6428 160.86 69.1607 159.724 69.5796C158.289 69.5181 156.593 69.479 155.501 68.2594C151.841 64.1709 144.975 38.5187 143.82 31.6839C142.897 26.167 140.429 -4.81499 151.519 3.32306Z" fill="white"/>
|
||||
<path d="M252.66 22.1829C253.318 24.7802 250.104 36.0545 248.91 39.068C245.694 47.1654 230.038 72.5666 223.176 76.188C221.998 76.8158 219.438 77.7851 218.31 77.3393C217.248 76.3078 215.978 75.104 215.89 73.4619C215.601 67.8917 226.072 44.0237 229.37 38.114C232.047 33.3611 249.15 8.50266 252.647 22.1881" fill="white"/>
|
||||
<path d="M87.8419 179.142C94.5684 132.863 133.992 97.2846 176.139 87.677C204.358 81.0745 234.752 88.5554 256.665 106.934C312.841 154.252 315.672 242.841 251.639 287.943L251.319 288.16C299.285 254.332 309.052 191.702 275.906 144.766C245.4 100.22 190.312 89.7794 145.72 121.366C124.838 135.187 108.355 156.232 103.18 181.721C91.9838 233.582 124.292 292.602 174.098 304.765C197.844 311.099 222.819 304.456 244.572 292.265C222.667 304.706 197.998 312.303 173.514 307.368C119.264 297.745 78.7607 237.682 87.8419 179.142ZM244.614 292.242C246.465 291.19 248.298 290.104 250.109 288.987L251.319 288.16C250.92 288.442 250.518 288.723 250.113 289.001C248.305 290.119 246.471 291.201 244.614 292.242Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
<svg width="108" height="108" viewBox="0 0 108 108" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M104.492 48.4181C100.67 60.1225 94.7398 70.9442 87.3675 79.8302C85.9257 81.5634 84.4302 83.2612 82.8803 84.8228C80.7646 87.2306 78.414 89.3922 75.9016 91.3468C59.3762 104.228 36.3246 107.963 36.3246 107.963C33.6282 107.52 26.4674 97.2729 20.5617 88.0457C17.9584 84.0773 15.4174 79.9953 13.0357 75.8182C12.2143 74.429 11.7321 73.5823 11.7072 73.5022C11.7072 73.5022 11.7118 73.4779 11.7165 73.4536C8.2699 67.162 5.23377 60.6225 2.93227 53.7217C2.81789 53.373 2.70352 53.0245 2.58914 52.6758C0.811171 46.9311 -0.135125 40.2153 0.0156226 33.5598C0.324677 19.3706 5.5941 5.38113 18.3648 1.12661C26.1608 -1.47079 34.3677 0.609583 40.7529 5.4558C43.6869 7.70355 49.819 17.326 51.2083 20.5835C53.1412 23.845 54.7225 26.8379 56.0006 29.5212C60.5848 23.9191 65.635 18.9342 71.0452 14.697C77.309 9.79469 84.3595 4.36504 91.5366 5.09145C98.0241 5.73554 102.877 10.6893 105.536 17.4075C107.259 21.7596 108.061 26.8141 107.816 31.9688C107.55 37.5467 106.221 43.0962 104.492 48.4181Z" fill="#E00A1E"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
|
@ -8,50 +8,3 @@
|
|||
|
||||
// * BASE
|
||||
@use './base/common';
|
||||
|
||||
|
||||
//////////////////// Poppins ////////////////////
|
||||
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'Poppins';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url('&/fonts/Poppins/Poppins-Regular.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'Poppins';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url('&/fonts/Poppins/Poppins-Bold.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'Poppins';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url('&/fonts/Poppins/Poppins-Light.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'Poppins';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
src: url('&/fonts/Poppins/Poppins-BoldItalic.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'Poppins';
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
src: url('&/fonts/Poppins/Poppins-Italic.ttf') format('truetype');
|
||||
}
|
||||
|
||||
.f-poppins {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,43 +13,3 @@
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
#r_captcha {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.error-recaptcha {
|
||||
color: red;
|
||||
text-align: center;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.custom-alert-danger {
|
||||
background: #ffe5e5;
|
||||
border: 1px solid #ffb3b3;
|
||||
border-left: 5px solid #dc3545;
|
||||
color: #842029;
|
||||
padding: 15px 20px;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 20px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
animation: fadeIn 0.3s ease-in-out;
|
||||
|
||||
.alert-title {
|
||||
font-weight: 700;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
li {
|
||||
margin-bottom: 5px;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
ul {
|
||||
margin: 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ import DynamicList from "@/back/Components/DynamicPages/DynamicList";
|
|||
import SimpleTextarea from "@/back/Components/Inputs/SimpleTextarea";
|
||||
import SimpleDatePicker from "@/back/Components/Inputs/SimpleDatePicker";
|
||||
import SimpleColorPicker from "@/back/Components/Inputs/SimpleColorPicker";
|
||||
import SimpleYoutubeId from "@/back/Components/Inputs/SimpleYoutubeId";
|
||||
import SimpleVimeoId from "@/back/Components/Inputs/SimpleVimeoId";
|
||||
import EnumSelect from "@/back/Components/Inputs/EnumSelect";
|
||||
import StaticRouteSelect from "@/back/Components/Inputs/StaticRouteSelect";
|
||||
import DynamicWrapperModelSelect from "@/back/Components/DynamicPages/DynamicWrapperModelSelect";
|
||||
|
|
@ -61,7 +59,8 @@ export default function DynamicInputs({
|
|||
.enumDynamicFieldTypes as DynamicFieldTypes;
|
||||
const enumElementPosition = usePage().props
|
||||
.enumElementPosition as LaravelEnum;
|
||||
const enumContactFormType = usePage().props.enumContactFormType as LaravelEnum
|
||||
const enumContactFormType = usePage().props
|
||||
.enumContactFormType as LaravelEnum;
|
||||
const videoProviderEnum = usePage().props.videoProviderEnum as LaravelEnum;
|
||||
// Translations.
|
||||
const transAssociateTo = useTrans("back.form_associate_to");
|
||||
|
|
@ -391,7 +390,7 @@ export default function DynamicInputs({
|
|||
field.validation,
|
||||
)}
|
||||
/>
|
||||
)
|
||||
);
|
||||
case enumDynamicFieldTypes.video.value:
|
||||
return (
|
||||
<VideoInput
|
||||
|
|
@ -404,7 +403,7 @@ export default function DynamicInputs({
|
|||
field.validation,
|
||||
)}
|
||||
/>
|
||||
)
|
||||
);
|
||||
default:
|
||||
return (
|
||||
<p
|
||||
|
|
|
|||
|
|
@ -165,7 +165,9 @@ export default function EnumSelect({
|
|||
)}
|
||||
>
|
||||
{selectedEnum
|
||||
? str(getEnumLabel(selectedEnum)).ucFirst().value()
|
||||
? str(getEnumLabel(selectedEnum))
|
||||
.ucFirst()
|
||||
.value()
|
||||
: placeholder}
|
||||
<ChevronsUpDownIcon className="opacity-50" />
|
||||
</Button>
|
||||
|
|
@ -221,7 +223,11 @@ export default function EnumSelect({
|
|||
handleSelect(option.value)
|
||||
}
|
||||
>
|
||||
<span>{str(option.label).ucFirst().value()}</span>
|
||||
<span>
|
||||
{str(option.label)
|
||||
.ucFirst()
|
||||
.value()}
|
||||
</span>
|
||||
{selectedEnum === option.value && (
|
||||
<CheckIcon />
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,7 @@ import { Label } from "@/components/ui/label";
|
|||
import { cn } from "@/lib/utils";
|
||||
import { usePage } from "@inertiajs/react";
|
||||
import { UploadIcon } from "lucide-react";
|
||||
import {
|
||||
ChangeEvent,
|
||||
MouseEvent,
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import React, { ChangeEvent, useEffect, useRef, useState } from "react";
|
||||
|
||||
type Props = {
|
||||
width: number | string;
|
||||
|
|
@ -18,11 +12,13 @@ type Props = {
|
|||
className?: string;
|
||||
name: string;
|
||||
label: string;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
value?: string;
|
||||
id?: string;
|
||||
required?: boolean;
|
||||
disabled?: boolean;
|
||||
parentErrors?: Record<string, string> | null;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
setData: (name: string, value: string) => void;
|
||||
};
|
||||
|
||||
|
|
@ -74,12 +70,7 @@ export default function SimpleVideoUpload(props: Props) {
|
|||
}, [source]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"flex flex-col gap-2 w-full",
|
||||
className
|
||||
)}
|
||||
>
|
||||
<div className={cn("flex flex-col gap-2 w-full", className)}>
|
||||
<Label htmlFor={name} className="font-medium">
|
||||
{label}
|
||||
{required && <span className="text-destructive ml-1">*</span>}
|
||||
|
|
@ -105,7 +96,7 @@ export default function SimpleVideoUpload(props: Props) {
|
|||
{
|
||||
"border-destructive": localErrors[name],
|
||||
"cursor-pointer": !disabled,
|
||||
}
|
||||
},
|
||||
)}
|
||||
style={{ width }}
|
||||
onClick={!disabled ? handleChoose : undefined}
|
||||
|
|
@ -116,9 +107,7 @@ export default function SimpleVideoUpload(props: Props) {
|
|||
<p className="text-center break-normal w-full mt-2">
|
||||
Cliquer pour sélectionner une vidéo
|
||||
</p>
|
||||
<small>
|
||||
Format accepté : .mp4, .mov
|
||||
</small>
|
||||
<small>Format accepté : .mp4, .mov</small>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-col gap-3 w-full items-center">
|
||||
|
|
@ -146,9 +135,7 @@ export default function SimpleVideoUpload(props: Props) {
|
|||
|
||||
{/* Erreur */}
|
||||
{localErrors[name] && (
|
||||
<p className="text-sm text-destructive">
|
||||
{localErrors[name]}
|
||||
</p>
|
||||
<p className="text-sm text-destructive">{localErrors[name]}</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// * Packages
|
||||
import { useEffect, useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { VideoIcon } from "lucide-react";
|
||||
// * Components shadcn
|
||||
import {
|
||||
|
|
@ -24,13 +24,13 @@ import {
|
|||
} from "@/back/Components/Inputs/Video/VideoUtils";
|
||||
import BtnOptionnalLinkWithTooltip from "@/back/Components/BtnOptionnalLinkWithTooltip";
|
||||
import str from "@/hooks/use-string";
|
||||
import VideoInputs from "./VideoInputs";
|
||||
import SimpleVimeoId from "../SimpleVimeoId";
|
||||
import SimpleYoutubeId from "../SimpleYoutubeId";
|
||||
import { cn, GetTranslation } from "@/lib/utils";
|
||||
import z from "zod";
|
||||
import { LaravelEnum } from "@/back/types/global";
|
||||
import { usePage } from "@inertiajs/react";
|
||||
import SimpleYoutubeId from "../SimpleYoutubeId";
|
||||
import SimpleVimeoId from "../SimpleVimeoId";
|
||||
import VideoInputs from "./VideoInputs";
|
||||
|
||||
export interface VideoAttributes {
|
||||
videoId: string | null;
|
||||
|
|
@ -68,6 +68,7 @@ type VideoFormatOption = {
|
|||
|
||||
type VideoProps = {
|
||||
disabled: boolean;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
onValidateVideo?: (value: VideoAttributes | null) => void;
|
||||
value?: VideoAttributes | null;
|
||||
isSmallButton?: boolean;
|
||||
|
|
@ -92,7 +93,7 @@ const VIDEO_FORMATS: VideoFormatOption[] = [
|
|||
const animationTime = 200;
|
||||
type VideoProviderEnum = {
|
||||
[K in keyof LaravelEnum]: LaravelEnum[K] & { color: string };
|
||||
};
|
||||
};
|
||||
export default function VideoButton({
|
||||
disabled,
|
||||
onValidateVideo,
|
||||
|
|
@ -102,7 +103,8 @@ export default function VideoButton({
|
|||
forcedProvider,
|
||||
forcedFormat,
|
||||
}: VideoProps) {
|
||||
const videoProviderEnum = usePage().props.videoProviderEnum as VideoProviderEnum;
|
||||
const videoProviderEnum = usePage().props
|
||||
.videoProviderEnum as VideoProviderEnum;
|
||||
|
||||
const defaultValueFormat =
|
||||
VIDEO_FORMATS.find((f) => f.name === value?.format) ?? VIDEO_FORMATS[0];
|
||||
|
|
@ -110,26 +112,25 @@ export default function VideoButton({
|
|||
const DEFAULT_OPTIONS: InputVideoValues = {
|
||||
alt: value && value.alt ? value.alt : "",
|
||||
caption: value && value.caption ? value.caption : null,
|
||||
hasCaption: value && value.caption ? true : false,
|
||||
hasCaption: !!(value && value.caption),
|
||||
isMuted: value && value.isMuted ? Boolean(value.isMuted) : false,
|
||||
hasControls: value && value.hasControls ? Boolean(value.hasControls) : true,
|
||||
hasControls:
|
||||
value && value.hasControls ? Boolean(value.hasControls) : true,
|
||||
canFullScreen:
|
||||
value && value.canFullScreen ? Boolean(value.canFullScreen) : true,
|
||||
format: forcedFormat
|
||||
? forcedFormat
|
||||
: value && value.format
|
||||
? value.format
|
||||
: VIDEO_FORMATS[0].name,
|
||||
provider: forcedProvider
|
||||
? forcedProvider
|
||||
: value && value.provider
|
||||
format:
|
||||
forcedFormat ||
|
||||
(value && value.format ? value.format : VIDEO_FORMATS[0].name),
|
||||
provider:
|
||||
forcedProvider ||
|
||||
(value && value.provider
|
||||
? Number(value.provider)
|
||||
: videoProviderEnum.youtube.value,
|
||||
: videoProviderEnum.youtube.value),
|
||||
videoId: value && value.videoId ? value.videoId : "",
|
||||
};
|
||||
|
||||
const defaultProviderEnum = Object.values(videoProviderEnum).find(
|
||||
(provider) => provider.value == DEFAULT_OPTIONS.provider
|
||||
(provider) => provider.value === DEFAULT_OPTIONS.provider,
|
||||
);
|
||||
|
||||
const [open, setOpen] = useState(false);
|
||||
|
|
@ -138,9 +139,7 @@ export default function VideoButton({
|
|||
const [videoProvider, setVideoProvider] = useState<number>(
|
||||
DEFAULT_OPTIONS.provider,
|
||||
);
|
||||
const [videoUrl, setVideoUrl] = useState<string>(
|
||||
DEFAULT_OPTIONS.videoId,
|
||||
);
|
||||
const [videoUrl, setVideoUrl] = useState<string>(DEFAULT_OPTIONS.videoId);
|
||||
const [videoUrlPreview, setVideoUrlPreview] = useState<string>(
|
||||
DEFAULT_OPTIONS.videoId,
|
||||
);
|
||||
|
|
@ -152,7 +151,7 @@ export default function VideoButton({
|
|||
videoId: videoUrl,
|
||||
isMuted: value?.isMuted,
|
||||
hasControls: value?.hasControls,
|
||||
provider: value?.provider ?? videoProviderEnum.youtube.value
|
||||
provider: value?.provider ?? videoProviderEnum.youtube.value,
|
||||
});
|
||||
|
||||
// * List of global functions for wysiwyg or basic input
|
||||
|
|
@ -180,9 +179,7 @@ export default function VideoButton({
|
|||
)
|
||||
.ucFirst()
|
||||
.value();
|
||||
const vimeoError = str(
|
||||
GetTranslation("back.input_video.invalid_vimeo_id"),
|
||||
)
|
||||
const vimeoError = str(GetTranslation("back.input_video.invalid_vimeo_id"))
|
||||
.ucFirst()
|
||||
.value();
|
||||
const transAlt = GetTranslation("back.input_video.alt");
|
||||
|
|
@ -235,7 +232,6 @@ export default function VideoButton({
|
|||
});
|
||||
|
||||
setErrors(fieldErrors);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -245,7 +241,7 @@ export default function VideoButton({
|
|||
|
||||
const videoMetadataSchema = videoTextSchema({
|
||||
hasCaption: options.hasCaption,
|
||||
transValidationCaption: transValidationCaption,
|
||||
transValidationCaption,
|
||||
transValidationAlt,
|
||||
});
|
||||
const isBoolsSchemaValidation = isBoolsSchema({
|
||||
|
|
@ -294,7 +290,7 @@ export default function VideoButton({
|
|||
format: inputFormat.name,
|
||||
width: inputFormat.width,
|
||||
height: inputFormat.height,
|
||||
hasCaption: options.hasCaption
|
||||
hasCaption: options.hasCaption,
|
||||
});
|
||||
setVideoUrlPreview(videoId ?? "");
|
||||
|
||||
|
|
@ -324,7 +320,7 @@ export default function VideoButton({
|
|||
videoId: DEFAULT_OPTIONS.videoId,
|
||||
provider: DEFAULT_OPTIONS.provider,
|
||||
width: VIDEO_FORMATS[0].width,
|
||||
height: VIDEO_FORMATS[0].height
|
||||
height: VIDEO_FORMATS[0].height,
|
||||
});
|
||||
setVideoUrl(DEFAULT_OPTIONS.videoId);
|
||||
setOptions(DEFAULT_OPTIONS);
|
||||
|
|
@ -334,7 +330,7 @@ export default function VideoButton({
|
|||
setVideoUrlPreview(DEFAULT_OPTIONS.videoId ?? "");
|
||||
setErrors({});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const handleCancel = (): void => {
|
||||
setOpen(false);
|
||||
setTimeout(() => {
|
||||
|
|
@ -383,9 +379,9 @@ export default function VideoButton({
|
|||
className={cn(
|
||||
"relative",
|
||||
inputFormat.name === "landscape" &&
|
||||
"aspect-[16/9]",
|
||||
"aspect-[16/9]",
|
||||
inputFormat.name === "portrait" &&
|
||||
"aspect-[9/16]",
|
||||
"aspect-[9/16]",
|
||||
)}
|
||||
>
|
||||
<iframe
|
||||
|
|
@ -395,24 +391,45 @@ export default function VideoButton({
|
|||
allowFullScreen={value?.canFullScreen}
|
||||
title={value?.caption || "video"}
|
||||
/>
|
||||
<div className="iframe-overlay"></div>
|
||||
<div className="iframe-overlay" />
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-col justify-center items-center">
|
||||
<VideoIcon />
|
||||
<p className="text-center break-normal w-full mt-2">
|
||||
{str(GetTranslation('back.input_video.placeholder')).ucFirst().value()}
|
||||
{forcedProvider ? (defaultProviderEnum?.label ?
|
||||
<span style={{
|
||||
color: defaultProviderEnum?.color
|
||||
}}>{" " + str(defaultProviderEnum?.label).ucFirst().value()}</span> : "") : ""}
|
||||
{str(
|
||||
GetTranslation(
|
||||
"back.input_video.placeholder",
|
||||
),
|
||||
)
|
||||
.ucFirst()
|
||||
.value()}
|
||||
{forcedProvider ? (
|
||||
defaultProviderEnum?.label ? (
|
||||
<span
|
||||
style={{
|
||||
color: defaultProviderEnum?.color,
|
||||
}}
|
||||
>
|
||||
{` ${str(
|
||||
defaultProviderEnum?.label,
|
||||
)
|
||||
.ucFirst()
|
||||
.value()}`}
|
||||
</span>
|
||||
) : (
|
||||
""
|
||||
)
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</Button>
|
||||
)}
|
||||
</DialogTrigger>
|
||||
<DialogContent className={cn("p-4", "selected_" + videoProvider)}>
|
||||
<DialogContent className={cn("p-4", `selected_${videoProvider}`)}>
|
||||
<DialogHeader className="px-2 pt-2">
|
||||
<DialogTitle>
|
||||
{GetTranslation("back.input_video.title")}
|
||||
|
|
@ -426,7 +443,9 @@ export default function VideoButton({
|
|||
{!forcedProvider && (
|
||||
<div className="flex flex-col gap-1.5">
|
||||
<Label>
|
||||
{str(GetTranslation("back.input_video.provider"))
|
||||
{str(
|
||||
GetTranslation("back.input_video.provider"),
|
||||
)
|
||||
.ucFirst()
|
||||
.value()}
|
||||
</Label>
|
||||
|
|
@ -452,7 +471,7 @@ export default function VideoButton({
|
|||
className="flex-1 flex flex-col items-center gap-2 h-fit py-3 [&_svg]:size-8"
|
||||
>
|
||||
{provider.value ===
|
||||
videoProviderEnum.youtube.value ? (
|
||||
videoProviderEnum.youtube.value ? (
|
||||
<YoutubeIcon />
|
||||
) : (
|
||||
<VimeoIcon />
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import SimpleString from "@/back/Components/Inputs/SimpleString";
|
|||
import SimpleSwitch from "@/back/Components/Inputs/SimpleSwitch";
|
||||
import useTrans from "@/hooks/use-translations";
|
||||
import str from "@/hooks/use-string";
|
||||
import { InputVideoValues } from "./VideoButton";
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import { ReactNode } from "react";
|
||||
import { InputVideoValues } from "./VideoButton";
|
||||
|
||||
type VideoInputsProps = {
|
||||
value: InputVideoValues;
|
||||
|
|
@ -25,13 +25,10 @@ export default function VideoInputs({
|
|||
const transVideoCaption = useTrans("back.input_video.caption");
|
||||
return (
|
||||
<>
|
||||
|
||||
{/* Input alt attribute of the image. */}
|
||||
<SimpleString
|
||||
name="alt"
|
||||
label={str(useTrans("back.input_video.alt"))
|
||||
.ucFirst()
|
||||
.value()}
|
||||
label={str(useTrans("back.input_video.alt")).ucFirst().value()}
|
||||
placeholder="ex: John Doe"
|
||||
required
|
||||
value={value.alt}
|
||||
|
|
@ -68,7 +65,9 @@ export default function VideoInputs({
|
|||
placeholder="ex: John Doe"
|
||||
required={false}
|
||||
value={value.caption ?? ""}
|
||||
setData={(_, v) => onChange({ ...value, caption: v })}
|
||||
setData={(_, v) =>
|
||||
onChange({ ...value, caption: v })
|
||||
}
|
||||
disabled={disabled || loading}
|
||||
parentErrors={errors}
|
||||
/>
|
||||
|
|
@ -116,11 +115,17 @@ export default function VideoInputs({
|
|||
<div className="px-4">
|
||||
<Separator className="my-4" />
|
||||
<SimpleSwitch
|
||||
label={str(useTrans("back.input_video.can_fullScreen"))
|
||||
label={str(
|
||||
useTrans("back.input_video.can_fullScreen"),
|
||||
)
|
||||
.ucFirst()
|
||||
.value()}
|
||||
leftHelper={str(useTrans("back.no"))
|
||||
.ucFirst()
|
||||
.value()}
|
||||
rightHelper={str(useTrans("back.yes"))
|
||||
.ucFirst()
|
||||
.value()}
|
||||
leftHelper={str(useTrans("back.no")).ucFirst().value()}
|
||||
rightHelper={str(useTrans("back.yes")).ucFirst().value()}
|
||||
name="canFullScreen"
|
||||
checked={value.canFullScreen}
|
||||
setData={(_, v) =>
|
||||
|
|
@ -138,10 +143,6 @@ export default function VideoInputs({
|
|||
);
|
||||
}
|
||||
|
||||
const SimpleSwitchLayout = ({ children }: { children: ReactNode }) => {
|
||||
return (
|
||||
<div className="border-l border-1 h-full p-4">
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
function SimpleSwitchLayout({ children }: { children: ReactNode }) {
|
||||
return <div className="border-l border-1 h-full p-4">{children}</div>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ export const extractYoutubeId = (input: string): string | null => {
|
|||
const shortMatch = trimmed.match(/youtu\.be\/([a-zA-Z0-9_-]{11})/);
|
||||
if (shortMatch) return shortMatch[1];
|
||||
// youtube.com/embed/ID
|
||||
const embedMatch = trimmed.match(/youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/);
|
||||
const embedMatch = trimmed.match(
|
||||
/youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/,
|
||||
);
|
||||
if (embedMatch) return embedMatch[1];
|
||||
return null;
|
||||
};
|
||||
|
|
@ -74,7 +76,12 @@ export const videoTextSchema = ({
|
|||
transValidationAlt,
|
||||
}: {
|
||||
hasCaption: boolean;
|
||||
transValidationCaption: { min: string; max: string; string: string, boolean: string };
|
||||
transValidationCaption: {
|
||||
min: string;
|
||||
max: string;
|
||||
string: string;
|
||||
boolean: string;
|
||||
};
|
||||
transValidationAlt: {
|
||||
min: string;
|
||||
max: string;
|
||||
|
|
@ -82,9 +89,9 @@ export const videoTextSchema = ({
|
|||
};
|
||||
}) => {
|
||||
const altRules = z
|
||||
.string({ message: transValidationAlt.string })
|
||||
.min(3, transValidationAlt.min)
|
||||
.max(255, transValidationAlt.max);
|
||||
.string({ message: transValidationAlt.string })
|
||||
.min(3, transValidationAlt.min)
|
||||
.max(255, transValidationAlt.max);
|
||||
|
||||
const captionRules = z
|
||||
.string({ message: transValidationCaption.string })
|
||||
|
|
@ -98,18 +105,22 @@ export const videoTextSchema = ({
|
|||
isMuted: isBool,
|
||||
hasControls: isBool,
|
||||
canFullScreen: isBool,
|
||||
alt: altRules
|
||||
alt: altRules,
|
||||
});
|
||||
};
|
||||
|
||||
export const isBoolsSchema = (transValidation: { isMuted: string; hasControls: string; canFullScreen: string }) => {
|
||||
export const isBoolsSchema = (transValidation: {
|
||||
isMuted: string;
|
||||
hasControls: string;
|
||||
canFullScreen: string;
|
||||
}) => {
|
||||
const isMuted = z.boolean({ message: transValidation.isMuted });
|
||||
const hasControls = z.boolean({ message: transValidation.hasControls });
|
||||
const canFullScreen = z.boolean({ message: transValidation.canFullScreen });
|
||||
|
||||
return z.object({
|
||||
isMuted: isMuted,
|
||||
hasControls: hasControls,
|
||||
canFullScreen: canFullScreen,
|
||||
isMuted,
|
||||
hasControls,
|
||||
canFullScreen,
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { useEffect, useState } from "react";
|
||||
import VideoButton, { VideoAttributes } from "./Video/VideoButton";
|
||||
import { usePage } from "@inertiajs/react";
|
||||
import InputError from "../InputError";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { cn, GetTranslation } from "@/lib/utils";
|
||||
import BtnOptionnalLinkWithTooltip from "../BtnOptionnalLinkWithTooltip";
|
||||
import { RefreshCcw, Trash } from "lucide-react";
|
||||
import str from "@/hooks/use-string";
|
||||
import BtnOptionnalLinkWithTooltip from "../BtnOptionnalLinkWithTooltip";
|
||||
import InputError from "../InputError";
|
||||
import VideoButton, { VideoAttributes } from "./Video/VideoButton";
|
||||
|
||||
interface Props {
|
||||
label: string;
|
||||
|
|
@ -22,13 +22,23 @@ interface Props {
|
|||
reset?: (name?: string) => void;
|
||||
}
|
||||
|
||||
const VideoInput = (props: Props) => {
|
||||
const { name, setData, value, className, label, required = true, disabled = false, forcedFormat, forcedProvider, reset } = props;
|
||||
function VideoInput(props: Props) {
|
||||
const {
|
||||
name,
|
||||
setData,
|
||||
value,
|
||||
className,
|
||||
label,
|
||||
required = true,
|
||||
disabled = false,
|
||||
forcedFormat,
|
||||
forcedProvider,
|
||||
reset,
|
||||
} = props;
|
||||
const { errors } = usePage().props;
|
||||
const [refresh, setRefresh] = useState(Date.now());
|
||||
|
||||
useEffect(() => {
|
||||
}, [refresh]);
|
||||
useEffect(() => {}, [refresh]);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
|
@ -47,7 +57,7 @@ const VideoInput = (props: Props) => {
|
|||
key={refresh}
|
||||
forcedFormat={forcedFormat}
|
||||
forcedProvider={forcedProvider}
|
||||
hasError={errors[name] ? true : false}
|
||||
hasError={!!errors[name]}
|
||||
onValidateVideo={(value) => {
|
||||
if (value) {
|
||||
setData(name, {
|
||||
|
|
@ -59,55 +69,71 @@ const VideoInput = (props: Props) => {
|
|||
provider: value.provider,
|
||||
videoId: value.videoId,
|
||||
format: value.format,
|
||||
})
|
||||
setRefresh(Date.now())
|
||||
});
|
||||
setRefresh(Date.now());
|
||||
} else {
|
||||
setData(name, null)
|
||||
setData(name, null);
|
||||
}
|
||||
}} />
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<BtnOptionnalLinkWithTooltip
|
||||
content={<RefreshCcw />}
|
||||
tooltipContent={
|
||||
<p>
|
||||
{str(GetTranslation('back.input_video.tooltip.reset')).ucFirst().value()}
|
||||
{str(
|
||||
GetTranslation(
|
||||
"back.input_video.tooltip.reset",
|
||||
),
|
||||
)
|
||||
.ucFirst()
|
||||
.value()}
|
||||
</p>
|
||||
}
|
||||
onClick={() => {
|
||||
reset?.(name)
|
||||
setRefresh(Date.now())
|
||||
reset?.(name);
|
||||
setRefresh(Date.now());
|
||||
}}
|
||||
size="sm"
|
||||
className={cn(!required ? "h-40 rounded-r-md" : "h-20 rounded-b-none", " rounded-l-none")}
|
||||
className={cn(
|
||||
!required
|
||||
? "h-40 rounded-r-md"
|
||||
: "h-20 rounded-b-none",
|
||||
" rounded-l-none",
|
||||
)}
|
||||
variant="secondary"
|
||||
/>
|
||||
|
||||
{
|
||||
required && (
|
||||
<BtnOptionnalLinkWithTooltip
|
||||
content={<Trash />}
|
||||
disabled={!value}
|
||||
onClick={() => {
|
||||
setData(name, null)
|
||||
setRefresh(Date.now())
|
||||
}}
|
||||
tooltipContent={
|
||||
<p>
|
||||
{str(GetTranslation('back.input_video.tooltip.delete')).ucFirst().value()}
|
||||
</p>
|
||||
}
|
||||
size="sm"
|
||||
className="h-20 rounded-t-none rounded-l-none"
|
||||
variant="destructive"
|
||||
/>
|
||||
)
|
||||
}
|
||||
{required && (
|
||||
<BtnOptionnalLinkWithTooltip
|
||||
content={<Trash />}
|
||||
disabled={!value}
|
||||
onClick={() => {
|
||||
setData(name, null);
|
||||
setRefresh(Date.now());
|
||||
}}
|
||||
tooltipContent={
|
||||
<p>
|
||||
{str(
|
||||
GetTranslation(
|
||||
"back.input_video.tooltip.delete",
|
||||
),
|
||||
)
|
||||
.ucFirst()
|
||||
.value()}
|
||||
</p>
|
||||
}
|
||||
size="sm"
|
||||
className="h-20 rounded-t-none rounded-l-none"
|
||||
variant="destructive"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<InputError message={errors[name]} />
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
export default VideoInput;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import { Node } from '@tiptap/core';
|
||||
import { Node, CommandProps } from "@tiptap/core";
|
||||
import { ReactNodeViewRenderer } from "@tiptap/react";
|
||||
import { buildVideoSrc } from "../../../Video/VideoUtils";
|
||||
import VideoNodeView, { FLOAT_STYLES, FloatOption } from "./VideoNodeView";
|
||||
import { CommandProps } from '@tiptap/core';
|
||||
import { VideoAttributes } from '../../../Video/VideoButton';
|
||||
import { VideoAttributes } from "../../../Video/VideoButton";
|
||||
|
||||
export const Video = Node.create({
|
||||
name: "video",
|
||||
|
|
@ -24,7 +23,7 @@ export const Video = Node.create({
|
|||
format: { default: "landscape" },
|
||||
hasCaption: { default: false },
|
||||
alt: { default: "" },
|
||||
provider: { default : 1 }
|
||||
provider: { default: 1 },
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -34,19 +33,26 @@ export const Video = Node.create({
|
|||
{
|
||||
tag: "figure:has(iframe)",
|
||||
getAttrs: (element: HTMLElement) => {
|
||||
const iframe = element.querySelector("iframe") as HTMLIFrameElement;
|
||||
const iframe = element.querySelector(
|
||||
"iframe",
|
||||
) as HTMLIFrameElement;
|
||||
const figcaption = element.querySelector("figcaption");
|
||||
const src = iframe.getAttribute("src") || "";
|
||||
|
||||
const youtubeMatch = src.match(/youtube\.com\/embed\/([a-zA-Z0-9_-]+)/);
|
||||
const youtubeMatch = src.match(
|
||||
/youtube\.com\/embed\/([a-zA-Z0-9_-]+)/,
|
||||
);
|
||||
const vimeoMatch = src.match(/vimeo\.com\/video\/(\d+)/);
|
||||
|
||||
return {
|
||||
videoId: youtubeMatch?.[1] ?? vimeoMatch?.[1] ?? null,
|
||||
width: parseInt(iframe.getAttribute("width") || "1008"),
|
||||
height: parseInt(iframe.getAttribute("height") || "567"),
|
||||
height: parseInt(
|
||||
iframe.getAttribute("height") || "567",
|
||||
),
|
||||
caption: figcaption?.textContent ?? null,
|
||||
isMuted: src.includes("mute=1") || src.includes("muted=1"),
|
||||
isMuted:
|
||||
src.includes("mute=1") || src.includes("muted=1"),
|
||||
hasControls: !src.includes("controls=0"),
|
||||
canFullScreen: iframe.hasAttribute("allowfullscreen"),
|
||||
};
|
||||
|
|
@ -92,10 +98,35 @@ export const Video = Node.create({
|
|||
if (finalStyle) figureAttrs.style = finalStyle;
|
||||
|
||||
if (caption) {
|
||||
return ["figure", figureAttrs, ["iframe", iframeAttrs], ["figcaption", {}, caption]];
|
||||
return [
|
||||
"figure",
|
||||
figureAttrs,
|
||||
["iframe", iframeAttrs],
|
||||
["figcaption", {}, caption],
|
||||
];
|
||||
}
|
||||
|
||||
return ["figure", figureAttrs, ["iframe", iframeAttrs]];
|
||||
// return [
|
||||
// "div",
|
||||
// figureAttrs,
|
||||
// [
|
||||
// "a",
|
||||
// {
|
||||
// class: "cn-cookie-link",
|
||||
// id: `${provider}-warning`,
|
||||
// href: src,
|
||||
// rel: "nofollow",
|
||||
// },
|
||||
// [
|
||||
// "strong",
|
||||
// {
|
||||
// class: "text-underline text-bold text-normal text-danger",
|
||||
// },
|
||||
// `cookie-notice.custom.${provider}.warning`,
|
||||
// ],
|
||||
// ],
|
||||
// ];
|
||||
},
|
||||
|
||||
addNodeView() {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
LayoutIcon,
|
||||
PencilIcon,
|
||||
} from "lucide-react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
// * Components shadcn
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
|
|
@ -78,14 +78,17 @@ const PLACEMENT_STYLES: Record<PlacementValue, string> = {
|
|||
"float-right": FLOAT_STYLES.right,
|
||||
};
|
||||
|
||||
|
||||
export default function VideoNodeView(props: NodeViewProps) {
|
||||
const { node, updateAttributes, editor, selected } = props;
|
||||
const { node, updateAttributes, selected } = props;
|
||||
const attrs = node.attrs as VideoAttributes;
|
||||
|
||||
// Wrapper div used to measure size for resize
|
||||
const wrapperRef = useRef<HTMLDivElement>(null);
|
||||
const resizeState = useRef<{ startX: number; startWidth: number; ratio: number } | null>(null);
|
||||
const resizeState = useRef<{
|
||||
startX: number;
|
||||
startWidth: number;
|
||||
ratio: number;
|
||||
} | null>(null);
|
||||
const minSize = Number(videoDetails.minDim);
|
||||
const maxSize = Number(videoDetails.maxDim);
|
||||
const [topSticky, setTopSticky] = useState<number>(0);
|
||||
|
|
@ -100,7 +103,7 @@ export default function VideoNodeView(props: NodeViewProps) {
|
|||
alt: attrs.alt,
|
||||
format: attrs.format,
|
||||
provider: attrs.provider,
|
||||
videoId: attrs.videoId ?? ""
|
||||
videoId: attrs.videoId ?? "",
|
||||
});
|
||||
|
||||
// Rebuild iframe src when attrs change (e.g. after edit dialog save)
|
||||
|
|
@ -108,7 +111,7 @@ export default function VideoNodeView(props: NodeViewProps) {
|
|||
videoId: attrs.videoId,
|
||||
isMuted: attrs.isMuted,
|
||||
hasControls: attrs.hasControls,
|
||||
provider: attrs.provider
|
||||
provider: attrs.provider,
|
||||
});
|
||||
|
||||
const getCurrentPlacement = (): PlacementValue | null => {
|
||||
|
|
@ -123,7 +126,9 @@ export default function VideoNodeView(props: NodeViewProps) {
|
|||
const handlePlacementChange = (value: PlacementValue) => {
|
||||
updateAttributes({
|
||||
style: PLACEMENT_STYLES[value],
|
||||
float: value.startsWith("float-") ? (value.split("-")[1] as FloatOption) : null,
|
||||
float: value.startsWith("float-")
|
||||
? (value.split("-")[1] as FloatOption)
|
||||
: null,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -135,7 +140,9 @@ export default function VideoNodeView(props: NodeViewProps) {
|
|||
resizeState.current = {
|
||||
startX: event.clientX,
|
||||
startWidth: wrapper.offsetWidth,
|
||||
ratio: (attrs.width || Number(videoDetails.width)) / (attrs.height || Number(videoDetails.height)),
|
||||
ratio:
|
||||
(attrs.width || Number(videoDetails.width)) /
|
||||
(attrs.height || Number(videoDetails.height)),
|
||||
};
|
||||
setIsResizing(true);
|
||||
};
|
||||
|
|
@ -145,14 +152,28 @@ export default function VideoNodeView(props: NodeViewProps) {
|
|||
const { startX, startWidth, ratio } = resizeState.current;
|
||||
let newWidth = startWidth + (event.clientX - startX);
|
||||
let newHeight = newWidth / ratio;
|
||||
if (newWidth < minSize) { newWidth = minSize; newHeight = newWidth / ratio; }
|
||||
if (newHeight < minSize) { newHeight = minSize; newWidth = newHeight * ratio; }
|
||||
if (newWidth > maxSize) { newWidth = maxSize; newHeight = newWidth / ratio; }
|
||||
if (newHeight > maxSize) { newHeight = maxSize; newWidth = newHeight * ratio; }
|
||||
updateAttributes({ width: Math.round(newWidth), height: Math.round(newHeight) });
|
||||
if (newWidth < minSize) {
|
||||
newWidth = minSize;
|
||||
newHeight = newWidth / ratio;
|
||||
}
|
||||
if (newHeight < minSize) {
|
||||
newHeight = minSize;
|
||||
newWidth = newHeight * ratio;
|
||||
}
|
||||
if (newWidth > maxSize) {
|
||||
newWidth = maxSize;
|
||||
newHeight = newWidth / ratio;
|
||||
}
|
||||
if (newHeight > maxSize) {
|
||||
newHeight = maxSize;
|
||||
newWidth = newHeight * ratio;
|
||||
}
|
||||
updateAttributes({
|
||||
width: Math.round(newWidth),
|
||||
height: Math.round(newHeight),
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const handleResize = () => {
|
||||
const currentHeaderHeight =
|
||||
|
|
@ -233,9 +254,12 @@ export default function VideoNodeView(props: NodeViewProps) {
|
|||
allowFullScreen={attrs.canFullScreen}
|
||||
title={attrs.caption || "video"}
|
||||
// Disable pointer events when selected so clicks go to the editor
|
||||
style={{ pointerEvents: selected ? "none" : "auto", display: "block" }}
|
||||
style={{
|
||||
pointerEvents: selected ? "none" : "auto",
|
||||
display: "block",
|
||||
}}
|
||||
/>
|
||||
<div className="iframe-overlay"></div>
|
||||
<div className="iframe-overlay" />
|
||||
</div>
|
||||
|
||||
{selected && (
|
||||
|
|
@ -250,16 +274,32 @@ export default function VideoNodeView(props: NodeViewProps) {
|
|||
</SelectTrigger>
|
||||
<SelectContent align="end">
|
||||
{PLACEMENT_OPTIONS.map((value) => {
|
||||
const [type, dir] = value.split("-") as ["align" | "float", string];
|
||||
const label = type === "align" ? `Align ${dir}` : `Wrap ${dir}`;
|
||||
const [type, dir] = value.split("-") as [
|
||||
"align" | "float",
|
||||
string,
|
||||
];
|
||||
const label =
|
||||
type === "align"
|
||||
? `Align ${dir}`
|
||||
: `Wrap ${dir}`;
|
||||
return (
|
||||
<SelectItem key={value} value={value}>
|
||||
<div className="flex flex-row items-center gap-2">
|
||||
{value === "align-left" && <AlignLeftIcon className="w-4 h-4" />}
|
||||
{value === "align-center" && <AlignCenterIcon className="w-4 h-4" />}
|
||||
{value === "align-right" && <AlignRightIcon className="w-4 h-4" />}
|
||||
{value === "float-left" && <ArrowLeftRightIcon className="w-4 h-4" />}
|
||||
{value === "float-right" && <ArrowRightLeftIcon className="w-4 h-4" />}
|
||||
{value === "align-left" && (
|
||||
<AlignLeftIcon className="w-4 h-4" />
|
||||
)}
|
||||
{value === "align-center" && (
|
||||
<AlignCenterIcon className="w-4 h-4" />
|
||||
)}
|
||||
{value === "align-right" && (
|
||||
<AlignRightIcon className="w-4 h-4" />
|
||||
)}
|
||||
{value === "float-left" && (
|
||||
<ArrowLeftRightIcon className="w-4 h-4" />
|
||||
)}
|
||||
{value === "float-right" && (
|
||||
<ArrowRightLeftIcon className="w-4 h-4" />
|
||||
)}
|
||||
{label}
|
||||
</div>
|
||||
</SelectItem>
|
||||
|
|
@ -316,7 +356,13 @@ export default function VideoNodeView(props: NodeViewProps) {
|
|||
<DialogFooter className="gap-1.5 px-2 pb-2">
|
||||
<BtnOptionnalLinkWithTooltip
|
||||
content={useTrans("back.input_video.edit_cancel")}
|
||||
tooltipContent={str(useTrans("back.input_video.tooltip.edit_cancel")).ucFirst().value()}
|
||||
tooltipContent={str(
|
||||
useTrans(
|
||||
"back.input_video.tooltip.edit_cancel",
|
||||
),
|
||||
)
|
||||
.ucFirst()
|
||||
.value()}
|
||||
onClick={() => setOpen(false)}
|
||||
type="button"
|
||||
variant="secondary"
|
||||
|
|
@ -324,7 +370,11 @@ export default function VideoNodeView(props: NodeViewProps) {
|
|||
/>
|
||||
<BtnOptionnalLinkWithTooltip
|
||||
content={useTrans("back.input_video.edit_apply")}
|
||||
tooltipContent={str(useTrans("back.input_video.tooltip.edit_apply")).ucFirst().value()}
|
||||
tooltipContent={str(
|
||||
useTrans("back.input_video.tooltip.edit_apply"),
|
||||
)
|
||||
.ucFirst()
|
||||
.value()}
|
||||
onClick={saveDialog}
|
||||
type="button"
|
||||
variant="default"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { VideoAttributes } from "../../../Video/VideoButton";
|
|||
declare module "@tiptap/core" {
|
||||
interface Commands<ReturnType> {
|
||||
Video: {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
setVideo: (attrs: VideoAttributes) => ReturnType;
|
||||
unsetVideo: () => ReturnType;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import { Label } from "@/components/ui/label";
|
|||
import ShortcutBoundary from "@/back/Components/Inputs/Wysiwyg/Extensions/ShortCuts/ShortcutBoundary";
|
||||
import { Link } from "@/back/Components/Inputs/Wysiwyg/Extensions/Link/Link";
|
||||
import Image from "@/back/Components/Inputs/Wysiwyg/Extensions/Image/Image";
|
||||
import {Video} from "@/back/Components/Inputs/Wysiwyg/Extensions/Video/Video";
|
||||
import { Video } from "@/back/Components/Inputs/Wysiwyg/Extensions/Video/Video";
|
||||
import InputError from "@/back/Components/InputError";
|
||||
import WordCounter from "@/back/Components/WordCounter";
|
||||
import Toolbar from "@/back/Components/Inputs/Wysiwyg/Toolbar";
|
||||
|
|
@ -72,10 +72,12 @@ export default function SimpleWysiwyg({
|
|||
const temp = document.createElement("div");
|
||||
temp.innerHTML = html;
|
||||
const text = temp.textContent?.trim() || "";
|
||||
const hasValidImage = Array.from(temp.querySelectorAll("img"))
|
||||
.some(img => img.getAttribute("src")?.trim());
|
||||
const hasValidIframe = Array.from(temp.querySelectorAll("iframe"))
|
||||
.some(iframe => iframe.getAttribute("src")?.trim());
|
||||
const hasValidImage = Array.from(temp.querySelectorAll("img")).some(
|
||||
(img) => img.getAttribute("src")?.trim(),
|
||||
);
|
||||
const hasValidIframe = Array.from(temp.querySelectorAll("iframe")).some(
|
||||
(iframe) => iframe.getAttribute("src")?.trim(),
|
||||
);
|
||||
if (!text && !hasValidImage && !hasValidIframe) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -438,9 +438,9 @@ export default function Toolbar({ editor }: ToolbarProps) {
|
|||
<LinkButton editor={editor} disabled={docSelected} />
|
||||
<VideoButton
|
||||
disabled={docSelected}
|
||||
isSmallButton={true}
|
||||
isSmallButton
|
||||
onValidateVideo={(value) => {
|
||||
if(value) {
|
||||
if (value) {
|
||||
editor.commands.setVideo({
|
||||
...value,
|
||||
caption: value.hasCaption ? value.caption : null,
|
||||
|
|
|
|||
|
|
@ -8,13 +8,11 @@ import InputError from "@/back/Components/InputError";
|
|||
import SimpleString from "@/back/Components/Inputs/SimpleString";
|
||||
import EnumSelect from "@/back/Components/Inputs/EnumSelect";
|
||||
import SimpleDatePicker from "@/back/Components/Inputs/SimpleDatePicker";
|
||||
import CompleteInputFile from "@/back/Components/Inputs/CompleteInputFile";
|
||||
import SubmitButton from "@/back/Components/SubmitButton";
|
||||
import SimpleSwitch from "@/back/Components/Inputs/SimpleSwitch";
|
||||
import BtnOptionnalLinkWithTooltip from "@/back/Components/BtnOptionnalLinkWithTooltip";
|
||||
import { ModelSelect } from "@/back/Components/Inputs/ModelSelect";
|
||||
import { AppEnv, LaravelEnum } from "@/back/types/global";
|
||||
import { DynamicFieldTypes } from "@/back/types/dynamic-pages";
|
||||
import { DocumentModel } from "@/back/types/others";
|
||||
import useTrans from "@/hooks/use-translations";
|
||||
import str from "@/hooks/use-string";
|
||||
|
|
@ -36,8 +34,6 @@ export default function Form({
|
|||
method: number;
|
||||
}) {
|
||||
const { locale, url } = usePage().props.appEnv as AppEnv;
|
||||
const enumDynamicFieldTypes = usePage().props
|
||||
.enumDynamicFieldTypes as DynamicFieldTypes;
|
||||
const enumDocStatus = usePage().props.enumDocumentStatus as LaravelEnum;
|
||||
const enumYears = usePage().props.enumYears as LaravelEnum;
|
||||
const [dynamicKey, setDynamicKey] = useState<number | null>(null);
|
||||
|
|
@ -47,7 +43,7 @@ export default function Form({
|
|||
const defaultTagsOptions = extractIdsFromDatabasePivotRelation(model?.tags);
|
||||
|
||||
/** Form section */
|
||||
const { post, setData, data, reset } = useForm({
|
||||
const { post, setData, data } = useForm({
|
||||
name: model?.name ? model?.name[locale] : "",
|
||||
exercice: model?.exercice ? model?.exercice : "",
|
||||
status: model?.status ?? enumDocStatus.unpublished.value,
|
||||
|
|
@ -103,12 +99,6 @@ export default function Form({
|
|||
const transAssociatedIssuPathPlaceholder = useTrans(
|
||||
"back.issuu.issuu_path.placeholder",
|
||||
);
|
||||
const transAssociatePathLabel = useTrans("back.form_associate_to", {
|
||||
params: {
|
||||
attribute: useTrans("validation.custom.file"),
|
||||
},
|
||||
choice: 1,
|
||||
});
|
||||
const transRefreshOriginal = useTrans("back.refresh_original");
|
||||
return (
|
||||
<form onSubmit={submitCrud}>
|
||||
|
|
@ -261,13 +251,12 @@ export default function Form({
|
|||
// inputType={enumDynamicFieldTypes.file.value}
|
||||
// />
|
||||
<SimpleVideoUpload
|
||||
width={"100%"}
|
||||
width="100%"
|
||||
height={100}
|
||||
label="Vidéo uploader"
|
||||
name="path"
|
||||
setData={setData}
|
||||
required={true}
|
||||
|
||||
required
|
||||
/>
|
||||
)}
|
||||
{(model?.issuu_path || model?.path) && (
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ export default function Form({
|
|||
action: string;
|
||||
method: number;
|
||||
}) {
|
||||
|
||||
/** Global */
|
||||
const { locale, url } = usePage().props.appEnv as AppEnv;
|
||||
const dynamicPageUrl = usePage().props.dynamicPageUrl as string;
|
||||
|
|
@ -136,7 +135,7 @@ export default function Form({
|
|||
|
||||
const getConfig = (id: number) =>
|
||||
configOptions.find((objet) => objet.id === id)?.config[
|
||||
locale
|
||||
locale
|
||||
] as ConfigField[];
|
||||
|
||||
/** Form section */
|
||||
|
|
@ -253,7 +252,13 @@ export default function Form({
|
|||
modelName={useTrans(`models.classes.${modelName}`, {
|
||||
choice: 1,
|
||||
})}
|
||||
pathField={data.isRoot ? "" : (dynamicPageUrl ?? "").replace(url, "").replace(/^\/+/, "")}
|
||||
pathField={
|
||||
data.isRoot
|
||||
? ""
|
||||
: dynamicPageUrl
|
||||
.replace(url, "")
|
||||
.replace(/^\/+/, "")
|
||||
}
|
||||
isAvailable={
|
||||
model?.status ===
|
||||
enumDynamicPageStatus.published.value
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
// ASSETS
|
||||
import.meta.glob("../../assets/images/**/*", { eager: true });
|
||||
|
||||
// * Packages
|
||||
import Chart from "chart.js/auto";
|
||||
import axios from "axios";
|
||||
|
|
|
|||
9
resources/ts/vite-env.d.ts
vendored
|
|
@ -1,9 +0,0 @@
|
|||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_SENTRY_TRACES_SAMPLE_RATE: string | undefined;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
146
resources/views/components/front/page-404.blade.php
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
<div class="page-error">
|
||||
<div class="hero-static fw">
|
||||
<div class="hero-static__wrapper wrapper">
|
||||
<div class="lapki">
|
||||
<svg version="1.1" id="Pattes" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 268.8 400"
|
||||
style="enable-background:new 0 0 268.8 400;" xml:space="preserve">
|
||||
<path class="st1"
|
||||
d="M28.2,20.4L5.3,2C5.2,1.6,4.9,1.2,4.4,1C3.7,0.9,3.1,1.2,2.9,1.9C2.8,2.3,2.9,2.7,3.1,3L1,32.9
|
||||
c0,0.3,0.2,0.6,0.5,0.6c0,0,0.1,0,0.1,0c0.3,0,0.6-0.2,0.7-0.5l4.3-20.2L19.2,37c0.2,0.3,0.5,0.4,0.8,0.3c0.3-0.1,0.4-0.5,0.3-0.8
|
||||
l-9.5-25.3l16.7,10.2c0.3,0.2,0.6,0.1,0.8-0.2C28.5,21,28.5,20.6,28.2,20.4z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M62.4,33.9L42.7,12.1c-0.5,0-0.9-0.3-1-0.8c-0.2-0.6,0.1-1.3,0.8-1.5c0.4-0.1,0.8-0.1,1.1,0.2L73.2,6
|
||||
c0.3,0,0.6,0.1,0.7,0.4c0,0,0,0.1,0,0.1c0.1,0.3-0.1,0.6-0.4,0.7l-19.9,5.5l24.9,11.2c0.3,0.1,0.4,0.5,0.3,0.8
|
||||
C78.7,25,78.3,25.1,78,25l-25.8-8l11.2,16.1c0.2,0.3,0.1,0.6-0.1,0.8C63,34.2,62.6,34.1,62.4,33.9z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M79.2,66.3l-27-11.7c-0.2-0.4-0.6-0.7-1.1-0.7c-0.7,0-1.2,0.5-1.2,1.2c0,0.4,0.2,0.8,0.5,1l5.9,29.4
|
||||
c0.1,0.3,0.3,0.5,0.6,0.5c0,0,0.1,0,0.1,0c0.3,0,0.6-0.3,0.5-0.7l-1.2-20.6l18.6,20c0.2,0.2,0.6,0.3,0.8,0.1
|
||||
c0.3-0.2,0.3-0.6,0.1-0.8L60,62l18.8,5.4c0.3,0.1,0.6-0.1,0.8-0.4C79.7,66.7,79.5,66.4,79.2,66.3z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M114.7,67.6L89.3,52.7c-0.5,0.1-0.9-0.1-1.2-0.5c-0.4-0.5-0.3-1.3,0.3-1.7c0.3-0.2,0.7-0.3,1.1-0.2l27.2-12.6
|
||||
c0.3-0.1,0.6,0,0.8,0.2c0,0,0,0,0,0.1c0.2,0.3,0.1,0.6-0.2,0.8L99.8,50l27.1,3.2c0.3,0,0.6,0.3,0.5,0.7c0,0.3-0.3,0.6-0.6,0.6
|
||||
l-27,0.1l15.5,12c0.3,0.2,0.3,0.6,0.1,0.8C115.3,67.7,114.9,67.7,114.7,67.6z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M128.3,100.5l-25.9-13.9c-0.2-0.4-0.6-0.8-1-0.8c-0.7-0.1-1.3,0.4-1.3,1.1c0,0.4,0.1,0.8,0.4,1l3.3,29.8
|
||||
c0,0.3,0.3,0.5,0.6,0.5c0,0,0.1,0,0.1,0c0.3,0,0.6-0.3,0.6-0.6l0.5-20.7l16.8,21.5c0.2,0.3,0.6,0.3,0.8,0.1c0.3-0.2,0.3-0.6,0.2-0.8
|
||||
l-14-23.1l18.3,7c0.3,0.1,0.6,0,0.8-0.3C128.7,101,128.6,100.6,128.3,100.5z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M164.5,105.6l-24.3-16.5c-0.5,0.1-0.9-0.1-1.2-0.6c-0.4-0.6-0.2-1.3,0.4-1.7c0.3-0.2,0.8-0.2,1.1-0.1l27.9-10.8
|
||||
c0.3-0.1,0.6,0,0.7,0.2c0,0,0,0,0,0.1c0.1,0.3,0,0.6-0.3,0.8l-18.1,10l26.9,5c0.3,0.1,0.5,0.4,0.5,0.7c0,0.3-0.3,0.6-0.7,0.5
|
||||
l-27-1.7l14.7,13c0.2,0.2,0.3,0.6,0.1,0.8C165.2,105.7,164.8,105.8,164.5,105.6z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M190.3,137.9L164.4,124c-0.2-0.4-0.6-0.8-1-0.8c-0.7-0.1-1.3,0.4-1.3,1.1c0,0.4,0.1,0.8,0.4,1l3.3,29.8
|
||||
c0,0.3,0.3,0.5,0.6,0.5c0,0,0.1,0,0.1,0c0.3,0,0.6-0.3,0.6-0.6l0.5-20.7l16.8,21.5c0.2,0.3,0.6,0.3,0.8,0.1c0.3-0.2,0.3-0.6,0.2-0.8
|
||||
l-14-23.1l18.3,7c0.3,0.1,0.6,0,0.8-0.3C190.7,138.4,190.6,138.1,190.3,137.9z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M226.3,143.1L202,126.6c-0.5,0.1-0.9-0.1-1.2-0.6c-0.4-0.6-0.2-1.3,0.4-1.7c0.3-0.2,0.8-0.2,1.1-0.1l27.9-10.8
|
||||
c0.3-0.1,0.6,0,0.7,0.2c0,0,0,0,0,0.1c0.1,0.3,0,0.6-0.3,0.8l-18.1,10l26.9,5c0.3,0.1,0.5,0.4,0.5,0.7c0,0.3-0.3,0.6-0.7,0.5
|
||||
l-27-1.7l14.7,13c0.2,0.2,0.3,0.6,0.1,0.8C226.9,143.2,226.5,143.3,226.3,143.1z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M219.2,186.2l-14.3-25.7c0.1-0.5,0-0.9-0.4-1.2c-0.5-0.4-1.3-0.3-1.7,0.2c-0.3,0.3-0.3,0.7-0.2,1.1l-13.3,26.9
|
||||
c-0.1,0.3-0.1,0.6,0.2,0.8c0,0,0,0,0.1,0c0.3,0.2,0.6,0.1,0.8-0.2l11.6-17.1l2.5,27.2c0,0.3,0.3,0.6,0.6,0.6c0.3,0,0.6-0.3,0.6-0.6
|
||||
l0.7-27l11.6,15.8c0.2,0.3,0.6,0.3,0.8,0.2C219.3,186.8,219.4,186.5,219.2,186.2z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M248.4,210l-12.2-26.7c-0.4-0.2-0.7-0.6-0.7-1.1c0-0.7,0.5-1.2,1.2-1.2c0.4,0,0.8,0.2,1,0.5l29.5,5.2
|
||||
c0.3,0.1,0.5,0.3,0.5,0.6c0,0,0,0.1,0,0.1c0,0.3-0.3,0.6-0.6,0.6l-20.7-0.8l20.4,18.2c0.2,0.2,0.3,0.6,0.1,0.8
|
||||
c-0.2,0.3-0.6,0.3-0.8,0.1l-22.2-15.4l5.8,18.7c0.1,0.3-0.1,0.6-0.4,0.8C248.8,210.4,248.5,210.3,248.4,210z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M219.7,246.9l0-29.4c0.3-0.3,0.4-0.8,0.2-1.3c-0.3-0.6-1-0.9-1.6-0.6c-0.4,0.2-0.6,0.5-0.7,0.9l-24.7,17
|
||||
c-0.2,0.2-0.3,0.5-0.2,0.8c0,0,0,0,0,0.1c0.2,0.3,0.5,0.4,0.8,0.2l18.5-9.3l-11,25c-0.1,0.3,0,0.7,0.3,0.8c0.3,0.2,0.7,0,0.8-0.2
|
||||
l13.8-23.2l2.5,19.4c0,0.3,0.3,0.6,0.7,0.5C219.4,247.5,219.7,247.2,219.7,246.9z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M233.8,279.5l1-29.4c-0.3-0.4-0.4-0.9-0.2-1.3c0.3-0.6,1-0.9,1.6-0.6c0.4,0.2,0.6,0.5,0.7,0.9l24.1,17.8
|
||||
c0.2,0.2,0.3,0.5,0.2,0.8c0,0,0,0,0,0.1c-0.2,0.3-0.5,0.4-0.8,0.2l-18.2-9.9l10.2,25.4c0.1,0.3,0,0.7-0.3,0.8
|
||||
c-0.3,0.1-0.7,0-0.8-0.3l-13-23.7l-3.1,19.3c-0.1,0.3-0.3,0.5-0.7,0.5C234.1,280.1,233.8,279.8,233.8,279.5z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M191.6,301.5l9.2-27.9c0.4-0.2,0.7-0.7,0.6-1.2c-0.1-0.7-0.7-1.2-1.3-1.1c-0.4,0-0.8,0.3-0.9,0.6l-28.7,8.5
|
||||
c-0.3,0.1-0.5,0.4-0.4,0.7c0,0,0,0.1,0,0.1c0.1,0.3,0.4,0.5,0.7,0.5l20.5-3.1l-18.3,20.3c-0.2,0.2-0.2,0.6,0,0.8
|
||||
c0.2,0.2,0.6,0.2,0.8,0l20.3-17.8l-3.7,19.2c-0.1,0.3,0.1,0.6,0.5,0.7C191.2,302,191.5,301.8,191.6,301.5z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M192.3,339.3l11.8-26.9c-0.1-0.4,0-0.9,0.3-1.3c0.5-0.5,1.3-0.4,1.7,0.1c0.3,0.3,0.4,0.7,0.3,1.1l15.7,25.5
|
||||
c0.2,0.3,0.1,0.6-0.1,0.8c0,0,0,0-0.1,0.1c-0.3,0.2-0.6,0.1-0.8-0.1l-13.2-16l0,27.3c0,0.3-0.3,0.6-0.6,0.6c-0.3,0-0.6-0.2-0.7-0.5
|
||||
l-3.3-26.8l-10.1,16.8c-0.2,0.3-0.5,0.4-0.8,0.2C192.3,340,192.2,339.6,192.3,339.3z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M155.1,348.4l9.2-27.9c0.4-0.2,0.7-0.7,0.6-1.2c-0.1-0.7-0.7-1.2-1.3-1.1c-0.4,0-0.8,0.3-0.9,0.6l-28.7,8.5
|
||||
c-0.3,0.1-0.5,0.4-0.4,0.7c0,0,0,0.1,0,0.1c0.1,0.3,0.4,0.5,0.7,0.5l20.5-3.1l-18.3,20.3c-0.2,0.2-0.2,0.6,0,0.8
|
||||
c0.2,0.2,0.6,0.2,0.8,0l20.3-17.8l-3.7,19.2c-0.1,0.3,0.1,0.6,0.5,0.7C154.7,348.9,155,348.7,155.1,348.4z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M154,385.9l13.5-26.1c-0.1-0.4,0-0.9,0.4-1.3c0.5-0.4,1.3-0.3,1.7,0.2c0.3,0.3,0.3,0.7,0.2,1.1l14,26.5
|
||||
c0.1,0.3,0.1,0.6-0.2,0.8c0,0,0,0-0.1,0c-0.3,0.2-0.6,0.1-0.8-0.2l-12.1-16.8l-1.8,27.3c0,0.3-0.3,0.6-0.6,0.6
|
||||
c-0.3,0-0.6-0.3-0.6-0.6l-1.5-27l-11.2,16.1c-0.2,0.3-0.6,0.3-0.8,0.2C154,386.5,153.9,386.2,154,385.9z">
|
||||
</path>
|
||||
|
||||
</svg>
|
||||
</div>
|
||||
<div class="hero-static__slider-wrap">
|
||||
<div
|
||||
class="swiper-container hero-static__slider swiper-container-fade swiper-container-initialized swiper-container-horizontal">
|
||||
<div class="swiper-wrapper" style="transition-duration: 0ms;">
|
||||
<div class="swiper-slide hero-static__slide image-border-wrap swiper-slide-active"
|
||||
style="background-image: url(/storage/uploads/2020/02/error_1.webp); width: 1200px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;">
|
||||
</div>
|
||||
<div class="swiper-slide hero-static__slide image-border-wrap swiper-slide-next"
|
||||
style="background-image: url(/storage/uploads/2020/02/error_2.webp); width: 1200px; opacity: 0; transform: translate3d(-1200px, 0px, 0px); transition-duration: 0ms;">
|
||||
</div>
|
||||
<x-front.borders :borders="[
|
||||
'desktop' => [
|
||||
'left' => true,
|
||||
'right' => true,
|
||||
'top' => true,
|
||||
'bottom' => true,
|
||||
],
|
||||
'mobile' => [
|
||||
'left' => true,
|
||||
'right' => true,
|
||||
'top' => true,
|
||||
'bottom' => true,
|
||||
],
|
||||
]" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-static__block-wrapper">
|
||||
<div class="hero-static__block">
|
||||
<h1 class="hero__block-title">{{ __('errors.404.title') }}</h1>
|
||||
<h2 class="hero__block-text description">{{ __('errors.404.description') }}</h2>
|
||||
<a class="hero__block-btn btn arrow-btn" href="/"
|
||||
title="Retour à la page d’accueil">{{ trans('front.back_to_homepage') }}<i
|
||||
class="btn__icon btn__icon_arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="breadcrumbs fw">
|
||||
<div class="breadcrumbs__wrapper wrapper">
|
||||
<span property="itemListElement" typeof="ListItem"><a property="item" title="LDC" href="/"
|
||||
class="home"><span property="name">LDC</span></a>
|
||||
<meta property="position" content="1">
|
||||
</span> > <span class="404 current-item">{{ __('errors.404.title') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -24,16 +24,10 @@
|
|||
'image' => [
|
||||
['url' => $item['image_visual']]
|
||||
],
|
||||
'button' => !empty($item['list_button']) ? [
|
||||
'url' => \App\Models\Document::getAccessModel($item['list_button'][0]['model_document']),
|
||||
'target' => '_blank',
|
||||
'title' => $item['list_button'][0]['string_label'],
|
||||
] : null,
|
||||
'button_icon' => !empty($item['list_button']) ? 'btn__icon_dl' : null
|
||||
];
|
||||
})->toArray();
|
||||
@endphp
|
||||
<x-front.text-block
|
||||
<x-front.text-block
|
||||
:textBlock="[
|
||||
'bg' => '0',
|
||||
'title' => $business['string_title'],
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
@push('scripts')
|
||||
<script nonce="{{ $nonce }}">
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const formId = @json($formId);
|
||||
const initFormCaptcha = () => {
|
||||
const newDiv = document.createElement("div");
|
||||
newDiv.classList.add('g-recaptcha');
|
||||
document.getElementById('r_captcha').appendChild(newDiv);
|
||||
};
|
||||
window.__CN_Recaptcha = function() {
|
||||
initFormCaptcha();
|
||||
(function(d, t) {
|
||||
let g = d.createElement(t),
|
||||
s = d.getElementsByTagName(t)[0];
|
||||
g.src =
|
||||
'https://www.google.com/recaptcha/api.js?render=explicit&onload=__CN_Recaptcha_Loaded';
|
||||
s.parentNode.insertBefore(g, s)
|
||||
}(document, 'script'));
|
||||
};
|
||||
window.__CN_Recaptcha_Reset = function() {
|
||||
document.querySelector('#r_captcha > div')?.remove();
|
||||
};
|
||||
window.__CN_Recaptcha_Loaded = function() {
|
||||
grecaptcha.render(document.querySelector('#r_captcha > div'), {
|
||||
'sitekey': '{{ config('services.google.recaptcha.public') }}'
|
||||
});
|
||||
};
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -1,10 +1,5 @@
|
|||
<form id="contact-form" method="POST" action="{{ route('front.contact.send') }}" inert>
|
||||
@csrf
|
||||
<input type="hidden" name="enumType" value="{{ $enumType }}">
|
||||
|
||||
<div>
|
||||
@include('modules.flash-messages')
|
||||
</div>
|
||||
|
||||
{{ $slot }}
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
@if ($document->is_issuu)
|
||||
<x-front.sections.accordion.document-accordion :document='$document' />
|
||||
@else
|
||||
<a class="posts-list__item list-item-doc" href="/{{ $document['path'] }}" title="{{ $document['name'] }}"
|
||||
<a class="posts-list__item list-item-doc" href="{{ $document['path'] }}" title="{{ $document['name'] }}"
|
||||
download="" style="opacity: 1; transition: 250ms;">
|
||||
{{ $document['name'] }}
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -20,26 +20,22 @@ Téléphone : {{ $data->phone }}
|
|||
@endif
|
||||
|
||||
@if (\App\Enums\Contact\ContactFormType::breeder->equals($data->enumType))
|
||||
@if (is_array($data->typeelevage))
|
||||
Type d'élevage :
|
||||
@foreach($data->typeelevage as $breeding)
|
||||
{{ $breeding->label() }}
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@if (is_array($data->zonegeo))
|
||||
Zone géographique :
|
||||
@foreach($data->zonegeo as $zone)
|
||||
{{ $zone->label() }}
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (\App\Enums\Contact\ContactFormType::restauration->equals($data->enumType))
|
||||
Société : {{ $data->company }}
|
||||
@endif
|
||||
|
||||
@if (is_array($data->type) && \App\Enums\Contact\ContactFormType::restauration->equals($data->enumType) ||
|
||||
@if (\App\Enums\Contact\ContactFormType::restauration->equals($data->enumType) ||
|
||||
\App\Enums\Contact\ContactFormType::export->equals($data->enumType))
|
||||
Type de demande :
|
||||
@foreach($data->type as $t)
|
||||
|
|
|
|||
|
|
@ -30,23 +30,19 @@
|
|||
|
||||
{{-- BREEDER --}}
|
||||
@if (\App\Enums\Contact\ContactFormType::breeder->equals($data->enumType))
|
||||
@if (is_array($data->typeelevage))
|
||||
<p>Type d'élevage : </p>
|
||||
<ul>
|
||||
@foreach ($data->typeelevage as $breeding)
|
||||
<li>{{ $breeding->label() }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
<p>Type d'élevage : </p>
|
||||
<ul>
|
||||
@foreach ($data->typeelevage as $breeding)
|
||||
<li>{{ $breeding->label() }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
@if (is_array($data->zonegeo))
|
||||
<p>Zone géographique : </p>
|
||||
<ul>
|
||||
@foreach ($data->zonegeo as $zone)
|
||||
<li>{{ $zone->label() }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
<p>Zone géographique : </p>
|
||||
<ul>
|
||||
@foreach ($data->zonegeo as $zone)
|
||||
<li>{{ $zone->label() }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
{{-- Restauration, Détaillant --}}
|
||||
|
|
@ -54,7 +50,7 @@
|
|||
<p>Société : {{ $data->company }}</p>
|
||||
@endif
|
||||
|
||||
@if (is_array($data->type) && \App\Enums\Contact\ContactFormType::restauration->equals($data->enumType))
|
||||
@if (\App\Enums\Contact\ContactFormType::restauration->equals($data->enumType))
|
||||
<p>Type de demande : </p>
|
||||
<ul>
|
||||
@foreach ($data->type as $t)
|
||||
|
|
@ -64,7 +60,7 @@
|
|||
@endif
|
||||
|
||||
{{-- Export --}}
|
||||
@if (is_array($data->type) && \App\Enums\Contact\ContactFormType::export->equals($data->enumType) && $data->type)
|
||||
@if (\App\Enums\Contact\ContactFormType::export->equals($data->enumType))
|
||||
<p>Type de demande : </p>
|
||||
<ul>
|
||||
@foreach ($data->type as $t)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
@endif
|
||||
@if (isset($pageFinance))
|
||||
<li id="menu-item-199" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-199">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.finance') }}">{{ $pageFinance->title }}</a>
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.finance') }}">{{ $pageFinance->title }}</a>
|
||||
</li>
|
||||
@endif
|
||||
@if (isset($pageNosMetiers))
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
</li>
|
||||
@endif
|
||||
<li id="menu-item-6108" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-6108">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.nous-contacter') }}">
|
||||
<a href="{{ LaravelLocalization::getLocalizedURL(app()->getLocale(), __('routes.contact_index')) }}">
|
||||
{{ ucfirst(__('front.contact.index')) }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -24,16 +24,17 @@
|
|||
{{-- STYLE --}}
|
||||
@php
|
||||
$styleFiles = [
|
||||
'fonts/stylesheet.css',
|
||||
'css/swiper.min.css',
|
||||
'css/cn-inline-buttons.min.css',
|
||||
'css/jquery.fancybox.min.css',
|
||||
'css/style.css',
|
||||
'css/media.css',
|
||||
'/fonts/stylesheet.css',
|
||||
'/css/swiper.min.css',
|
||||
'/css/cn-inline-buttons.min.css',
|
||||
'/css/jquery.fancybox.min.css',
|
||||
'/css/style.css',
|
||||
'/css/media.css',
|
||||
];
|
||||
@endphp
|
||||
@foreach ($styleFiles as $styleFile)
|
||||
<link href='/assets/{{ $styleFile }}' rel="stylesheet" />
|
||||
<link href='/assets/{{ $styleFile }}' rel="stylesheet">
|
||||
</link>
|
||||
@endforeach
|
||||
@endpush
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@
|
|||
</a>
|
||||
@else
|
||||
<a class="header__logo" href="/" title="logo">
|
||||
<img src="{{ Vite::asset('resources/assets/images/front/logo-en.png') }}" alt="Logo">
|
||||
<img src="/assets/img/logo_en.png" alt="Logo">
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
|
@ -274,7 +274,8 @@
|
|||
@endphp
|
||||
<li id="menu-item-190"
|
||||
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-190 {{ currentMenuItemClass($pageFinanceName) }}">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageFinanceName) }}">{{ $pageFinance->title }}</a>
|
||||
<a
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageFinanceName) }}">{{ $pageFinance->title }}</a>
|
||||
@if ($PageFinancesections)
|
||||
<ul class="sub-menu">
|
||||
@foreach ($PageFinancesections as $key => $item)
|
||||
|
|
|
|||
|
|
@ -3,13 +3,7 @@
|
|||
<div class="header__mobile-nav-button">
|
||||
<span class="header__mobile-nav-button-element"></span>
|
||||
</div>
|
||||
<a class="header__mobile-logo" href="/" title="logo">
|
||||
@if (app()->getLocale() === 'fr')
|
||||
<img src="/assets/img/logo.png" alt="Logo" />
|
||||
@else
|
||||
<img src="{{ Vite::asset('resources/assets/images/front/logo-en.png') }}" alt="Logo" />
|
||||
@endif
|
||||
</a>
|
||||
<a class="header__mobile-logo" href="/" title="logo"><img src="/assets/img/logo.png" alt="Logo" /></a>
|
||||
<div class="header__mobile-icon-block">
|
||||
<div class="header__search-btn"></div>
|
||||
<div class="header__search header-search sub-menu">
|
||||
|
|
@ -38,13 +32,7 @@
|
|||
<div class="mobile-menu__wrapper">
|
||||
<div class="mobile-menu__top">
|
||||
<div class="mobile-menu__close"></div>
|
||||
<div class="mobile-menu__logo">
|
||||
@if (app()->getLocale() === 'fr')
|
||||
<img src="/assets/img/logo.png" alt="Logo" />
|
||||
@else
|
||||
<img src="{{ Vite::asset('resources/assets/images/front/logo-en.png') }}" alt="Logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="mobile-menu__logo"><img src="/assets/img/logo.png" alt="Logo" /></div>
|
||||
</div>
|
||||
<div class="mobile-menu__block mobile-menu__block_main">
|
||||
<ul data-menu="main" class="mobile-menu__level">
|
||||
|
|
@ -107,7 +95,7 @@
|
|||
</li>
|
||||
@endif
|
||||
<li class="mobile-menu__item">
|
||||
<a class="mobile-menu__link" href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.nous-contacter') }}">
|
||||
<a class="mobile-menu__link" href="{{ LaravelLocalization::getLocalizedURL(app()->getLocale(), __('routes.contact_index')) }}">
|
||||
{{ trans('front.contact.index') }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -263,7 +251,6 @@
|
|||
</a>
|
||||
</div>
|
||||
@php
|
||||
$pageNousRejoindreName = sprintf('front.dynamic-pages.%s', $pageNousRejoindre->id_key);
|
||||
$sections = [
|
||||
'list_our_jobs',
|
||||
'list_your_career',
|
||||
|
|
@ -275,21 +262,23 @@
|
|||
];
|
||||
@endphp
|
||||
<ul class="mobile-menu__level">
|
||||
@foreach ($sections as $key => $item)
|
||||
@php $pageNousRejoindreSection = $pageNousRejoindre->content[$item]; @endphp
|
||||
@if ($pageNousRejoindreSection)
|
||||
@php
|
||||
$title = $pageNousRejoindreSection[0]['string_title'];
|
||||
$subtitle = $pageNousRejoindreSection[0]['string_subtitle'];
|
||||
@endphp
|
||||
<li class="mobile-menu__item">
|
||||
<a class="mobile-menu__link"
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageNousRejoindreName) }}#{{ 'rejoin_' . $key }}">
|
||||
{{ Str::ucfirst(Str::lower($title) . ' ' . Str::lower($subtitle)) }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
@if(array_intersect($sections, array_keys($pageNousRejoindre->content)))
|
||||
@foreach ($sections as $key => $item)
|
||||
@if (array_key_exists($item, array_keys($pageNousRejoindre->content)))
|
||||
@php
|
||||
$section = $pageNousRejoindre->content[$item];
|
||||
$title = $section[0]['string_title'];
|
||||
$subtitle = $section[0]['string_subtitle'];
|
||||
@endphp
|
||||
<li class="mobile-menu__item">
|
||||
<a class="mobile-menu__link"
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.nous-rejoindre') }}#{{ 'rejoin_' . $key }}">
|
||||
{{ Str::ucfirst(Str::lower($title) . " " . Str::lower($subtitle)) }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -303,7 +292,6 @@
|
|||
</a>
|
||||
</div>
|
||||
@php
|
||||
$pageFinanceName = sprintf('front.dynamic-pages.%s', $pageFinance->id_key);
|
||||
$sections = [
|
||||
'list_agir_avec_territoires',
|
||||
'list_action_ldc',
|
||||
|
|
@ -315,20 +303,19 @@
|
|||
];
|
||||
@endphp
|
||||
<ul class="mobile-menu__level">
|
||||
@foreach ($sections as $key => $item)
|
||||
@php $pageFinanceSection = $pageFinance->content[$item];@endphp
|
||||
@if ($pageFinanceSection)
|
||||
@php
|
||||
$title = data_get($pageFinanceSection[0], 'string_title');
|
||||
@endphp
|
||||
<li class="mobile-menu__item">
|
||||
<a class="mobile-menu__link"
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageFinanceName) }}#{{ Str::slug($title) }}">
|
||||
{{ $title }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
@if(array_intersect($sections, array_keys($pageFinance->content)))
|
||||
@foreach ($sections as $key => $item)
|
||||
@if (array_key_exists($item, array_keys($pageNousRejoindre->content)))
|
||||
@php $title = $pageFinance->content[$item][0]['string_title']; @endphp
|
||||
<li class="mobile-menu__item">
|
||||
<a class="mobile-menu__link"
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.finance') }}#{{ Str::slug($title) }}">
|
||||
{{ $title }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@php $FinanceChildPages = $pageFinance->childPages->where('status', \App\Enums\DynamicPages\PageStatusEnum::published); @endphp
|
||||
@if ($FinanceChildPages->count())
|
||||
<p class="menu-mobile-message">
|
||||
|
|
|
|||
|
|
@ -1,39 +1,29 @@
|
|||
<div class="form__row">
|
||||
@if (\App\Enums\Contact\ContactFormType::press->equals($contactFormType))
|
||||
|
||||
<div class="form__row">
|
||||
@if (\App\Enums\Contact\ContactFormType::press->equals($contactFormType))
|
||||
<div class="form__field">
|
||||
<label class="form__field-pseudolabel">
|
||||
<input type="checkbox" name="newsletter" value="1">
|
||||
<span class="form__field-pseudosquare">{{ __('front.inputs.newsletter.label') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="form__field">
|
||||
<label class="form__field-pseudolabel">
|
||||
<input type="checkbox" name="newsletter" value="1">
|
||||
<span class="form__field-pseudosquare">{{ __('front.inputs.newsletter.label') }}</span>
|
||||
</label>
|
||||
<span class="form__field-label-text">{{ __('front.contact.info_personal_data') }}
|
||||
<br> <a href="/politique-de-confidentialite/" target="_blank"
|
||||
rel="noreferer noopener">{{ __('front.contact.confidentiality') }}</a></span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="form__field">
|
||||
<span class="form__field-label-text">{{ __('front.contact.info_personal_data') }}
|
||||
<br> <a href="/politique-de-confidentialite/" target="_blank"
|
||||
rel="noreferer noopener">{{ __('front.contact.confidentiality') }}</a></span>
|
||||
<div class="form__field">
|
||||
<div class="form__tip">* {{ ucfirst(__('front.required_field')) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form__field">
|
||||
<div class="form__tip">* {{ ucfirst(__('front.required_field')) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- RECAPTCHA --}}
|
||||
<div>
|
||||
@if ($errors->has('g-recaptcha-response'))
|
||||
<div class="error-recaptcha">
|
||||
<span>{{ $errors->first('g-recaptcha-response') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
<div id="r_captcha"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form__row">
|
||||
<div class="form-submit">
|
||||
<input data-sitekey="{{ config('services.google.recaptcha.public') }}" type="submit"
|
||||
value="{{ ucfirst(__('front.buttons.send')) }}" class="form-submit__btn btn">
|
||||
<input type="submit" value="{{ ucfirst(__('front.buttons.send')) }}" class="form-submit__btn btn">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,10 +28,7 @@
|
|||
@endif
|
||||
|
||||
@include('front.pages.contact.partials.form-footer')
|
||||
|
||||
</x-front.pages.contact.form-wrapper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<x-front.pages.contact.contact-form-script formId="contact-form" />
|
||||
|
|
|
|||
|
|
@ -58,5 +58,3 @@
|
|||
|
||||
</div>
|
||||
</x-front.pages.contact.form-wrapper>
|
||||
|
||||
<x-front.pages.contact.contact-form-script formId="contact-form" />
|
||||
|
|
|
|||
|
|
@ -5,150 +5,12 @@
|
|||
|
||||
@section('content')
|
||||
|
||||
<div class="page-error">
|
||||
<div class="hero-static fw">
|
||||
<div class="hero-static__wrapper wrapper">
|
||||
<div class="lapki">
|
||||
<svg version="1.1" id="Pattes" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 268.8 400"
|
||||
style="enable-background:new 0 0 268.8 400;" xml:space="preserve">
|
||||
<path class="st1"
|
||||
d="M28.2,20.4L5.3,2C5.2,1.6,4.9,1.2,4.4,1C3.7,0.9,3.1,1.2,2.9,1.9C2.8,2.3,2.9,2.7,3.1,3L1,32.9
|
||||
c0,0.3,0.2,0.6,0.5,0.6c0,0,0.1,0,0.1,0c0.3,0,0.6-0.2,0.7-0.5l4.3-20.2L19.2,37c0.2,0.3,0.5,0.4,0.8,0.3c0.3-0.1,0.4-0.5,0.3-0.8
|
||||
l-9.5-25.3l16.7,10.2c0.3,0.2,0.6,0.1,0.8-0.2C28.5,21,28.5,20.6,28.2,20.4z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M62.4,33.9L42.7,12.1c-0.5,0-0.9-0.3-1-0.8c-0.2-0.6,0.1-1.3,0.8-1.5c0.4-0.1,0.8-0.1,1.1,0.2L73.2,6
|
||||
c0.3,0,0.6,0.1,0.7,0.4c0,0,0,0.1,0,0.1c0.1,0.3-0.1,0.6-0.4,0.7l-19.9,5.5l24.9,11.2c0.3,0.1,0.4,0.5,0.3,0.8
|
||||
C78.7,25,78.3,25.1,78,25l-25.8-8l11.2,16.1c0.2,0.3,0.1,0.6-0.1,0.8C63,34.2,62.6,34.1,62.4,33.9z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M79.2,66.3l-27-11.7c-0.2-0.4-0.6-0.7-1.1-0.7c-0.7,0-1.2,0.5-1.2,1.2c0,0.4,0.2,0.8,0.5,1l5.9,29.4
|
||||
c0.1,0.3,0.3,0.5,0.6,0.5c0,0,0.1,0,0.1,0c0.3,0,0.6-0.3,0.5-0.7l-1.2-20.6l18.6,20c0.2,0.2,0.6,0.3,0.8,0.1
|
||||
c0.3-0.2,0.3-0.6,0.1-0.8L60,62l18.8,5.4c0.3,0.1,0.6-0.1,0.8-0.4C79.7,66.7,79.5,66.4,79.2,66.3z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M114.7,67.6L89.3,52.7c-0.5,0.1-0.9-0.1-1.2-0.5c-0.4-0.5-0.3-1.3,0.3-1.7c0.3-0.2,0.7-0.3,1.1-0.2l27.2-12.6
|
||||
c0.3-0.1,0.6,0,0.8,0.2c0,0,0,0,0,0.1c0.2,0.3,0.1,0.6-0.2,0.8L99.8,50l27.1,3.2c0.3,0,0.6,0.3,0.5,0.7c0,0.3-0.3,0.6-0.6,0.6
|
||||
l-27,0.1l15.5,12c0.3,0.2,0.3,0.6,0.1,0.8C115.3,67.7,114.9,67.7,114.7,67.6z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M128.3,100.5l-25.9-13.9c-0.2-0.4-0.6-0.8-1-0.8c-0.7-0.1-1.3,0.4-1.3,1.1c0,0.4,0.1,0.8,0.4,1l3.3,29.8
|
||||
c0,0.3,0.3,0.5,0.6,0.5c0,0,0.1,0,0.1,0c0.3,0,0.6-0.3,0.6-0.6l0.5-20.7l16.8,21.5c0.2,0.3,0.6,0.3,0.8,0.1c0.3-0.2,0.3-0.6,0.2-0.8
|
||||
l-14-23.1l18.3,7c0.3,0.1,0.6,0,0.8-0.3C128.7,101,128.6,100.6,128.3,100.5z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M164.5,105.6l-24.3-16.5c-0.5,0.1-0.9-0.1-1.2-0.6c-0.4-0.6-0.2-1.3,0.4-1.7c0.3-0.2,0.8-0.2,1.1-0.1l27.9-10.8
|
||||
c0.3-0.1,0.6,0,0.7,0.2c0,0,0,0,0,0.1c0.1,0.3,0,0.6-0.3,0.8l-18.1,10l26.9,5c0.3,0.1,0.5,0.4,0.5,0.7c0,0.3-0.3,0.6-0.7,0.5
|
||||
l-27-1.7l14.7,13c0.2,0.2,0.3,0.6,0.1,0.8C165.2,105.7,164.8,105.8,164.5,105.6z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M190.3,137.9L164.4,124c-0.2-0.4-0.6-0.8-1-0.8c-0.7-0.1-1.3,0.4-1.3,1.1c0,0.4,0.1,0.8,0.4,1l3.3,29.8
|
||||
c0,0.3,0.3,0.5,0.6,0.5c0,0,0.1,0,0.1,0c0.3,0,0.6-0.3,0.6-0.6l0.5-20.7l16.8,21.5c0.2,0.3,0.6,0.3,0.8,0.1c0.3-0.2,0.3-0.6,0.2-0.8
|
||||
l-14-23.1l18.3,7c0.3,0.1,0.6,0,0.8-0.3C190.7,138.4,190.6,138.1,190.3,137.9z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M226.3,143.1L202,126.6c-0.5,0.1-0.9-0.1-1.2-0.6c-0.4-0.6-0.2-1.3,0.4-1.7c0.3-0.2,0.8-0.2,1.1-0.1l27.9-10.8
|
||||
c0.3-0.1,0.6,0,0.7,0.2c0,0,0,0,0,0.1c0.1,0.3,0,0.6-0.3,0.8l-18.1,10l26.9,5c0.3,0.1,0.5,0.4,0.5,0.7c0,0.3-0.3,0.6-0.7,0.5
|
||||
l-27-1.7l14.7,13c0.2,0.2,0.3,0.6,0.1,0.8C226.9,143.2,226.5,143.3,226.3,143.1z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M219.2,186.2l-14.3-25.7c0.1-0.5,0-0.9-0.4-1.2c-0.5-0.4-1.3-0.3-1.7,0.2c-0.3,0.3-0.3,0.7-0.2,1.1l-13.3,26.9
|
||||
c-0.1,0.3-0.1,0.6,0.2,0.8c0,0,0,0,0.1,0c0.3,0.2,0.6,0.1,0.8-0.2l11.6-17.1l2.5,27.2c0,0.3,0.3,0.6,0.6,0.6c0.3,0,0.6-0.3,0.6-0.6
|
||||
l0.7-27l11.6,15.8c0.2,0.3,0.6,0.3,0.8,0.2C219.3,186.8,219.4,186.5,219.2,186.2z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M248.4,210l-12.2-26.7c-0.4-0.2-0.7-0.6-0.7-1.1c0-0.7,0.5-1.2,1.2-1.2c0.4,0,0.8,0.2,1,0.5l29.5,5.2
|
||||
c0.3,0.1,0.5,0.3,0.5,0.6c0,0,0,0.1,0,0.1c0,0.3-0.3,0.6-0.6,0.6l-20.7-0.8l20.4,18.2c0.2,0.2,0.3,0.6,0.1,0.8
|
||||
c-0.2,0.3-0.6,0.3-0.8,0.1l-22.2-15.4l5.8,18.7c0.1,0.3-0.1,0.6-0.4,0.8C248.8,210.4,248.5,210.3,248.4,210z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M219.7,246.9l0-29.4c0.3-0.3,0.4-0.8,0.2-1.3c-0.3-0.6-1-0.9-1.6-0.6c-0.4,0.2-0.6,0.5-0.7,0.9l-24.7,17
|
||||
c-0.2,0.2-0.3,0.5-0.2,0.8c0,0,0,0,0,0.1c0.2,0.3,0.5,0.4,0.8,0.2l18.5-9.3l-11,25c-0.1,0.3,0,0.7,0.3,0.8c0.3,0.2,0.7,0,0.8-0.2
|
||||
l13.8-23.2l2.5,19.4c0,0.3,0.3,0.6,0.7,0.5C219.4,247.5,219.7,247.2,219.7,246.9z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M233.8,279.5l1-29.4c-0.3-0.4-0.4-0.9-0.2-1.3c0.3-0.6,1-0.9,1.6-0.6c0.4,0.2,0.6,0.5,0.7,0.9l24.1,17.8
|
||||
c0.2,0.2,0.3,0.5,0.2,0.8c0,0,0,0,0,0.1c-0.2,0.3-0.5,0.4-0.8,0.2l-18.2-9.9l10.2,25.4c0.1,0.3,0,0.7-0.3,0.8
|
||||
c-0.3,0.1-0.7,0-0.8-0.3l-13-23.7l-3.1,19.3c-0.1,0.3-0.3,0.5-0.7,0.5C234.1,280.1,233.8,279.8,233.8,279.5z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M191.6,301.5l9.2-27.9c0.4-0.2,0.7-0.7,0.6-1.2c-0.1-0.7-0.7-1.2-1.3-1.1c-0.4,0-0.8,0.3-0.9,0.6l-28.7,8.5
|
||||
c-0.3,0.1-0.5,0.4-0.4,0.7c0,0,0,0.1,0,0.1c0.1,0.3,0.4,0.5,0.7,0.5l20.5-3.1l-18.3,20.3c-0.2,0.2-0.2,0.6,0,0.8
|
||||
c0.2,0.2,0.6,0.2,0.8,0l20.3-17.8l-3.7,19.2c-0.1,0.3,0.1,0.6,0.5,0.7C191.2,302,191.5,301.8,191.6,301.5z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M192.3,339.3l11.8-26.9c-0.1-0.4,0-0.9,0.3-1.3c0.5-0.5,1.3-0.4,1.7,0.1c0.3,0.3,0.4,0.7,0.3,1.1l15.7,25.5
|
||||
c0.2,0.3,0.1,0.6-0.1,0.8c0,0,0,0-0.1,0.1c-0.3,0.2-0.6,0.1-0.8-0.1l-13.2-16l0,27.3c0,0.3-0.3,0.6-0.6,0.6c-0.3,0-0.6-0.2-0.7-0.5
|
||||
l-3.3-26.8l-10.1,16.8c-0.2,0.3-0.5,0.4-0.8,0.2C192.3,340,192.2,339.6,192.3,339.3z">
|
||||
</path>
|
||||
<path class="st1"
|
||||
d="M155.1,348.4l9.2-27.9c0.4-0.2,0.7-0.7,0.6-1.2c-0.1-0.7-0.7-1.2-1.3-1.1c-0.4,0-0.8,0.3-0.9,0.6l-28.7,8.5
|
||||
c-0.3,0.1-0.5,0.4-0.4,0.7c0,0,0,0.1,0,0.1c0.1,0.3,0.4,0.5,0.7,0.5l20.5-3.1l-18.3,20.3c-0.2,0.2-0.2,0.6,0,0.8
|
||||
c0.2,0.2,0.6,0.2,0.8,0l20.3-17.8l-3.7,19.2c-0.1,0.3,0.1,0.6,0.5,0.7C154.7,348.9,155,348.7,155.1,348.4z">
|
||||
</path>
|
||||
|
||||
<path class="st1"
|
||||
d="M154,385.9l13.5-26.1c-0.1-0.4,0-0.9,0.4-1.3c0.5-0.4,1.3-0.3,1.7,0.2c0.3,0.3,0.3,0.7,0.2,1.1l14,26.5
|
||||
c0.1,0.3,0.1,0.6-0.2,0.8c0,0,0,0-0.1,0c-0.3,0.2-0.6,0.1-0.8-0.2l-12.1-16.8l-1.8,27.3c0,0.3-0.3,0.6-0.6,0.6
|
||||
c-0.3,0-0.6-0.3-0.6-0.6l-1.5-27l-11.2,16.1c-0.2,0.3-0.6,0.3-0.8,0.2C154,386.5,153.9,386.2,154,385.9z">
|
||||
</path>
|
||||
|
||||
</svg>
|
||||
</div>
|
||||
<div class="hero-static__slider-wrap">
|
||||
<div
|
||||
class="swiper-container hero-static__slider swiper-container-fade swiper-container-initialized swiper-container-horizontal">
|
||||
<div class="swiper-wrapper" style="transition-duration: 0ms;">
|
||||
<div class="swiper-slide hero-static__slide image-border-wrap swiper-slide-active"
|
||||
style="background-image: url(/storage/uploads/2020/02/error_1.webp); width: 1200px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;">
|
||||
</div>
|
||||
<div class="swiper-slide hero-static__slide image-border-wrap swiper-slide-next"
|
||||
style="background-image: url(/storage/uploads/2020/02/error_2.webp); width: 1200px; opacity: 0; transform: translate3d(-1200px, 0px, 0px); transition-duration: 0ms;">
|
||||
</div>
|
||||
<x-front.borders :borders="[
|
||||
'desktop' => [
|
||||
'left' => true,
|
||||
'right' => true,
|
||||
'top' => true,
|
||||
'bottom' => true,
|
||||
],
|
||||
'mobile' => [
|
||||
'left' => true,
|
||||
'right' => true,
|
||||
'top' => true,
|
||||
'bottom' => true,
|
||||
],
|
||||
]" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-static__block-wrapper">
|
||||
<div class="hero-static__block">
|
||||
<h1 class="hero__block-title">{{ __("errors.$status.title") }}</h1>
|
||||
<h2 class="hero__block-text description">{{ __("errors.$status.description") }}</h2>
|
||||
<a class="hero__block-btn btn arrow-btn" href="/"
|
||||
title="Retour à la page d’accueil">{{ trans('front.back_to_homepage') }}<i
|
||||
class="btn__icon btn__icon_arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="breadcrumbs fw">
|
||||
<div class="breadcrumbs__wrapper wrapper">
|
||||
<span property="itemListElement" typeof="ListItem"><a property="item" title="LDC" href="/"
|
||||
class="home"><span property="name">LDC</span></a>
|
||||
<meta property="position" content="1">
|
||||
</span> > <span class="404 current-item">{{ __("errors.$status.title") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if ($status === 404)
|
||||
<x-front.page-404 />
|
||||
@else
|
||||
<h1>{{ sprintf('%s - %s', $status, trans("errors.$status.title")) }}</h1>
|
||||
<p>{{ trans("errors.$status.description") }}</p>
|
||||
<a href="/">{{ trans('front.back_to_homepage') }}</a>
|
||||
@endif
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -94,13 +94,7 @@
|
|||
@endphp
|
||||
@endforeach
|
||||
@foreach ($sections as $section)
|
||||
|
||||
@if ($section['title'] === 'banner')
|
||||
@include('front.pages.partial.bea-banner')
|
||||
@break
|
||||
@else
|
||||
<x-front.text-block :textBlock="$section" />
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
{{-- Sections numbers --}}
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
<div id="bea-banner" class="flex f-poppins">
|
||||
|
||||
<div class="w-14 flex-none">
|
||||
<img src="{{ Vite::asset('resources/assets/images/front/logo_bea.svg') }}" alt="{{ __('Logo BEA') }}" title="{{ __('Logo BEA') }}"/>
|
||||
|
||||
<p>{!! clean(__('Retrouvez nos engagements sur :linkUrl', [
|
||||
'linkUrl' => '<a href="https://www.bienetreanimal.fr" title="Site Bien Etre Animal" target="_blank" rel="noopener nofollow">www.bienetreanimal.fr</a> '
|
||||
])) !!}</p>
|
||||
</div>
|
||||
<div class="w-64 flex-initial">
|
||||
<h3>
|
||||
<span>{{ __('LDC') }}</span><br>
|
||||
<span class="uppercase">{{ __('Entreprise adhérente au collectif') }}</span>
|
||||
<img src="{{ Vite::asset('resources/assets/images/front/coeur.svg') }}" alt="{{ __('coeur') }}" title="{{ __('coeur') }}"/><br>
|
||||
<span class="uppercase">{{ __('Fillière Agricole Engagée pour élever le Bien-être Animal') }}</span><br>
|
||||
</h3>
|
||||
<p>
|
||||
<span>{{ __('Du poulet 100% origine France') }}</span><br>
|
||||
<span>{{ __('élevé dans le') }}</span>
|
||||
<span class="uppercase">{{ __('respect du bien-être animal') }}</span><br>
|
||||
<span>{{ __('par une') }}</span>
|
||||
<span class="uppercase">{{ __('filière agricole engagée') }}</span><br>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
@if (!request()->routeIs('login'))
|
||||
@if ($message = session()->get('success', session()->get('bo.success')))
|
||||
<div class="alert alert-success alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button class="btn-close" data-bs-dismiss="alert" type="button" aria-label="{{ __('Fermer') }}"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = session()->get('error', session()->get('bo.error')))
|
||||
<div class="alert alert-danger alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-xmark"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button class="btn-close" data-bs-dismiss="alert" type="button" aria-label="{{ __('Fermer') }}"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = session()->get('warning', session()->get('bo.warning')))
|
||||
<div class="alert alert-warning alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-exclamation"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button class="btn-close" data-bs-dismiss="alert" type="button" aria-label="{{ __('Fermer') }}"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = session()->get('status', session()->get('bo.status')))
|
||||
<div class="alert alert-info alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-info"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button class="btn-close" data-bs-dismiss="alert" type="button" aria-label="{{ __('Fermer') }}"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = session()->get('info', session()->get('bo.info')))
|
||||
<div class="alert alert-info alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-info"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button class="btn-close" data-bs-dismiss="alert" type="button" aria-label="{{ __('Fermer') }}"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (isset($errors) && $errors->any())
|
||||
<div class="custom-alert-danger" role="alert">
|
||||
<p class="alert-title">
|
||||
<i class="fa-solid fa-circle-exclamation"></i>
|
||||
Liste des erreurs :
|
||||
</p>
|
||||
|
||||
@if ($errors->any())
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
11
resources/views/vendor/cn-cookies.blade.php
vendored
|
|
@ -1,12 +1,11 @@
|
|||
{{-- blade-formatter-disable --}}
|
||||
@php
|
||||
|
||||
$site_name = str(config('app.name'))->ucFirst();
|
||||
$logo_picture_url = app()->getLocale() === 'fr' ?
|
||||
'/assets/img/logo.png' :
|
||||
Vite::asset('resources/assets/images/front/logo-en.png');
|
||||
$logo_title_text = __('Logo du site :name', ['name' => $site_name]);
|
||||
$logo_alt_text = __('Logo :name', ['name' => $site_name]);
|
||||
$site_name = str(config('app.name'))->ucFirst();
|
||||
$logo_picture_url = '/assets/img/logo.png';
|
||||
// $logo_picture_url = Vite::asset('resources/assets/images/legaulois-logo.png');
|
||||
$logo_title_text = __('Logo du site :name', ['name' => $site_name]);
|
||||
$logo_alt_text = __('Logo :name', ['name' => $site_name]);
|
||||
|
||||
$strings = (object)[
|
||||
'modal_title' => __('cookie-notice.modal_title'),
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Api\CompanyController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/companies', [CompanyController::class, 'getCompanies']);
|
||||
|
|
@ -14,15 +14,14 @@ use App\Http\Controllers\Back\NewsCategoryController;
|
|||
use App\Http\Controllers\Back\NewsController;
|
||||
use App\Http\Controllers\Back\NewsTagController;
|
||||
use App\Http\Controllers\Back\PageConfigController;
|
||||
use App\Http\Controllers\Back\AuthenticatedSessionController;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Inertia\Inertia;
|
||||
use Uwil\LaravelBackend\Controllers\AuthenticatedSessionController;
|
||||
use Uwil\LaravelBackend\Controllers\UserController;
|
||||
use Uwil\LaravelCommon\Controllers\Controller;
|
||||
|
||||
Route::prefix('admin')
|
||||
->middleware(['admin-secure'])
|
||||
->name('back.')
|
||||
->group(function () {
|
||||
Route::get('/', fn() => redirect()->route('back.dashboard.index'))->name('redirect.dashboard');
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import path from "path";
|
|||
import react from '@vitejs/plugin-react';
|
||||
import eslint from 'vite-plugin-eslint';
|
||||
import stylelint from "vite-plugin-stylelint";
|
||||
import glob from "glob";
|
||||
|
||||
const env = loadEnv("r", process.cwd(), "");
|
||||
const debugMode = env["APP_DEBUG"] === "true";
|
||||
|
|
@ -18,8 +17,7 @@ export default defineConfig({
|
|||
'resources/ts/back/app.tsx',
|
||||
'resources/sass/back/app.scss',
|
||||
// FRONT
|
||||
'resources/ts/front/app.ts',
|
||||
...glob.sync('resources/assets/images/front/**/*.{jpg,png,jpeg}'),
|
||||
'resources/ts/front/app.ts'
|
||||
],
|
||||
refresh: true,
|
||||
}),
|
||||
|
|
|
|||