diff --git a/.env.example b/.env.example index 97541b86..f13c8402 100644 --- a/.env.example +++ b/.env.example @@ -3,7 +3,6 @@ APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://localhost -ASSET_URL=http://localhost LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null @@ -38,26 +37,6 @@ MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS="hello@example.com" MAIL_FROM_NAME="${APP_NAME}" -AWS_ACCESS_KEY_ID= -AWS_SECRET_ACCESS_KEY= -AWS_DEFAULT_REGION=us-east-1 -AWS_BUCKET= -AWS_USE_PATH_STYLE_ENDPOINT=false - -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_HOST= -PUSHER_PORT=443 -PUSHER_SCHEME=https -PUSHER_APP_CLUSTER=mt1 - -VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" -VITE_PUSHER_HOST="${PUSHER_HOST}" -VITE_PUSHER_PORT="${PUSHER_PORT}" -VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" -VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" - # Sentry SENTRY_LARAVEL_DSN= @@ -82,3 +61,10 @@ LDC_WEB_CIDR_MANUAL_ALLOWED_LIST="" MESBR_REF_SITE= MESBR_REF_CAMP= MESBR_ENDPOINT= + +# SAML +SAML2_DEFAULT_TENANT_UUID= +SAML2_SP_CERT_x509= +SAML2_SP_CERT_PRIVATEKEY= +SAML2_CONTACT_TECHNICAL_EMAIL= +SAML2_CONTACT_SUPPORT_EMAIL= diff --git a/app/Console/Commands/FetchDigitalRecruiterOffersCommand.php b/app/Console/Commands/FetchDigitalRecruiterOffersCommand.php index 7fb6b617..65e7be71 100644 --- a/app/Console/Commands/FetchDigitalRecruiterOffersCommand.php +++ b/app/Console/Commands/FetchDigitalRecruiterOffersCommand.php @@ -24,13 +24,11 @@ class FetchDigitalRecruiterOffersCommand extends Command /** * Execute the console command. * - * @return integer + * @return void */ - public function handle() + public function handle(): void { (new FetchDigitalRecruiterOffers())->handle(); $this->info('Offers fetch 👌'); - - return 0; } } diff --git a/app/Console/Commands/FetchMesBrCommand.php b/app/Console/Commands/FetchMesBrCommand.php new file mode 100644 index 00000000..a1ba7763 --- /dev/null +++ b/app/Console/Commands/FetchMesBrCommand.php @@ -0,0 +1,34 @@ +handle(); + $this->info('Discounts fetch 👌'); + } +} diff --git a/app/Console/Commands/TestMail.php b/app/Console/Commands/TestMail.php index 176f35a7..a9bc768a 100644 --- a/app/Console/Commands/TestMail.php +++ b/app/Console/Commands/TestMail.php @@ -26,10 +26,11 @@ class TestMail extends Command * * @return void */ - public function handle() + public function handle(): void { Mail::raw(sprintf('UWIL mail-test from %s %s', \config('app.name'), \config('app.url')), function ($msg) { $msg->to('equipe.web@ldc.fr')->subject('Test Email'); }); + $this->info('Mail send 👌'); } } diff --git a/app/Console/Commands/UserCreate.php b/app/Console/Commands/UserCreate.php index cedc7733..55f64a72 100644 --- a/app/Console/Commands/UserCreate.php +++ b/app/Console/Commands/UserCreate.php @@ -47,13 +47,6 @@ class UserCreate extends Command */ protected $email; - /** - * The password of the new user. - * - * @var string|null - */ - protected $password; - /** * The role of the new user. * @@ -64,9 +57,9 @@ class UserCreate extends Command /** * Execute the console command. * - * @return integer + * @return void */ - public function handle(): int + public function handle(): void { $this->first_name = null; $this->addFirstName(); @@ -77,9 +70,6 @@ class UserCreate extends Command $this->email = null; $this->addEmail(); - $this->password = null; - $this->addPassword(); - $this->role = null; $this->addRole(); @@ -87,7 +77,6 @@ class UserCreate extends Command 'first_name' => $this->first_name, 'last_name' => $this->last_name, 'email' => $this->email, - 'password' => $this->password, 'role' => $this->role, 'published' => true, 'published_at' => Carbon::now(), @@ -95,8 +84,6 @@ class UserCreate extends Command $user->saveOrFail(); $this->info('User created 👌'); - - return 0; } /** @@ -174,22 +161,6 @@ class UserCreate extends Command }; //end while } - /** - * Add a password to the user. - * - * @return void - */ - private function addPassword(): void - { - while ( - ($this->password = $this->secret( - (!\is_null($this->password) ? 'Failed to confirm, ' : '') . 'Type the wanted user password' - )) !== $this->secret('Confirm the password') - ) { - continue; - }; //end while - } - /** * Add a role to the user. * @@ -199,7 +170,7 @@ class UserCreate extends Command { while (is_null($this->role)) { try { - $tmp = $this->choice( + $tmp = $this->choice( 'Select his role', [ Str::ucFirst(RoleEnum::conceptor->label()), @@ -207,8 +178,6 @@ class UserCreate extends Command Str::ucFirst(RoleEnum::visitor->label()) ], Str::ucFirst(RoleEnum::visitor->label()), - $maxAttempts = null, - $allowMultipleSelections = false ); if ($tmp === Str::ucFirst(RoleEnum::conceptor->label())) { $tmp = RoleEnum::conceptor; diff --git a/app/Http/Controllers/Club/HomeController.php b/app/Http/Controllers/Club/HomeController.php index 633255b8..9f75768a 100644 --- a/app/Http/Controllers/Club/HomeController.php +++ b/app/Http/Controllers/Club/HomeController.php @@ -20,6 +20,6 @@ class HomeController extends Controller $discountsTotal = $discountModels->sum('value'); return (auth('club')->check()) ? view('club.pages.home.homepage', compact('newsClubModels', 'discountModels', 'discountsTotal')) - : view('club.pages.home.guest', compact('newsClubModels')); + : view('club.pages.home.guest', compact('newsClubModels', 'discountsTotal')); } } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 744a521d..b0e39a22 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -40,6 +40,12 @@ class Kernel extends HttpKernel \App\Http\Middleware\SecureHeaders::class ], + 'saml' => [ + \App\Http\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \Illuminate\Session\Middleware\StartSession::class, + ], + 'api' => [ 'throttle:40,1', \Illuminate\Routing\Middleware\ThrottleRequests::class . ':api', diff --git a/app/Http/Requests/Bo/Users/StoreUserRequest.php b/app/Http/Requests/Bo/Users/StoreUserRequest.php index 0a9b3235..043e6c70 100644 --- a/app/Http/Requests/Bo/Users/StoreUserRequest.php +++ b/app/Http/Requests/Bo/Users/StoreUserRequest.php @@ -7,7 +7,6 @@ use App\Models\User; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Gate; use Illuminate\Validation\Rules\Enum; -use Illuminate\Validation\Rules\Password; class StoreUserRequest extends FormRequest { @@ -44,14 +43,6 @@ class StoreUserRequest extends FormRequest 'first_name' => 'required|string|min:3|max:255', 'last_name' => 'required|string|min:3|max:255', 'email' => 'required|email:rfc,strict,dns,spoof,filter|unique:users,email', - 'password' => [ - 'required', 'required_with:password_confirmation', 'confirmed', 'max:255', Password::min(8) - ->letters() - ->mixedCase() - ->numbers() - ->symbols() - ->uncompromised() - ], 'role' => ['required', new Enum(RoleEnum::class)], 'published' => 'required|boolean', ]; @@ -68,7 +59,6 @@ class StoreUserRequest extends FormRequest 'first_name' => trans('validation.attributes.first_name'), 'last_name' => trans('validation.attributes.last_name'), 'email' => trans('validation.attributes.email'), - 'password' => trans('validation.attributes.password'), 'role' => trans('validation.attributes.role'), 'published' => trans('validation.custom.publication') ]; diff --git a/app/Http/Requests/Bo/Users/UpdateUserRequest.php b/app/Http/Requests/Bo/Users/UpdateUserRequest.php index 36dbb9bf..47bed913 100644 --- a/app/Http/Requests/Bo/Users/UpdateUserRequest.php +++ b/app/Http/Requests/Bo/Users/UpdateUserRequest.php @@ -4,7 +4,6 @@ namespace App\Http\Requests\Bo\Users; use Illuminate\Support\Facades\Gate; use Illuminate\Validation\Rule; -use Illuminate\Validation\Rules\Password; class UpdateUserRequest extends StoreUserRequest { @@ -32,11 +31,7 @@ class UpdateUserRequest extends StoreUserRequest $this->merge([ 'published' => $authUserModel->getKey() !== $userModel->getKey() ? $this->boolean('published') : - true, - 'password' => $this->input('password') ?? - \optional($this->route('user'))->password, - 'password_confirmation' => $this->input('password_confirmation') ?? - \optional($this->route('user'))->password + true ]); } @@ -52,15 +47,7 @@ class UpdateUserRequest extends StoreUserRequest 'required', 'email:rfc,strict,dns,spoof,filter', Rule::unique('users', 'email')->ignore(\optional($this->route('user'))->getRouteKey()) - ], - 'password' => [ - 'required', 'required_with:password_confirmation', 'confirmed', 'max:255', Password::min(8) - ->letters() - ->mixedCase() - ->numbers() - ->symbols() - ->uncompromised() - ], + ] ]); } } diff --git a/app/Models/StaticPage.php b/app/Models/StaticPage.php index 19c0bd65..3872ceb7 100644 --- a/app/Models/StaticPage.php +++ b/app/Models/StaticPage.php @@ -72,7 +72,7 @@ class StaticPage extends Model }); static::updating(function (self $model) { self::assertTitleIsUnique($model->seo_title, $model->getKey()); - $model->slug = Str::slug($model->seo_title); + $model->slug = Str::slug($model->seo_title ?? $model->title ?? str()->random(20)); if (!is_null($model->picture)) { $model->picture = FileStorageHelper::storeFile($model, $model->picture, true); } @@ -123,8 +123,10 @@ class StaticPage extends Model */ private static function assertTitleIsUnique(string|null $seo_title, ?int $id = null): void { - $table = (new self())->getTable(); - ToolboxHelper::assertFieldIsUnique($table, 'seo_title', $seo_title, $id); - ToolboxHelper::assertFieldIsUnique($table, 'slug', Str::slug($seo_title), $id); + if (!is_null($seo_title)) { + $table = (new self())->getTable(); + ToolboxHelper::assertFieldIsUnique($table, 'seo_title', $seo_title, $id); + ToolboxHelper::assertFieldIsUnique($table, 'slug', Str::slug($seo_title), $id); + } } } diff --git a/app/Models/User.php b/app/Models/User.php index ad44bd52..c41a87b6 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -8,14 +8,14 @@ use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -use Illuminate\Support\Facades\Hash; /** * @property string $first_name Firstname. * @property string $last_name Lastname. * @property string $email Email. - * @property string $password Password. + * @property string $remember_token Remember_token. * @property \App\Enums\Users\RoleEnum $role Role. + * @property \Illuminate\Support\Carbon $last_connection Last_connection. * @property \Illuminate\Support\Carbon $published Published status. * @property \Illuminate\Support\Carbon $published_at Publication status update date. * @property-read \Illuminate\Support\Carbon $created_at Created date. @@ -38,7 +38,6 @@ class User extends Authenticatable 'first_name', 'last_name', 'email', - 'password', 'role', 'published', 'published_at', @@ -50,7 +49,6 @@ class User extends Authenticatable * @var array */ protected $hidden = [ - 'password', 'remember_token', ]; @@ -61,7 +59,7 @@ class User extends Authenticatable */ protected $casts = [ 'role' => RoleEnum::class, - 'email_verified_at' => 'datetime', + 'last_connection' => 'date', 'published' => 'boolean', 'published_at' => 'datetime', ]; @@ -74,7 +72,6 @@ class User extends Authenticatable protected static function booted(): void { static::creating(function (self $model) { - self::updatePassword($model); // * Prevent user elevation privileges throw_if( auth('backend')->user() and auth('backend')->user()->role->value() > $model->role->value(), @@ -82,7 +79,6 @@ class User extends Authenticatable ); }); static::updating(function (self $model) { - self::updatePassword($model); if (optional(auth('backend')->user())->getKey() === $model->getKey()) { \validator( ['published' => $model->published], @@ -97,19 +93,4 @@ class User extends Authenticatable ); }); } - - // * METHODS - - /** - * Update password. - * - * @param self $model - * @return void - */ - private static function updatePassword(self $model): void - { - if (Hash::needsRehash($model->password)) { - $model->password = Hash::make($model->password); - } - } } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 446f0699..546902c0 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -9,6 +9,13 @@ use Illuminate\Auth\Events\PasswordReset; use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; +use Illuminate\Support\Facades\Event; +use App\Models\User; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Session; +use Slides\Saml2\Events\SignedIn; +use Slides\Saml2\Events\SignedOut; class EventServiceProvider extends ServiceProvider { @@ -38,4 +45,49 @@ class EventServiceProvider extends ServiceProvider { return false; } + + /** + * Register any events for your application. + * + * @return void + */ + public function boot() + { + Event::listen('Slides\Saml2\Events\SignedIn', function (SignedIn $event) { + + $messageId = $event->getAuth()->getLastMessageId(); + + $fromCache = Cache::get(config('cache.prefix') . "_saml_message_id_" . $messageId); + if ($fromCache) { + logger()->error( + 'SAML MESSAGE ID HANDLER', + ['error' => 'Message ID : ' . $messageId . " replayed !"] + ); + abort(403); + } else { + Cache::put(config('cache.prefix') . "_saml_message_id_" . $messageId, $messageId, 28800); + // Cache for 8h. + } + + $user = $event->getSaml2User(); + $email = $user->getNameId(); + + $lUser = User::where('email', '=', $email)->first(); + + if (!$lUser) { + abort(403); + } + + Auth::guard('backend')->login($lUser); + session(['sessionIndex' => $user->getSessionIndex()]); + $lUser->last_connection = now(); + $lUser->saveQuietly(); + }); + + //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found + Event::listen('Slides\Saml2\Events\SignedOut', function (SignedOut $event) { + Auth::guard('backend')->logout(); + Session::save(); + }); + } } diff --git a/app/Providers/ViewServiceProvider.php b/app/Providers/ViewServiceProvider.php index a0ed3c59..82dfaa78 100644 --- a/app/Providers/ViewServiceProvider.php +++ b/app/Providers/ViewServiceProvider.php @@ -58,7 +58,7 @@ class ViewServiceProvider extends ServiceProvider Blade::directive('money', function (string $amountVariable) { // phpcs:ignore Generic.Files.LineLength.TooLong - return "format(new Money({$amountVariable}, app('phpMoneyCurrency')))); ?>"; + return "format(new Money({$amountVariable} * 100, app('phpMoneyCurrency')))); ?>"; }); // * Inject menuNodeList diff --git a/composer.json b/composer.json index 292ba477..461e5347 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "uwil/le-gaulois", - "version": "2.0.0", + "version": "2.1.0", "type": "project", "description": "Le Gaulois project.", "support": { @@ -14,6 +14,7 @@ "require": { "php": "^8.3", "ext-bcmath": "*", + "24slides/laravel-saml2": "^2.4", "axlon/laravel-postal-code-validation": "^3.7", "carlos-meneses/laravel-mpdf": "^2.1", "diglactic/laravel-breadcrumbs": "^9.0", diff --git a/composer.lock b/composer.lock index 10d42092..5cd87010 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,83 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "db80cce9d97851f47e3720647bcf6138", + "content-hash": "d9d5353325cde56c23904770ba015a27", "packages": [ + { + "name": "24slides/laravel-saml2", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/24Slides/laravel-saml2.git", + "reference": "85dadba29a54f624c29d06b9a2ba0f00186cf665" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/24Slides/laravel-saml2/zipball/85dadba29a54f624c29d06b9a2ba0f00186cf665", + "reference": "85dadba29a54f624c29d06b9a2ba0f00186cf665", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "illuminate/console": "~5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/database": "~5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "~5.4|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "onelogin/php-saml": "^3.0|^4.0", + "php": ">=7.1", + "ramsey/uuid": "^3.8|^4.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.9", + "phpunit/phpunit": "^7.5|^9.0", + "squizlabs/php_codesniffer": "^2.3" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "Saml2": "Slides\\Saml2\\Facades\\Auth" + }, + "providers": [ + "Slides\\Saml2\\ServiceProvider" + ] + }, + "branch-aliases": { + "dev-master": "2.0.8-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Slides\\Saml2\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Artem Brezhnev", + "email": "brezzhnev@gmail.com" + } + ], + "description": "SAML2 Service Provider integration to your Laravel 5.4+ application, based on OneLogin toolkit", + "homepage": "https://github.com/24slides/laravel-saml2", + "keywords": [ + "SAML2", + "SSO", + "laravel", + "onelogin", + "saml" + ], + "support": { + "issues": "https://github.com/24Slides/laravel-saml2/issues", + "source": "https://github.com/24Slides/laravel-saml2/tree/2.4.0" + }, + "time": "2024-04-13T12:57:36+00:00" + }, { "name": "axlon/laravel-postal-code-validation", "version": "v3.7.0", @@ -3700,6 +3775,70 @@ ], "time": "2024-09-09T07:06:30+00:00" }, + { + "name": "onelogin/php-saml", + "version": "4.2.0", + "source": { + "type": "git", + "url": "https://github.com/SAML-Toolkits/php-saml.git", + "reference": "d3b5172f137db2f412239432d77253ceaaa1e939" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SAML-Toolkits/php-saml/zipball/d3b5172f137db2f412239432d77253ceaaa1e939", + "reference": "d3b5172f137db2f412239432d77253ceaaa1e939", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "robrichards/xmlseclibs": "^3.1" + }, + "require-dev": { + "pdepend/pdepend": "^2.8.0", + "php-coveralls/php-coveralls": "^2.0", + "phploc/phploc": "^4.0 || ^5.0 || ^6.0 || ^7.0", + "phpunit/phpunit": "^9.5", + "sebastian/phpcpd": "^4.0 || ^5.0 || ^6.0 ", + "squizlabs/php_codesniffer": "^3.5.8" + }, + "suggest": { + "ext-curl": "Install curl lib to be able to use the IdPMetadataParser for parsing remote XMLs", + "ext-dom": "Install xml lib", + "ext-openssl": "Install openssl lib in order to handle with x509 certs (require to support sign and encryption)", + "ext-zlib": "Install zlib" + }, + "type": "library", + "autoload": { + "psr-4": { + "OneLogin\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP SAML Toolkit", + "homepage": "https://github.com/SAML-Toolkits/php-saml", + "keywords": [ + "Federation", + "SAML2", + "SSO", + "identity", + "saml" + ], + "support": { + "email": "sixto.martin.garcia@gmail.com", + "issues": "https://github.com/onelogin/SAML-Toolkits/issues", + "source": "https://github.com/onelogin/SAML-Toolkits/" + }, + "funding": [ + { + "url": "https://github.com/SAML-Toolkits", + "type": "github" + } + ], + "time": "2024-05-30T15:10:40+00:00" + }, { "name": "paragonie/random_compat", "version": "v9.99.100", @@ -4845,6 +4984,48 @@ }, "time": "2024-04-13T09:45:55+00:00" }, + { + "name": "robrichards/xmlseclibs", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/robrichards/xmlseclibs.git", + "reference": "f8f19e58f26cdb42c54b214ff8a820760292f8df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/robrichards/xmlseclibs/zipball/f8f19e58f26cdb42c54b214ff8a820760292f8df", + "reference": "f8f19e58f26cdb42c54b214ff8a820760292f8df", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "php": ">= 5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "RobRichards\\XMLSecLibs\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "A PHP library for XML Security", + "homepage": "https://github.com/robrichards/xmlseclibs", + "keywords": [ + "security", + "signature", + "xml", + "xmldsig" + ], + "support": { + "issues": "https://github.com/robrichards/xmlseclibs/issues", + "source": "https://github.com/robrichards/xmlseclibs/tree/3.1.1" + }, + "time": "2020-09-05T13:00:25+00:00" + }, { "name": "sentry/sentry", "version": "4.9.0", diff --git a/config/app.php b/config/app.php index 9c5ea760..c912ba99 100644 --- a/config/app.php +++ b/config/app.php @@ -56,8 +56,6 @@ return [ 'url' => env('APP_URL', 'http://localhost'), - 'asset_url' => env('ASSET_URL'), - /* |-------------------------------------------------------------------------- | Application Timezone diff --git a/config/saml2.php b/config/saml2.php new file mode 100644 index 00000000..7687a41e --- /dev/null +++ b/config/saml2.php @@ -0,0 +1,397 @@ + \Slides\Saml2\Models\Tenant::class, + + /* + |-------------------------------------------------------------------------- + | Use built-in routes + |-------------------------------------------------------------------------- + | + | If "useRoutes" set to true, the package defines five new routes: + | + | Method | URI | Name + | -------|---------------------------------|------------------ + | POST | {routesPrefix}/{uuid}/acs | saml.acs + | GET | {routesPrefix}/{uuid}/login | saml.login + | GET | {routesPrefix}/{uuid}/logout | saml.logout + | GET | {routesPrefix}/{uuid}/metadata | saml.metadata + | GET | {routesPrefix}/{uuid}/sls | saml.sls + | + */ + + 'useRoutes' => true, + + /* + |-------------------------------------------------------------------------- + | Built-in routes prefix + |-------------------------------------------------------------------------- + | + | Here you may define the prefix for built-in routes. + | + */ + + 'routesPrefix' => '/saml2', + + /* + |-------------------------------------------------------------------------- + | Middle groups to use for the SAML routes + |-------------------------------------------------------------------------- + | + | Note, Laravel 5.2 requires a group which includes StartSession + | + */ + + 'routesMiddleware' => ['saml'], + + /* + |-------------------------------------------------------------------------- + | Signature validation + |-------------------------------------------------------------------------- + | + | Set to true if you want to use parameters from $_SERVER to validate the signature. + | + */ + + 'retrieveParametersFromServer' => false, + + /* + |-------------------------------------------------------------------------- + | Login redirection URL. + |-------------------------------------------------------------------------- + | + | The redirection URL after successful login. + | + */ + + 'loginRoute' => '/bo', + + /* + |-------------------------------------------------------------------------- + | Logout redirection URL. + |-------------------------------------------------------------------------- + | + | The redirection URL after successful logout. + | + */ + + 'logoutRoute' => '/bo', + + + /* + |-------------------------------------------------------------------------- + | Login error redirection URL. + |-------------------------------------------------------------------------- + | + | The redirection URL after login failing. + | + */ + + 'errorRoute' => '/bo/login-error', + + /* + |-------------------------------------------------------------------------- + | Strict mode. + |-------------------------------------------------------------------------- + | + | If 'strict' is True, then the PHP Toolkit will reject unsigned + | or unencrypted messages if it expects them signed or encrypted + | Also will reject the messages if not strictly follow the SAML + | standard: Destination, NameId, Conditions... are validated too. + | + */ + + 'strict' => true, + + /* + |-------------------------------------------------------------------------- + | Debug mode. + |-------------------------------------------------------------------------- + | + | When enabled, errors must be printed. + | + */ + + 'debug' => env('SAML2_DEBUG', env('APP_DEBUG', false)), + + /* + |-------------------------------------------------------------------------- + | Whether to use `X-Forwarded-*` headers to determine port/domain/protocol. + |-------------------------------------------------------------------------- + | + | If 'proxyVars' is True, then the Saml lib will trust proxy headers + | e.g X-Forwarded-Proto / HTTP_X_FORWARDED_PROTO. This is useful if + | your application is running behind a load balancer which terminates SSL. + | + */ + + 'proxyVars' => true, + + /* + |-------------------------------------------------------------------------- + | Service Provider configuration. + |-------------------------------------------------------------------------- + | + | General setting of the service provider. + | + */ + + 'sp' => [ + + /* + |-------------------------------------------------------------------------- + | NameID format. + |-------------------------------------------------------------------------- + | + | Specifies constraints on the name identifier to be used to + | represent the requested subject. + | + */ + + 'NameIDFormat' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress', + + /* + |-------------------------------------------------------------------------- + | SP Certificates. + |-------------------------------------------------------------------------- + | + | Usually x509cert and privateKey of the SP are provided by files placed at + | the certs folder. But we can also provide them with the following parameters. + | + */ + + 'x509cert' => env('SAML2_SP_CERT_x509', ''), + 'privateKey' => env('SAML2_SP_CERT_PRIVATEKEY', ''), + + /* + |-------------------------------------------------------------------------- + | Identifier (URI) of the SP entity. + |-------------------------------------------------------------------------- + | + | Leave blank to use the 'saml.metadata' route. + | + */ + + 'entityId' => env('SAML2_SP_ENTITYID', ''), + + /* + |-------------------------------------------------------------------------- + | The Assertion Consumer Service (ACS) URL. + |-------------------------------------------------------------------------- + | + | URL Location where the from the IdP will be returned, using HTTP-POST binding. + | Leave blank to use the 'saml.acs' route. + | + */ + + 'assertionConsumerService' => [ + 'url' => '', + ], + + /* + |-------------------------------------------------------------------------- + | The Single Logout Service URL. + |-------------------------------------------------------------------------- + | + | Specifies info about where and how the message MUST be + | returned to the requester, in this case our SP. + | + | URL Location where the from the IdP will be returned, using HTTP-Redirect binding. + | Leave blank to use the 'saml.sls' route. + | + */ + + 'singleLogoutService' => [ + 'url' => '' + ], + ], + + /* + |-------------------------------------------------------------------------- + | OneLogin security settings. + |-------------------------------------------------------------------------- + | + | + | + */ + + 'security' => [ + + 'signatureAlgorithm' => 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256', + 'digestAlgorithm' => 'http://www.w3.org/2001/04/xmlenc#sha256', + + /* + |-------------------------------------------------------------------------- + | NameId encryption + |-------------------------------------------------------------------------- + | + | Indicates that the nameID of the sent by this SP + | will be encrypted. + | + */ + + 'nameIdEncrypted' => true, + + /* + |-------------------------------------------------------------------------- + | AuthnRequest signage + |-------------------------------------------------------------------------- + | + | Indicates whether the messages sent by + | this SP will be signed. The Metadata of the SP will offer this info + | + */ + + 'authnRequestsSigned' => true, + + /* + |-------------------------------------------------------------------------- + | Logout request signage + |-------------------------------------------------------------------------- + | + | Indicates whether the messages sent by this SP + | will be signed. + | + */ + + 'logoutRequestSigned' => true, + + /* + |-------------------------------------------------------------------------- + | Logout response signage + |-------------------------------------------------------------------------- + | + | Indicates whether the messages sent by this SP + | will be signed. + | + */ + + 'logoutResponseSigned' => true, + + /* + |-------------------------------------------------------------------------- + | Whether need to sign metadata. + |-------------------------------------------------------------------------- + | + | The possible values: + | - false + | - true (use certs) + | - array: + | ``` + | [ + | 'keyFileName' => 'metadata.key', + | 'certFileName' => 'metadata.crt' + | ] + | ``` + | + */ + + 'signMetadata' => true, + + /* + |-------------------------------------------------------------------------- + | Requirement to sign messages. + |-------------------------------------------------------------------------- + | + | Indicates a requirement for the , and + | elements received by this SP to be signed. + | + */ + + 'wantMessagesSigned' => true, + + /* + |-------------------------------------------------------------------------- + | Requirement to sign assertion elements. + |-------------------------------------------------------------------------- + | + | Indicates a requirement for the elements received by + | this SP to be signed. + | + */ + + 'wantAssertionsSigned' => true, + + /* + |-------------------------------------------------------------------------- + | Requirement to encrypt NameID. + |-------------------------------------------------------------------------- + | + | Indicates a requirement for the NameID received by this SP to be encrypted. + | + */ + + 'wantNameIdEncrypted' => false, + + /* + |-------------------------------------------------------------------------- + | Authentication context. + |-------------------------------------------------------------------------- + | + | Set to false and no AuthContext will be sent in the AuthNRequest, + | + | Set true or don't present this parameter and you will get an + | AuthContext 'exact' 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport' + | + | Set an array with the possible auth context values: + | ['urn:oasis:names:tc:SAML:2.0:ac:classes:Password', 'urn:oasis:names:tc:SAML:2.0:ac:classes:X509'] + | + */ + + 'requestedAuthnContext' => true, + ], + + /* + |-------------------------------------------------------------------------- + | Contact information. + |-------------------------------------------------------------------------- + | + | It is recommended to supply a technical and support contacts. + | + */ + + 'contactPerson' => [ + 'technical' => [ + 'givenName' => env('SAML2_CONTACT_TECHNICAL_NAME', env('APP_NAME', 'Technical')), + 'emailAddress' => env('SAML2_CONTACT_TECHNICAL_EMAIL', 'no@reply.com') + ], + 'support' => [ + 'givenName' => env('SAML2_CONTACT_SUPPORT_NAME', env('APP_NAME', 'Support')), + 'emailAddress' => env('SAML2_CONTACT_SUPPORT_EMAIL', 'no@reply.com') + ], + ], + + /* + |-------------------------------------------------------------------------- + | Organization information. + |-------------------------------------------------------------------------- + | + | The info in en_US lang is recommended, add more if required. + | + */ + + 'organization' => [ + 'en-US' => [ + 'name' => env('SAML2_ORGANIZATION_NAME', env('APP_NAME', 'Name')), + 'displayname' => env('SAML2_ORGANIZATION_NAME', env('APP_NAME', 'Name')), + 'url' => env('SAML2_ORGANIZATION_URL', env('APP_URL', 'http://url')) + ], + ], + + /** + * Default tenant UUID + */ + + 'default_tenant_uuid' => env('SAML2_DEFAULT_TENANT_UUID', null) + +]; diff --git a/database/migrations/2024_09_19_084122_alter_users_for_saml.php b/database/migrations/2024_09_19_084122_alter_users_for_saml.php new file mode 100644 index 00000000..797c82f6 --- /dev/null +++ b/database/migrations/2024_09_19_084122_alter_users_for_saml.php @@ -0,0 +1,36 @@ +dropColumn('email_verified_at'); + $table->dropColumn('password'); + $table->date('last_connection')->nullable()->after('role'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->timestamp('email_verified_at')->nullable()->after('email'); + $table->string('password')->after('email_verified_at'); + $table->dropColumn('last_connection'); + }); + } +}; diff --git a/database/migrations/2024_09_20_115443_alter_customers_for_migration.php b/database/migrations/2024_09_20_115443_alter_customers_for_migration.php new file mode 100644 index 00000000..7da48488 --- /dev/null +++ b/database/migrations/2024_09_20_115443_alter_customers_for_migration.php @@ -0,0 +1,32 @@ +string('hashcode')->after('email')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down(): void + { + Schema::table('customers', function (Blueprint $table) { + $table->string('email')->after('hashcode')->change(); + }); + } +}; diff --git a/database/migrations/2024_09_23_092214_alter_tips_recipes_table.php b/database/migrations/2024_09_23_092214_alter_tips_recipes_table.php new file mode 100644 index 00000000..aba71a97 --- /dev/null +++ b/database/migrations/2024_09_23_092214_alter_tips_recipes_table.php @@ -0,0 +1,30 @@ +string('tips', 500)->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * @return void + */ + public function down(): void + { + Schema::table('recipes', function (Blueprint $table) { + $table->string('tips', 500)->nullable(false)->change(); + }); + } +}; diff --git a/manifest.yaml b/manifest.yaml index 70ddc376..cc4757e4 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -7,7 +7,7 @@ data: APP_ENV: "${APP_APP_ENV}" APP_KEY: "${APP_APP_KEY}" APP_DEBUG: "${APP_APP_DEBUG}" - APP_URL: "https://${REDIRECT}${APP_DOMAIN}" + APP_URL: "https://${APP_DOMAIN}" LOG_CHANNEL: "k8s" DB_HOST: "mariadb.common-services" DB_DATABASE: "${APP_DB_DATABASE}" @@ -31,6 +31,11 @@ data: SENTRY_LARAVEL_DSN: "${APP_SENTRY_LARAVEL_DSN}" DIGITAL_RECRUITER_URL: "${APP_DIGITAL_RECRUITER_URL}" LDC_WEB_API_KEY: "${APP_LDC_WEB_API_KEY}" + SAML2_SP_CERT_x509: "${APP_SAML2_SP_CERT_x509}" + SAML2_SP_CERT_PRIVATEKEY: "${APP_SAML2_SP_CERT_PRIVATEKEY}" + SAML2_CONTACT_TECHNICAL_EMAIL: "${APP_SAML2_CONTACT_TECHNICAL_EMAIL}" + SAML2_CONTACT_SUPPORT_EMAIL: "${APP_SAML2_CONTACT_SUPPORT_EMAIL}" + SAML2_DEFAULT_TENANT_UUID: "${APP_SAML2_DEFAULT_TENANT_UUID}" --- apiVersion: v1 @@ -40,7 +45,7 @@ metadata: spec: storageClassName: "csi-cinder-classic" accessModes: - - ReadWriteOnce + - ReadWriteOnce resources: requests: storage: $APP_PVC_SIZE @@ -61,25 +66,25 @@ spec: app: ${CI_PROJECT_PATH_SLUG}-app spec: containers: - - name: ${CI_PROJECT_PATH_SLUG}-container - image: $IMAGE_TAG - envFrom: - - configMapRef: - name: ${CI_PROJECT_PATH_SLUG}-config-map - volumeMounts: - - name: storage - mountPath: /app/srcs/storage + - name: ${CI_PROJECT_PATH_SLUG}-container + image: $IMAGE_TAG + envFrom: + - configMapRef: + name: ${CI_PROJECT_PATH_SLUG}-config-map + volumeMounts: + - name: storage + mountPath: /app/srcs/storage imagePullSecrets: - - name: docker-registry-credentials + - name: docker-registry-credentials securityContext: runAsUser: 33 runAsGroup: 33 fsGroup: 33 fsGroupChangePolicy: "OnRootMismatch" volumes: - - name: storage - persistentVolumeClaim: - claimName: ${CI_PROJECT_PATH_SLUG}-pvc-storage + - name: storage + persistentVolumeClaim: + claimName: ${CI_PROJECT_PATH_SLUG}-pvc-storage --- apiVersion: v1 @@ -90,8 +95,8 @@ spec: selector: app: ${CI_PROJECT_PATH_SLUG}-app ports: - - port: 80 - targetPort: 443 + - port: 80 + targetPort: 443 --- apiVersion: traefik.io/v1alpha1 @@ -100,16 +105,14 @@ metadata: name: ${CI_PROJECT_PATH_SLUG}-ingress-route spec: entryPoints: - - web - - websecure + - web + - websecure routes: - - match: Host(`${APP_DOMAIN}`) || Host(`www.${APP_DOMAIN}`) - kind: Rule - services: - - name: ${CI_PROJECT_PATH_SLUG}-service - port: 80 - middlewares: - - name: redirect-no-www-to-www + - match: Host(`${APP_DOMAIN}`) || Host(`www.${APP_DOMAIN}`) + kind: Rule + services: + - name: ${CI_PROJECT_PATH_SLUG}-service + port: 80 tls: secretName: ${CRT_TLS_NAME} @@ -127,35 +130,35 @@ spec: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - ${CI_PROJECT_PATH_SLUG}-app - topologyKey: "kubernetes.io/hostname" - namespaces: [$KUBE_NAMESPACE] + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - ${CI_PROJECT_PATH_SLUG}-app + topologyKey: "kubernetes.io/hostname" + namespaces: [$KUBE_NAMESPACE] containers: - - name: ${CI_PROJECT_PATH_SLUG}-scheduled - image: $IMAGE_TAG - imagePullPolicy: IfNotPresent - command: - - "php" - args: - - "artisan" - - "schedule:run" - envFrom: - - configMapRef: - name: ${CI_PROJECT_PATH_SLUG}-config-map - volumeMounts: - - name: storage - mountPath: /app/srcs/storage - imagePullSecrets: - - name: docker-registry-credentials - volumes: + - name: ${CI_PROJECT_PATH_SLUG}-scheduled + image: $IMAGE_TAG + imagePullPolicy: IfNotPresent + command: + - "php" + args: + - "artisan" + - "schedule:run" + envFrom: + - configMapRef: + name: ${CI_PROJECT_PATH_SLUG}-config-map + volumeMounts: - name: storage - persistentVolumeClaim: - claimName: ${CI_PROJECT_PATH_SLUG}-pvc-storage + mountPath: /app/srcs/storage + imagePullSecrets: + - name: docker-registry-credentials + volumes: + - name: storage + persistentVolumeClaim: + claimName: ${CI_PROJECT_PATH_SLUG}-pvc-storage securityContext: runAsUser: 33 runAsGroup: 33 diff --git a/resources/assets/images/common/wood-bg-blue.jpg b/resources/assets/images/common/wood-bg-blue.jpg new file mode 100644 index 00000000..59335f58 Binary files /dev/null and b/resources/assets/images/common/wood-bg-blue.jpg differ diff --git a/resources/sass/fo/base/_header-banner.scss b/resources/sass/fo/base/_header-banner.scss index 9aa85ca0..8aee0895 100644 --- a/resources/sass/fo/base/_header-banner.scss +++ b/resources/sass/fo/base/_header-banner.scss @@ -41,7 +41,7 @@ position: absolute; top: -1rem; right: 0; - max-width: 55%; + max-width: 50%; height: 110%; img { @@ -51,6 +51,7 @@ } @include media-breakpoint-up(xxl) { + right: -3rem; max-width: 100%; } diff --git a/resources/sass/fo/pages/breeding/article.scss b/resources/sass/fo/pages/breeding/article.scss index b5788316..a627e200 100644 --- a/resources/sass/fo/pages/breeding/article.scss +++ b/resources/sass/fo/pages/breeding/article.scss @@ -22,32 +22,6 @@ ul { list-style: none; } - - .breeding-article-image-wrapper { - @include media-breakpoint-up(xl) { - position: absolute; - top: -1rem; - right: 2vw; - max-width: 55%; - height: 110%; - transform: translateX(8vw); - - img { - max-width: initial; - min-height: 100%; - } - } - - @include media-breakpoint-up(xxl) { - right: 12vw; - max-width: 45%; - } - - img { - box-shadow: -4px 8px 14px 0 rgb(0 0 0 / 23%); - transform: rotate(2deg); - } - } } } } diff --git a/resources/sass/fo/pages/commitments.scss b/resources/sass/fo/pages/commitments.scss old mode 100755 new mode 100644 index df36b9f3..0c1fbc81 --- a/resources/sass/fo/pages/commitments.scss +++ b/resources/sass/fo/pages/commitments.scss @@ -97,7 +97,7 @@ } .row { - width: 390px; + width: 100%; @include media-breakpoint-up(md) { width: 500px; @@ -413,14 +413,36 @@ } #commitments-banner-text-complex-items { + .banner-title { + color: #000; + + @include media-breakpoint-up(md) { + position: absolute; + color: #fff !important; + } + } + .text-custom-placement { z-index: 1; - transform: translateY(5rem); + + @include media-breakpoint-up(md) { + transform: translateY(5rem); + } } ~#commitments-complex-flex-items .container { padding-top: 6rem !important; } + + .responsive-position { + position: relative; + + + + @include media-breakpoint-up(md) { + position: absolute; + } + } } #commitments-paragraph-with-visual, @@ -429,13 +451,13 @@ .pictogram { top: -3rem; left: -2rem; - width: 8rem; + width: 6rem; &-reversed { top: -3rem; right: -2rem; left: auto; - width: 8rem; + width: 6rem; } } diff --git a/resources/sass/fo/pages/page-des-40-ans.scss b/resources/sass/fo/pages/page-des-40-ans.scss index 3f0dcc4f..2ed57a68 100644 --- a/resources/sass/fo/pages/page-des-40-ans.scss +++ b/resources/sass/fo/pages/page-des-40-ans.scss @@ -9,6 +9,10 @@ min-height: 80vh; overflow-x: hidden; + @include media-breakpoint-up(lg) { + overflow-x: visible; + } + .logo-40 { max-width: calc(100% - 30px); padding-top: 195px; @@ -973,9 +977,9 @@ .bg { &-blue-dark-wood { - background-blend-mode: darken; - background-color: $primary; - background-image: url('@/images/common/wood-bg-big.jpg'); + // background-blend-mode: darken; + // background-color: $primary; + background-image: url('@/images/common/wood-bg-blue.jpg'); background-position: center; background-repeat: no-repeat; background-size: cover; diff --git a/resources/sass/fo/pages/recruitment.scss b/resources/sass/fo/pages/recruitment.scss index b8828ed2..a21c7b29 100644 --- a/resources/sass/fo/pages/recruitment.scss +++ b/resources/sass/fo/pages/recruitment.scss @@ -7,11 +7,17 @@ height: 2rem; } - .swiper-recruitment-offers img { - width: 100%; + .swiper-recruitment-offers { + img { + width: 100%; - @include media-breakpoint-up(md) { - width: 50%; + @include media-breakpoint-up(md) { + width: 50%; + } + } + + .swiper-slide { + height: auto !important; } } } @@ -28,7 +34,7 @@ } } - &-news-corporate{ + &-news-corporate { .swiper-recruitment-news-corporates-pagination { height: 25px; } diff --git a/resources/sass/fo/partials/_product-card.scss b/resources/sass/fo/partials/_product-card.scss index f361a344..af6ddee1 100644 --- a/resources/sass/fo/partials/_product-card.scss +++ b/resources/sass/fo/partials/_product-card.scss @@ -1,4 +1,3 @@ - .product-card { .product-card-tag { top: -5%; @@ -36,6 +35,10 @@ .product-card-bottom-part { top: -1rem; + @include media-breakpoint-up(lg) { + min-height: 8.5rem; + } + .product-card-view-more { margin-bottom: -1rem; } diff --git a/resources/sass/fo/partials/_testimonial-card.scss b/resources/sass/fo/partials/_testimonial-card.scss index 7b96d50f..02c51329 100644 --- a/resources/sass/fo/partials/_testimonial-card.scss +++ b/resources/sass/fo/partials/_testimonial-card.scss @@ -1,7 +1,6 @@ - .testimonial-card { .testimonial-img { - clip-path: polygon(60% .2vw,100% 0,100% calc(100% - .2vw),70% calc(100% - .35vw),40% 100%,0 calc(100% - .2vw),0 .2vw,30% 0); + clip-path: polygon(60% .2vw, 100% 0, 100% calc(100% - .2vw), 70% calc(100% - .35vw), 40% 100%, 0 calc(100% - .2vw), 0 .2vw, 30% 0); &-wrapper { @include media-breakpoint-up(lg) { @@ -36,4 +35,13 @@ min-height: 5rem; } } + + .fa-play { + width: 2rem; + height: 2rem; + } + + .video-link { + cursor: pointer; + } } diff --git a/resources/sass/fo/utilities/_bootstrap-custom.scss b/resources/sass/fo/utilities/_bootstrap-custom.scss index 07fcfbbd..9c4f26ae 100644 --- a/resources/sass/fo/utilities/_bootstrap-custom.scss +++ b/resources/sass/fo/utilities/_bootstrap-custom.scss @@ -24,19 +24,43 @@ .w#{$infix}-25 { width: 25% !important; } + .w#{$infix}-50 { width: 50% !important; } + .w#{$infix}-75 { width: 75% !important; } + .w#{$infix}-100 { width: 100% !important; } + .w#{$infix}-fit { width: fit-content !important; } + .h#{$infix}-25 { + height: 25% !important; + } + + .h#{$infix}-50 { + height: 50% !important; + } + + .h#{$infix}-75 { + height: 75% !important; + } + + .h#{$infix}-100 { + height: 100% !important; + } + + .h#{$infix}-fit { + height: fit-content !important; + } + @each $prop, $unit in (width: vw, height: vh) { @each $size in [25, 50, 75, 100] { .#{$unit}#{$infix}-#{$size} { diff --git a/resources/ts/fo/base/common.ts b/resources/ts/fo/base/common.ts index b3b5acc4..5329a098 100644 --- a/resources/ts/fo/base/common.ts +++ b/resources/ts/fo/base/common.ts @@ -144,7 +144,7 @@ document.addEventListener("DOMContentLoaded", function () { "swiper-recruitment-offers": { modules: [Navigation, Keyboard, Pagination], grabCursor: true, - slidesPerView: 1.3, + slidesPerView: 1, initialSlide: 0, spaceBetween: 10, navigation: { @@ -165,6 +165,7 @@ document.addEventListener("DOMContentLoaded", function () { 576: { slidesPerView: 2, spaceBetween: 25, + slidesPerGroup: 2, }, 768: { slidesPerView: 2, @@ -179,7 +180,7 @@ document.addEventListener("DOMContentLoaded", function () { "swiper-recruitment-jobs": { modules: [Navigation, Keyboard, Pagination], grabCursor: true, - slidesPerView: 1.3, + slidesPerView: 1, centeredSlides: true, spaceBetween: 10, navigation: { @@ -203,15 +204,16 @@ document.addEventListener("DOMContentLoaded", function () { 992: { slidesPerView: 3, initialSlide: 1, + slidesPerGroup: 3 }, }, }, "swiper-recruitment-news-corporates": { modules: [Navigation, Keyboard, Pagination], grabCursor: true, - slidesPerView: 3, - spaceBetween: 1, - slidesPerGroup: 3, + slidesPerView: 1, + spaceBetween: 40, + centerInsufficientSlides: true, navigation: { nextEl: ".swiper-recruitment-news-corporates-button-next", prevEl: ".swiper-recruitment-news-corporates-button-prev", @@ -227,6 +229,16 @@ document.addEventListener("DOMContentLoaded", function () { return ""; }, }, + breakpoints: { + 576: { + slidesPerView: 2, + slidesPerGroup: 2, + }, + 992: { + slidesPerView: 3, + slidesPerGroup: 3, + }, + }, }, "swiper-main-slides": { modules: [Autoplay, Navigation, Keyboard], @@ -283,7 +295,7 @@ document.addEventListener("DOMContentLoaded", function () { "swiper-cards-commitments": { modules: [Navigation], grabCursor: true, - slidesPerView: 1.3, + slidesPerView: 1, navigation: { nextEl: "#swiper-cards-commitments ~ .swiper-cards-commitments-button-next", prevEl: "#swiper-cards-commitments ~ .swiper-cards-commitments-button-prev", @@ -346,9 +358,9 @@ document.addEventListener("DOMContentLoaded", function () { }, }, "swiper-recipes": { - modules: [Navigation], + modules: [Navigation, Pagination], grabCursor: true, - slidesPerView: 1.5, + slidesPerView: 1, centeredSlides: true, spaceBetween: 20, navigation: { @@ -363,6 +375,14 @@ document.addEventListener("DOMContentLoaded", function () { 992: { slidesPerView: 3, centeredSlides: false, + slidesPerGroup: 3, + }, + }, + pagination: { + el: ".swiper-recipe-pagination", + clickable: true, + renderBullet: function (index: number, className: string) { + return ""; }, }, }, @@ -489,7 +509,7 @@ document.addEventListener("DOMContentLoaded", function () { "swiper-cards-breeder-pages": { modules: [Navigation], grabCursor: true, - slidesPerView: 1.3, + slidesPerView: 1, spaceBetween: 40, centerInsufficientSlides: true, navigation: { @@ -546,6 +566,32 @@ document.addEventListener("DOMContentLoaded", function () { document.querySelector("#swiper-videos .swiper-slide-next")?.setAttribute("inert", "true"); }); } + if (swiper.el.id === "swiper-testimonials") { + swiper.on("slideChange", function() { + updateTestimonialVideoModal(swiper.slides[swiper.activeIndex]); + }); + } + } + + function updateTestimonialVideoModal(currentSlide: any) { + const videoLinkElement = currentSlide.querySelector(".video-link") as HTMLAnchorElement; + if (!videoLinkElement) { + return; + } + const videoModal = document.querySelector("#testimonial-video-modal") as HTMLDivElement; + if (!videoModal) { + return; + } + const modalLink = document.querySelector(".video-inlaid") as HTMLAnchorElement; + if (!modalLink) { + return; + } + modalLink.setAttribute("href", String(videoLinkElement.dataset.videoLink)); + const iframe = modalLink.querySelector("iframe"); + if (!iframe) { + return; + } + iframe.setAttribute("src", String(videoLinkElement.dataset.videoLink)); } function eventBtnPlayPause(swiper: Swiper, btnPlayPause: HTMLElement | null) { diff --git a/resources/ts/fo/components/FilterCardsComponent.vue b/resources/ts/fo/components/FilterCardsComponent.vue index c87132ae..10f5a250 100644 --- a/resources/ts/fo/components/FilterCardsComponent.vue +++ b/resources/ts/fo/components/FilterCardsComponent.vue @@ -213,10 +213,10 @@
@@ -245,8 +245,8 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import Swiper from "swiper"; import { Navigation } from "swiper/modules"; -import { defineOptions, nextTick, onMounted, ref, useAttrs, reactive, createApp } from "vue"; import type { App } from "vue"; +import { createApp, defineOptions, nextTick, onMounted, reactive, ref, useAttrs } from "vue"; import route from "../../modules/route"; import trans from "../../modules/trans"; import parseLaravelErrorMessages from "./../../modules/parseLaravelErrorMessages"; diff --git a/resources/ts/fo/components/SearchModelComponent.vue b/resources/ts/fo/components/SearchModelComponent.vue index d03e3f82..0e2024c8 100644 --- a/resources/ts/fo/components/SearchModelComponent.vue +++ b/resources/ts/fo/components/SearchModelComponent.vue @@ -5,11 +5,11 @@ >
-

+

{{ textsParameters.subtitle }}

@@ -319,6 +319,8 @@ const filtersList = ref(null); const childrenList = ref(null); const modelSubtitle = ref(null); const modelDescription = ref(null); +const modelSubtitleMobile = ref(null); +const modelDescriptionMobile = ref(null); // * DATA @@ -457,6 +459,8 @@ function updateTexts(newTitle: string|null = null): void { : filtersDetailsParameters.selectedModel; modelSubtitle.value!.textContent = String(((currentModelSelected !== null) ? currentModelSelected : textsParameters).subtitle); modelDescription.value!.innerHTML = String(((currentModelSelected !== null) ? currentModelSelected : textsParameters).description); + modelSubtitleMobile.value!.textContent = String(((currentModelSelected !== null) ? currentModelSelected : textsParameters).subtitle); + modelDescriptionMobile.value!.innerHTML = String(((currentModelSelected !== null) ? currentModelSelected : textsParameters).description); let parentTitle = (filtersDetailsParameters.selectedChildModel !== null) ? filtersDetailsParameters.selectedModel?.label + ", " : ""; diff --git a/resources/views/bo/auth/login.blade.php b/resources/views/bo/auth/login.blade.php index 00ffa840..6c0e2681 100644 --- a/resources/views/bo/auth/login.blade.php +++ b/resources/views/bo/auth/login.blade.php @@ -15,57 +15,14 @@
{{ __('Connexion') }}
-
- @csrf -
- -
- - @error('email') - - {{ $message }} - - @enderror -
+
+ -
- -
- - @error('password') - - {{ $message }} - - @enderror -
-
-
-
-
- - -
-
-
-
-
- - @if (Route::has('bo.password.request')) - - {{ __('Mot de passe oublié ?') }} - - @endif -
-
- +
diff --git a/resources/views/bo/layouts/head.blade.php b/resources/views/bo/layouts/head.blade.php index a6c3959c..8a18cdfd 100644 --- a/resources/views/bo/layouts/head.blade.php +++ b/resources/views/bo/layouts/head.blade.php @@ -40,7 +40,7 @@ @stack('styles') @if (config('app.debug')) - @endif diff --git a/resources/views/bo/pages/dashboard.blade.php b/resources/views/bo/pages/dashboard.blade.php index afdeff0c..c69881c4 100644 --- a/resources/views/bo/pages/dashboard.blade.php +++ b/resources/views/bo/pages/dashboard.blade.php @@ -8,20 +8,27 @@ @include('modules.breadcrumbs.breadcrumb-body')
-
+
{{ __('Bonjour :first_name :last_name !', [ 'first_name' => auth('backend')->user()->first_name, 'last_name' => auth('backend')->user()->last_name, ]) }}
-

+

{{ __('Bienvenue dans le back-office, où vous pouvez gérer votre application web.') }}

+ {{ __('Pour accéder à vos statistiques') }} : + + {{ __('UWIL Report') }} + + +
{{ __('Pour tout problème ou évolution souhaitée, veuillez nous contacter via notre outil : ') }} - {{ __('Uwil Support') }} + {{ __('UWIL Support') }}

diff --git a/resources/views/bo/pages/discounts/index-list.blade.php b/resources/views/bo/pages/discounts/index-list.blade.php index ee9f8798..617e3734 100644 --- a/resources/views/bo/pages/discounts/index-list.blade.php +++ b/resources/views/bo/pages/discounts/index-list.blade.php @@ -21,7 +21,7 @@ src="{{ $discountModel->mobile_image_available ?? $discountModel->desktop_image_available }}" alt="{{ __('Bon de réduction :name', ['name' => $discountModel->name]) }}"> - @money($discountModel->value * 100) + @money($discountModel->value) {{ $discountModel->updated_at->isoFormat('LLLL') }} diff --git a/resources/views/bo/pages/login-error.blade.php b/resources/views/bo/pages/login-error.blade.php new file mode 100644 index 00000000..afffff46 --- /dev/null +++ b/resources/views/bo/pages/login-error.blade.php @@ -0,0 +1,22 @@ +@extends('fo.layout') + +@section('title', __('Une erreur est survenue lors de la connexion.')) +@section('description', __('Il semble qu\'il y ait des erreurs pour répondre à votre demande.')) +@section('breadcrumb', 'no') +@section('bodyClass', 'bg-white-wood') + +@section('content') +
+
+
+

{{ str(__('Une erreur est survenue lors de la connexion.'))->upper() }}

+

+ {{ __('Veuillez contacter le support.') }} +

+ + {{ str(__('retour à la page d\'accueil'))->upper() }} + +
+
+
+@endsection diff --git a/resources/views/bo/pages/static_pages/form.blade.php b/resources/views/bo/pages/static_pages/form.blade.php index 1db6ea07..75b2be77 100644 --- a/resources/views/bo/pages/static_pages/form.blade.php +++ b/resources/views/bo/pages/static_pages/form.blade.php @@ -1,7 +1,6 @@ @use('\App\Enums\StaticPageType', 'StaticPageType')
- @if (!$staticPageModel->type->equals(StaticPageType::recipe) && - !$staticPageModel->type->equals(StaticPageType::product)) + @if (!$staticPageModel->type->equals(StaticPageType::recipe) && !$staticPageModel->type->equals(StaticPageType::product)) {{-- SEO_TITLE --}}
@@ -80,9 +79,10 @@
@endif - @if (!$staticPageModel->type->equals(StaticPageType::recipe) && - !$staticPageModel->type->equals(StaticPageType::product) && - !$staticPageModel->type->equals(StaticPageType::home)) + @if ( + !$staticPageModel->type->equals(StaticPageType::recipe) && + !$staticPageModel->type->equals(StaticPageType::product) && + !$staticPageModel->type->equals(StaticPageType::home)) {{-- TITLE --}}
@@ -112,12 +112,13 @@
@endif - @if (!$staticPageModel->type->equals(StaticPageType::recipe) && - !$staticPageModel->type->equals(StaticPageType::product) && - !$staticPageModel->type->equals(StaticPageType::legals) && - !$staticPageModel->type->equals(StaticPageType::confidentiality) && - !$staticPageModel->type->equals(StaticPageType::accessibility) && - !$staticPageModel->type->equals(StaticPageType::selling)) + @if ( + !$staticPageModel->type->equals(StaticPageType::recipe) && + !$staticPageModel->type->equals(StaticPageType::product) && + !$staticPageModel->type->equals(StaticPageType::legals) && + !$staticPageModel->type->equals(StaticPageType::confidentiality) && + !$staticPageModel->type->equals(StaticPageType::accessibility) && + !$staticPageModel->type->equals(StaticPageType::selling)) {{-- SUBTITLE --}}
@@ -142,7 +143,7 @@ 'model' => trans_choice('models.classes.static_page', 1), ]), 'min' => 3, - 'max' => 255, + 'max' => 500, ]), 'placeholder' => __(':field :inter:model', [ 'field' => str(__('validation.custom.subtitle'))->ucfirst(), @@ -155,10 +156,11 @@
@endif - @if (!$staticPageModel->type->equals(StaticPageType::recruitment) && - !$staticPageModel->type->equals(StaticPageType::recipe) && - !$staticPageModel->type->equals(StaticPageType::product) && - !$staticPageModel->type->equals(StaticPageType::home)) + @if ( + !$staticPageModel->type->equals(StaticPageType::recruitment) && + !$staticPageModel->type->equals(StaticPageType::recipe) && + !$staticPageModel->type->equals(StaticPageType::product) && + !$staticPageModel->type->equals(StaticPageType::home)) {{-- CONTENT --}}
@@ -189,15 +191,16 @@
@endif - @if (!$staticPageModel->type->equals(StaticPageType::recipes) && - !$staticPageModel->type->equals(StaticPageType::recipe) && - !$staticPageModel->type->equals(StaticPageType::products) && - !$staticPageModel->type->equals(StaticPageType::product) && - !$staticPageModel->type->equals(StaticPageType::home) && - !$staticPageModel->type->equals(StaticPageType::legals) && - !$staticPageModel->type->equals(StaticPageType::confidentiality) && - !$staticPageModel->type->equals(StaticPageType::accessibility) && - !$staticPageModel->type->equals(StaticPageType::selling)) + @if ( + !$staticPageModel->type->equals(StaticPageType::recipes) && + !$staticPageModel->type->equals(StaticPageType::recipe) && + !$staticPageModel->type->equals(StaticPageType::products) && + !$staticPageModel->type->equals(StaticPageType::product) && + !$staticPageModel->type->equals(StaticPageType::home) && + !$staticPageModel->type->equals(StaticPageType::legals) && + !$staticPageModel->type->equals(StaticPageType::confidentiality) && + !$staticPageModel->type->equals(StaticPageType::accessibility) && + !$staticPageModel->type->equals(StaticPageType::selling)) {{-- PICTURE SECTION --}}
diff --git a/resources/views/bo/pages/users/form.blade.php b/resources/views/bo/pages/users/form.blade.php index 6263982b..142549e3 100644 --- a/resources/views/bo/pages/users/form.blade.php +++ b/resources/views/bo/pages/users/form.blade.php @@ -89,39 +89,6 @@
- {{-- PASSWORD --}} -
-
- {{ __('Mot de passe') }} -
-
- @include('bo.partials.inputs.varchar-password', [ - 'id' => 'userPassword', - 'label' => __('Mot de passe de l\':model', ['model' => __('models.classes.user')]), - 'name' => 'password', - 'hasWordCounter' => true, - 'required' => !$userModel->exists, - 'model' => null, - 'helper' => __( - 'Doît respecter certaines contraintes (8 caractères minimum, lettres, chiffres, caractères spéciaux).'), - ]) -
-
- @include('bo.partials.inputs.varchar-password', [ - 'id' => 'userPassword_confirmation', - 'label' => __('Confirmation du mot de passe de l\':model', [ - 'model' => __('models.classes.user'), - ]), - 'name' => 'password_confirmation', - 'hasWordCounter' => true, - 'required' => !$userModel->exists, - 'model' => null, - 'helper' => __('Doît correspondre au mot de passe saisi précédemment.'), - ]) -
-
-
-
{{-- STATUS --}} @can('changePublished', $userModel)
@@ -145,20 +112,3 @@

{{ __('* Champs obligatoires') }}

- -@push('scripts') - -@endpush diff --git a/resources/views/bo/partials/script-button-clone.blade.php b/resources/views/bo/partials/script-button-clone.blade.php index 14299346..b4b5dbe9 100644 --- a/resources/views/bo/partials/script-button-clone.blade.php +++ b/resources/views/bo/partials/script-button-clone.blade.php @@ -1,5 +1,5 @@ @push('scripts') - @endif diff --git a/resources/views/fo/layouts/main-menu/menu-nodes/breedings.blade.php b/resources/views/fo/layouts/main-menu/menu-nodes/breedings.blade.php index fda8ced3..e8f1670c 100644 --- a/resources/views/fo/layouts/main-menu/menu-nodes/breedings.blade.php +++ b/resources/views/fo/layouts/main-menu/menu-nodes/breedings.blade.php @@ -29,9 +29,7 @@ ], [ 'name' => __('L\'élevage de volailles'), - 'link' => route( - 'fo.breeding.show', - $breedingPages->where('type', \App\Enums\StaticPageType::breedingPoultry)->first()), + 'link' => route('fo.breeding.show', 'slug'), ], [ 'name' => __('Le métier d\'élevage de volailles'), diff --git a/resources/views/fo/pages/breeding/article.blade.php b/resources/views/fo/pages/breeding/article.blade.php index fbbfbcd2..da4be709 100644 --- a/resources/views/fo/pages/breeding/article.blade.php +++ b/resources/views/fo/pages/breeding/article.blade.php @@ -8,35 +8,40 @@ @section('content')
{{-- HEADER --}} -
-
-
-
+
isset($contentAstride) && $contentAstride, + ])> +
+
+
@include('modules.breadcrumbs.breadcrumb-body', ['brParam' => [$staticPageModel, $newsBreedingModel]]) -

{{ $newsBreedingModel->title }}

-
-
-
    -
  • -

    {{ $staticPageModel->title }} -

    -
  • -
  • - @include('fo.partials.button-share', [ - 'link' => route('fo.breeding.article.show', [$staticPageModel, $newsBreedingModel]), - 'elementName' => __('cet article'), - ]) -
  • -
+
+
+

{{ $newsBreedingModel->title }}

+
+
    +
  • +

    {{ $staticPageModel->title }} +

    +
  • +
  • + @include('fo.partials.button-share', [ + 'link' => route('fo.breeding.article.show', [$staticPageModel, $newsBreedingModel]), + 'elementName' => __('cet article'), + ]) +
  • +
+
-
+
{{ $newsBreedingModel->picture_alt }}
-
-
+
+
{{ $newsBreedingModel->picture_alt }}
@@ -44,7 +49,7 @@
-
+

{{ $newsBreedingModel->subtitle }}

diff --git a/resources/views/fo/pages/breeding/index.blade.php b/resources/views/fo/pages/breeding/index.blade.php index 0013532d..158ede20 100644 --- a/resources/views/fo/pages/breeding/index.blade.php +++ b/resources/views/fo/pages/breeding/index.blade.php @@ -20,10 +20,11 @@ 'title' => 'L\'élevage des volailles', 'text' => nl2br( __( - 'Face aux préoccupations des consommateurs sur le bien-être animal, Le Gaulois vous dit tout sur ses :strongStartéleveurs partenaires:strongEnd et ses conditions d:strongStart\'élevages de volailles.:strongEnd Chaque jour, nous collaborons avec les éleveurs partenaires engagés dans la démarche éthique et responsable pour améliorer le confort de nos volailles. Chez les éleveurs partenaires Le Gaulois, la protection animale ne cesse d\'être l\'enjeu majeur.', + 'Face aux préoccupations des consommateurs sur le bien-être animal, Le Gaulois vous dit tout sur ses :strongStartéleveurs partenaires:strongEnd et ses :strongStartconditions d\'élevages de volailles.:strongEnd :br Chaque jour, nous collaborons avec les éleveurs partenaires engagés dans la :strongStartdémarche éthique et responsable:strongEnd pour améliorer le confort de nos volailles. Chez les éleveurs partenaires Le Gaulois, la :strongStartprotection animale:strongEnd ne cesse d\'être l\'enjeu majeur.', [ 'strongStart' => '', 'strongEnd' => '', + 'br' => '
', ])), ]) diff --git a/resources/views/fo/pages/breeding/show.blade.php b/resources/views/fo/pages/breeding/show.blade.php index 3bb10fd8..a00e890e 100644 --- a/resources/views/fo/pages/breeding/show.blade.php +++ b/resources/views/fo/pages/breeding/show.blade.php @@ -33,10 +33,11 @@ 'title' => 'L\'élevage des volailles', 'text' => nl2br( __( - 'Face aux préoccupations des consommateurs sur le bien-être animal, Le Gaulois vous dit tout sur ses :strongStartéleveurs partenaires:strongEnd et ses conditions d:strongStart\'élevages de volailles.:strongEnd Chaque jour, nous collaborons avec les éleveurs partenaires engagés dans la démarche éthique et responsable pour améliorer le confort de nos volailles. Chez les éleveurs partenaires Le Gaulois, la protection animale ne cesse d\'être l\'enjeu majeur.', + 'Face aux préoccupations des consommateurs sur le bien-être animal, Le Gaulois vous dit tout sur ses :strongStartéleveurs partenaires:strongEnd et ses :strongStartconditions d\'élevages de volailles.:strongEnd :br Chaque jour, nous collaborons avec les éleveurs partenaires engagés dans la :strongStartdémarche éthique et responsable:strongEnd pour améliorer le confort de nos volailles. Chez les éleveurs partenaires Le Gaulois, la :strongStartprotection animale:strongEnd ne cesse d\'être l\'enjeu majeur.', [ 'strongStart' => '', 'strongEnd' => '', + 'br' => '
', ])), ])
diff --git a/resources/views/fo/pages/commitments/eat.blade.php b/resources/views/fo/pages/commitments/eat.blade.php index ca3c614a..96f0dcca 100644 --- a/resources/views/fo/pages/commitments/eat.blade.php +++ b/resources/views/fo/pages/commitments/eat.blade.php @@ -129,21 +129,6 @@ 'background_color' => 'white', ]) {{-- PARAGRAPH WITH PICTURE --}} - @php - $newsCategory = new stdClass(); - $newsCategory->title = __('Actu'); - - $newsModel = new stdClass(); - $newsModel->title = __('découvrez notre charte nutritionnelle pour alliers plaisir et santé'); - $newsModel->slug = str($newsModel->title)->slug(); - $newsModel->thumbnail = Vite::asset('resources/assets/images/commitments/pictograms/picto-medications.svg'); - $newsModel->thumbnail_alt = __('Pictogramme de plusieurs médicaments.'); - $newsModel->thumbnail_title = __('Pictogramme d’une diminution de l’utilisation des antibiotiques.'); - $newsModel->date = now()->subDays(rand(0, 31)); - $newsModel->link = 'FIXME: route to the news'; - $newsModel->newsCategory = $newsCategory; - $newsModel->updated_at = now(); - @endphp @include('fo.partials.commitments.paragraph-with-visual', [ 'title' => __('découvrez notre charte nutrionnelle pour allier plaisir et santé'), 'text' => __( @@ -154,7 +139,6 @@ 'picture_alt' => __('Photo d’une famille prenant le repas du midi.'), 'picture_title' => __('Photo d’une famille prenant le repas du midi.'), 'reversedMobile' => true, - 'newsModel' => $newsModel, ]) {{-- BANNER TEXT --}} @php diff --git a/resources/views/fo/pages/commitments/life.blade.php b/resources/views/fo/pages/commitments/life.blade.php index a9e06ccc..84eead52 100644 --- a/resources/views/fo/pages/commitments/life.blade.php +++ b/resources/views/fo/pages/commitments/life.blade.php @@ -125,22 +125,28 @@ ]) {{-- PARAGRAPH WITH PICTURE --}} @php - $newsCategory = new stdClass(); - $newsCategory->title = __('Actu'); - - $newsModel = new stdClass(); - $newsModel->title = __('découvrez notre charte nutritionnelle pour alliers plaisir et santé'); - $newsModel->slug = str($newsModel->title)->slug(); - $newsModel->thumbnail = Vite::asset('resources/assets/images/commitments/pictograms/picto-medications.svg'); - $newsModel->thumbnail_alt = __('Pictogramme de plusieurs médicaments.'); - $newsModel->thumbnail_title = __('Pictogramme d’une diminution de l’utilisation des antibiotiques.'); - $newsModel->date = now()->subDays(rand(0, 31)); - $newsModel->link = 'FIXME: route to the news'; - $newsModel->newsCategory = $newsCategory; - $newsModel->updated_at = now(); + $videoID = '63RGcX7_MCM'; @endphp + @include('fo.partials.commitments.paragraph-with-visual', [ 'title' => __('2021, nos collaborateurs ont du cœur'), + 'isVideoModal' => true, 'text' => nl2br( __( 'Depuis 2021, Le Gaulois soutient l’:strongStartassociation Mécénat Chirurgie Cardiaque:strongEnd pour sauver des enfants en finançant des opérations d’enfants atteint de malformation cardiaque. :strongStartCourse à pied, vélo, marche, randonnée,:strongEnd les kilomètres parcourus sont compilés par une application sportive tout au long de l’année pour récolter un maximum de fonds pour l’association.', @@ -176,13 +182,12 @@ 'strongEnd' => '', ])), 'background_color' => 'light', - 'video_id' => '63RGcX7_MCM', + 'video_id' => $videoID, 'picto' => Vite::asset('resources/assets/images/commitments/common/logo-mecenat.jpg'), 'picto_alt' => __( 'Logo de Mécénat Chirurgie Cardiaque, un soutien aux initiatives culturelles et sociales pour promouvoir la solidarité et l\'engagement'), 'picto_title' => __('Logo de Mécénat Chirurgie Cardiaque, enfant du monde'), 'reversedMobile' => true, - 'newsModel' => $newsModel, ]) {{-- OTHER COMMITMENTS --}} @include('fo.partials.commitments.other-commitments', [ diff --git a/resources/views/fo/pages/commitments/respect.blade.php b/resources/views/fo/pages/commitments/respect.blade.php index 7347ed9e..b2ae7439 100644 --- a/resources/views/fo/pages/commitments/respect.blade.php +++ b/resources/views/fo/pages/commitments/respect.blade.php @@ -107,7 +107,7 @@ 'title' => __('stop à la déforestation, halte au soja non responsable'), 'text' => nl2br( __( - 'Chez Le Gaulois, pour assurer :strongStartl’apport protéique:strongEnd et assurer un équilibre nutritionnel de nos volailles, nous les alimentons avec du soja. C’est la légumineuse la plus riche en protéines et en acides aminés essentiels ! Conscient que la culture du Soja importée est assujettie à de nombreux questionnements, notamment son impact sur la déforestation.', + 'Chez Le Gaulois, pour assurer :strongStartl’apport protéique:strongEnd et assurer un :strongStartéquilibre nutritionnel de nos volailles:strongEnd, nous les alimentons avec du :strongStartsoja:strongEnd. C’est la :strongStartlégumineuse la plus riche en protéines et en acides aminés essentiels !:strongEnd Conscient que la culture du Soja importée est assujettie à de nombreux questionnements, notamment son impact sur la :strongStartdéforestation.:strongEnd', [ 'strongStart' => '', 'strongEnd' => '', @@ -135,11 +135,17 @@ 'Conscient de son rôle, Le Gaulois s ‘est engagé dans une démarche continue de réduction de ses emballages et d’amélioration de leur recyclabilité, tout en garantissant la sécurité alimentaire.') . '
' . __( - '
    Depuis fin 2023, près de 80% de nos emballages sont responsables :
  • soit intégrant de la matière recyclée
  • soit en étant recyclables
') . - __('D’ici fin 2025, nous ambitionnons de passer à près de 95% d’emballages responsables.') . + '
    Depuis fin 2023, près de :strongStart80% de nos emballages sont responsables:strongEnd :
  • soit intégrant de la matière recyclée
  • soit en étant recyclables
', + ['strongStart' => '', 'strongEnd' => '']) . + __( + '

D’ici fin 2025, nous ambitionnons de passer à près de :strongStart95% d’emballages responsables.:strongEnd

', + [ + 'strongStart' => '', + 'strongEnd' => '', + ]) . '
' . __( - ':divStart:image:hgroupStart:strongStartLe saviez-vous ?:strongEnd 100% des emballages cartons Le Gaulois sont déjà issus de cartons recyclés et certifiés FSC, garantissant une gestion responsable des forêts, et plus de 60% des barquettes de volaille Le Gaulois sont recyclables ou intégrant au moins 50% de matière recyclée.:hgroupEnd:divEnd', + ':divStart:image:hgroupStart:strongStartLe saviez-vous ?:strongEnd 100% des emballages cartons Le Gaulois sont déjà issus de :strongStartcartons recyclés et certifiés FSC:strongEnd, garantissant une gestion responsable des forêts, et :strongStartplus de 60% des barquettes:strongEnd de volaille Le Gaulois sont recyclables ou intégrant :strongStartau moins 50% de matière recyclée.:hgroupEnd:divEnd:strongEnd', [ 'image' => ' +
{{-- HOT NEWS --}}
!cache('hotNewsIsDisplayed'), ])> -
+
@@ -20,7 +20,7 @@
- @include('fo.partials.hot-news')
@@ -31,19 +31,16 @@
@foreach ($mainSlideModels as $mainSlideModel) -
+
- {{ $mainSlideModel->background_alt }}
@if ($mainSlideModel->picture) - {{ $mainSlideModel->picture_alt }} + {{ $mainSlideModel->picture_alt }} @endif
- {{ __('Footer imitation bois du slider') }}
@endif {{-- HOT NEWS DESKTOP --}}
-
+
@include('fo.partials.hot-news') @@ -165,11 +161,9 @@
@foreach ($demarcheSlideModels as $demarcheSlideModel)
-
+
{{ __('Paysage de champs') }} + title="{{ __('Image de fond du carrousel') }}" alt="{{ __('Paysage de champs') }}">
@@ -181,8 +175,7 @@ alt="#FIXME:alt de l'image de la démarche">
-
+

@@ -216,14 +209,12 @@

@@ -241,6 +232,7 @@ 'models' => $recipeModels, 'btnRouteName' => route('fo.recipes.index'), 'btnRouteTitle' => 'recettes', + 'hasPagination' => true, ]) @endif {{-- NEWS --}} @@ -280,8 +272,7 @@
@foreach ($newsModels->slice(1, 3) as $newsModel)
  • -

    {{ now()->subDays(rand(1, 31))->format('d/m/Y') }}

    @@ -292,8 +283,7 @@
  • @foreach ($newsModels->slice(4, count($newsModels)) as $newsModel)
  • -

    {{ now()->subDays(rand(1, 31))->format('d/m/Y') }}

    diff --git a/resources/views/fo/pages/news/index.blade.php b/resources/views/fo/pages/news/index.blade.php index 47b382b3..503ebac9 100644 --- a/resources/views/fo/pages/news/index.blade.php +++ b/resources/views/fo/pages/news/index.blade.php @@ -8,12 +8,12 @@ {{-- HEADER --}} @include('fo.layouts.header-banner') {{-- MAIN CONTENT --}} -
    +
    -
    - @include('fo.pages.news.toggleButton') -
    +
    + {{-- @include('fo.pages.news.toggleButton') --}} +
    {!! clean($staticPageModel->content) !!}
    @@ -21,22 +21,22 @@
    @php $data = [ - 'legendModels' => $newsCategories ?? [], - 'legendImages' => false, - 'legendField' => 'title', - 'routeAjax' => 'fo.news.filtered', - 'contentViews' => $newsViews, - 'contentSwiper' => false, + 'legendModels' => $newsCategories ?? [], + 'legendImages' => false, + 'legendField' => 'title', + 'routeAjax' => 'fo.news.filtered', + 'contentViews' => $newsViews, + 'contentSwiper' => false, 'legendFakeFirst' => __('Toutes les actus'), - 'texts' => [ - 'helperNoItems' => __('Aucune actualités disponibles dans cette catégorie'), + 'texts' => [ + 'helperNoItems' => __('Aucune actualités disponibles dans cette catégorie'), 'helperAllItems' => __('Toutes les actualités ont été chargées'), ], ]; @endphp -
    +
    +
    -
    @endsection diff --git a/resources/views/fo/pages/recruitment.blade.php b/resources/views/fo/pages/recruitment.blade.php index ab008ba7..f9973f2c 100644 --- a/resources/views/fo/pages/recruitment.blade.php +++ b/resources/views/fo/pages/recruitment.blade.php @@ -129,6 +129,24 @@
  • + {{-- Video Modal --}} + @endif {{-- ADVANTAGES --}}
    @@ -167,7 +185,7 @@
    {{-- NEWS CORPORATE --}}
    -
    +

    @@ -183,7 +201,7 @@ id="swiper-recruitment-news-corporates">
    @foreach ($newsCorporateModels as $newsCorporateModel) -
    +
    @include('fo.partials.news-corporate-card', [ 'newsCorporateModel' => $newsCorporateModel, ]) diff --git a/resources/views/fo/partials/breeding-card.blade.php b/resources/views/fo/partials/breeding-card.blade.php index 7d59e5df..25a7fb80 100644 --- a/resources/views/fo/partials/breeding-card.blade.php +++ b/resources/views/fo/partials/breeding-card.blade.php @@ -8,19 +8,20 @@ --}}
    -
    - {{ $picture['title'] }} -
    -
    - diff --git a/resources/views/fo/partials/commitments/banner-text-complex-items.blade.php b/resources/views/fo/partials/commitments/banner-text-complex-items.blade.php index a26c768c..ebc4ad09 100644 --- a/resources/views/fo/partials/commitments/banner-text-complex-items.blade.php +++ b/resources/views/fo/partials/commitments/banner-text-complex-items.blade.php @@ -1,12 +1,11 @@ -
    -
    - {{ $picture_alt }} +
    +
    + {{ $picture_alt }}
    -
    +
    -

    {{ $title }}

    +
    diff --git a/resources/views/fo/partials/commitments/complex-flex-items.blade.php b/resources/views/fo/partials/commitments/complex-flex-items.blade.php index 6c5f3a3c..82720be3 100644 --- a/resources/views/fo/partials/commitments/complex-flex-items.blade.php +++ b/resources/views/fo/partials/commitments/complex-flex-items.blade.php @@ -1,11 +1,11 @@ -
    +
    @if (isset($title) && isset($picto)) -
    -
    - {{ $picto_alt }} -
    -

    {{ $title }}

    +
    +
    + {{ $picto_alt }} +
    +

    {{ $title }}

    @if (isset($subtitle))

    {{ $subtitle }}

    @endif @@ -14,15 +14,14 @@
    @endif
    -
    -
    +
    +
    @foreach ($collection as $item) -
    +
    - {{ $item->picto_alt }} + {{ $item->picto_alt }}
    diff --git a/resources/views/fo/partials/commitments/list-pages.blade.php b/resources/views/fo/partials/commitments/list-pages.blade.php index 30e7fea7..15de9b7b 100644 --- a/resources/views/fo/partials/commitments/list-pages.blade.php +++ b/resources/views/fo/partials/commitments/list-pages.blade.php @@ -46,7 +46,7 @@ 'picto_alt' => __('Pictogramme d\'une plante'), 'picto_title' => __('Pousse d\'une plante au creux d\'une main'), 'title' => __('respecter la terre'), - 'text' => __('être la grande marque alimentaire française'), + 'text' => __('minimiser notre empreinte carbone et agir sur le changement climatique'), 'url' => route('fo.commitments.respect'), ], ]; diff --git a/resources/views/fo/partials/commitments/other-commitments.blade.php b/resources/views/fo/partials/commitments/other-commitments.blade.php index f3f32aaa..14373688 100644 --- a/resources/views/fo/partials/commitments/other-commitments.blade.php +++ b/resources/views/fo/partials/commitments/other-commitments.blade.php @@ -53,7 +53,7 @@
    @include('fo.partials.breeding-card', [ 'picture' => [ - 'src' => $item->picture, + 'src' => Vite::asset($item->picture), 'alt' => $item->picture_alt, 'title' => $item->picture_title, ], diff --git a/resources/views/fo/partials/commitments/paragraph-with-visual.blade.php b/resources/views/fo/partials/commitments/paragraph-with-visual.blade.php index 69542ebe..c7131e23 100644 --- a/resources/views/fo/partials/commitments/paragraph-with-visual.blade.php +++ b/resources/views/fo/partials/commitments/paragraph-with-visual.blade.php @@ -30,8 +30,7 @@ ]) @endif @if (isset($btnLabel) && !empty($btnLabel)) - {{ $btnLabel }} @endif
    @@ -45,11 +44,10 @@ 'ratio ratio-16x9' => isset($video_id), ])> @if (isset($picto) && !empty($picto)) - {{ $picto_alt }} + ])> @endif
    @endif - @if (isset($video_id) && \App\Rules\IsValidYoutubeId::validates($video_id)) - - @endif + +
    + @if (isset($video_id) && \App\Rules\IsValidYoutubeId::validates($video_id)) + @if (isset($isVideoModal) && isset($video_id) && \App\Rules\IsValidYoutubeId::validates($video_id)) +
    + @endif + + @endif +
    + @if (!isset($video_id)) - {{ $picture_alt }} + {{ $picture_alt }} @endif
    @if (isset($card_title) && !empty($card_title)) -
    - {{ $card_picto_alt }} -

    +

    + {{ $card_picto_alt }} +

    {{ $card_sustitle }}

    -
    +

    {{ $card_title }}

    {{ $card_subtitle }}

    {{ $card_text }}

    diff --git a/resources/views/fo/partials/commitments/visual-with-cards.blade.php b/resources/views/fo/partials/commitments/visual-with-cards.blade.php index edc3f37b..b3a2c06b 100644 --- a/resources/views/fo/partials/commitments/visual-with-cards.blade.php +++ b/resources/views/fo/partials/commitments/visual-with-cards.blade.php @@ -1,15 +1,17 @@ -
    +
    -
    +

    {{ $title }}

    - {{ $picture_alt }} +
    + {{ $picture_alt }} +
    +
    @@ -18,20 +20,20 @@
    -
    +
    {!! $subtext !!}
    -
    +
    @foreach ($collection->slice(0, 2) as $item)
    -

    +

    {{ $item->title }}

    {{ $item->picto_alt }} + title="{{ $item->picto_title }}" alt="{{ $item->picto_alt }}">
    {!! $item->text !!} @@ -39,14 +41,14 @@
    @endforeach
    -
    +
    @foreach ($collection->slice(2, 2) as $item)
    -

    +

    {{ $item->title }}

    {{ $item->picto_alt }} + title="{{ $item->picto_title }}" alt="{{ $item->picto_alt }}">
    {!! $item->text !!} @@ -56,13 +58,13 @@
    -
    -

    +

    +

    {{ $collection->last()->title }}

    -
    +
    {{ $collection->last()->picto_alt }} + title="{{ $collection->last()->picto_title }}" alt="{{ $collection->last()->picto_alt }}">
    {!! $collection->last()->text !!}
    diff --git a/resources/views/fo/partials/hot-news.blade.php b/resources/views/fo/partials/hot-news.blade.php index f6e61e4c..e8f93629 100644 --- a/resources/views/fo/partials/hot-news.blade.php +++ b/resources/views/fo/partials/hot-news.blade.php @@ -31,7 +31,7 @@ alt="{{ $hotNewsSettings->value['picture_alt'] }}" title="{{ $hotNewsSettings->value['picture_title'] }}">
    - @money($discountsTotal * 100) + @money($discountsTotal) {{ __(' d\'économie') }}
    diff --git a/resources/views/fo/partials/news-corporate-card.blade.php b/resources/views/fo/partials/news-corporate-card.blade.php index 5c756d15..58c250b9 100644 --- a/resources/views/fo/partials/news-corporate-card.blade.php +++ b/resources/views/fo/partials/news-corporate-card.blade.php @@ -4,27 +4,28 @@ $newsCorporateModel || New corporate model. || Model || REQUIRED || --}} -
    -
    -
    - {{ $newsCorporateModel->picture_title }} - diff --git a/resources/views/fo/partials/offer-card.blade.php b/resources/views/fo/partials/offer-card.blade.php index 91dee795..87e44261 100644 --- a/resources/views/fo/partials/offer-card.blade.php +++ b/resources/views/fo/partials/offer-card.blade.php @@ -1,13 +1,13 @@ -
    - -
    -
    +
    + +
    +
    {{ $offerModel->picture_alt }}
    + class="d-flex flex-column justify-content-start justify-content-md-center align-items-start w-100 m-md-0 ms-md-2 px-md-0 mb-2 mt-3 px-3">

    {{ $offerModel->title }}

    {{ Str::limit($offerModel->description, 180) }} @@ -17,14 +17,16 @@

    -
    -
    +
    +
    +
    +
    {{ $offerModel->contract }}
    -
    +
    {{ $offerModel->location }}
    -
    +
    {{ $offerModel->function }}
    diff --git a/resources/views/fo/partials/product-card.blade.php b/resources/views/fo/partials/product-card.blade.php index 192708a7..f33ed894 100644 --- a/resources/views/fo/partials/product-card.blade.php +++ b/resources/views/fo/partials/product-card.blade.php @@ -1,6 +1,6 @@ -
    +
    -
    +
    {{ $model->packaging_alt }} {{-- BOTTOM PART --}}
    -
    -

    - {{ $model->label }} -

    +
    +

    {{ $model->label }}

    -
    -
    - + + diff --git a/resources/views/fo/partials/testimonial-card.blade.php b/resources/views/fo/partials/testimonial-card.blade.php index c4147d8c..c9081855 100644 --- a/resources/views/fo/partials/testimonial-card.blade.php +++ b/resources/views/fo/partials/testimonial-card.blade.php @@ -1,12 +1,20 @@
    + class="line-border-medium position-relative d-flex flex-column testimonial-card-bottom-part px-lg-5 px-lg-4 pb-lg-4 bg-light h-lg-100 px-3 pt-4">

    {{ $model->identity }}

    diff --git a/resources/views/modules/script-constants.blade.php b/resources/views/modules/script-constants.blade.php index 1b031561..ce47547b 100644 --- a/resources/views/modules/script-constants.blade.php +++ b/resources/views/modules/script-constants.blade.php @@ -1,4 +1,4 @@ -