diff --git a/app/Http/Controllers/Fo/StaticPageController.php b/app/Http/Controllers/Fo/StaticPageController.php index a2d20ec..5ed6969 100644 --- a/app/Http/Controllers/Fo/StaticPageController.php +++ b/app/Http/Controllers/Fo/StaticPageController.php @@ -5,14 +5,18 @@ namespace App\Http\Controllers\Fo; use App\Enums\StaticPageType; use App\Http\Controllers\Controller; use App\Http\Requests\Fo\ContactRequest; -use App\Models\Explorerpage; +use App\Http\Requests\Fo\JoinusRequest; use App\Mail\SendContactMail; +use App\Mail\SendJoinusMail; use App\Models\Convictionpage; +use App\Models\Explorerpage; use App\Models\Homepage; +use App\Models\Joinuspage; use App\Models\News; use App\Models\Range; use App\Models\SeasonalSection; use App\Models\StaticPage; +use App\Models\Testimonial; use Illuminate\Support\Facades\Mail; class StaticPageController extends Controller @@ -38,8 +42,7 @@ class StaticPageController extends Controller */ public function legals(StaticPage $legalPage) { - $legalPage = StaticPage::query()->where('type', StaticPageType::legals) - ->get(); + $legalPage = StaticPage::query()->where('type', StaticPageType::legals)->get(); return view('fo.pages.legals', ['staticPageModel' => $legalPage[0]]); } @@ -51,8 +54,7 @@ class StaticPageController extends Controller */ public function policies(StaticPage $policiesPage) { - $policiesPage = StaticPage::query()->where('type', StaticPageType::confidentiality) - ->get(); + $policiesPage = StaticPage::query()->where('type', StaticPageType::confidentiality)->get(); return view('fo.pages.legals', ['staticPageModel' => $policiesPage[0]]); } @@ -154,4 +156,40 @@ class StaticPageController extends Controller 'staticPageModel', )); } + + /** + * Display the explorer and gastonome page. + * + * @return \Illuminate\Contracts\View\View + */ + public function joinus(): \Illuminate\Contracts\View\View + { + /** @var \App\Models\StaticPage $staticPageModel */ + $staticPageModel = StaticPage::query()->where('type', StaticPageType::joinus)->firstOrFail(); + + /** @var \App\Models\Joinuspage $joinuspageModel */ + $joinuspageModel = Joinuspage::query()->firstOrFail(); + + /** @var \App\Models\Testimonial $testimonialModels */ + $testimonialModels = Testimonial::query()->get(); + + return view('fo.pages.join-us', compact('staticPageModel', 'joinuspageModel', 'testimonialModels')); + } + + /** + * Display a listing of the resource. + * + * @param \App\Http\Requests\Fo\JoinusRequest $request + * @return \Illuminate\Http\RedirectResponse + */ + public function joinusForm(JoinusRequest $request): \Illuminate\Http\RedirectResponse + { + Mail::to(\config('mail.from.address'))->send(new SendJoinusMail((object)$request->validated())); + + return redirect()->route('fo.joinus.show') + ->with( + 'success', + 'Bonjour, votre candidature a bien été transmise. nous vous en remercions. Cordialement, l’équipe Agis.' + ); + } } diff --git a/app/Http/Middleware/SecureHeaders.php b/app/Http/Middleware/SecureHeaders.php index a490c4a..cc17112 100644 --- a/app/Http/Middleware/SecureHeaders.php +++ b/app/Http/Middleware/SecureHeaders.php @@ -63,7 +63,8 @@ class SecureHeaders 'frame-src ' . implode(' ', [ 'https://www.google.com/recaptcha/', 'https://recaptcha.google.com/recaptcha/', - 'https://www.google.com/maps/' + 'https://www.google.com/maps/', + 'https://www.youtube.com', ]) . ';', "font-src 'self' data: " . \implode(' ', [ // * VITE DEV @@ -101,7 +102,10 @@ class SecureHeaders 'Content-Security-Policy', implode(' ', $cspPolicies) . $reportUri ); - $response->headers->set('Feature-Policy', 'fullscreen \'self\';'); + $response->headers->set('Feature-Policy', \implode(',', [ + 'fullscreen', 'accelerometer', 'encrypted-media', + 'gyroscope', 'picture-in-picture' + ]) . ';'); return $response; } diff --git a/app/Http/Requests/Fo/JoinusRequest.php b/app/Http/Requests/Fo/JoinusRequest.php new file mode 100644 index 0000000..c324e45 --- /dev/null +++ b/app/Http/Requests/Fo/JoinusRequest.php @@ -0,0 +1,45 @@ + 'required|string|between:3,255', + 'first_name' => 'required|string|between:3,255', + 'email' => 'required|email:rfc,strict,dns,spoof,filter|max:255', + 'phone' => 'required|numeric|min:0', + 'message' => 'required|string|between:3,255', + "file" => "sometimes|nullable|mimes:pdf|max:10000" + ]; + } + + /** + * Get custom attributes for validator errors. + * + * @return array + */ + public function attributes(): array + { + return [ + 'first_name' => trans('validation.attributes.first_name'), + 'last_name' => trans('validation.attributes.last_name'), + 'email' => trans('validation.attributes.email'), + 'phone' => trans('validation.attributes.phone'), + 'message' => trans('validation.attributes.message'), + 'file' => trans('validation.attributes.file'), + ]; + } +} diff --git a/app/Mail/SendJoinusMail.php b/app/Mail/SendJoinusMail.php new file mode 100644 index 0000000..5ba702b --- /dev/null +++ b/app/Mail/SendJoinusMail.php @@ -0,0 +1,95 @@ +data = clone $data; + } + + /** + * Get the message envelope. + * + * @return \Illuminate\Mail\Mailables\Envelope + */ + public function envelope(): \Illuminate\Mail\Mailables\Envelope + { + return new Envelope( + from: new Address( + $this->data->email, + ($this->data->first_name !== null || $this->data->last_name !== null) ? + (($this->data->first_name ?? '') . " " . ($this->data->last_name ?? '')) : + null + ), + to: [new Address(config('mail.from.address'), config('mail.from.name'))], + subject: sprintf('%s - %s', __('Candidature spontanée'), config('app.name')), + ); + } + + /** + * Get the message content definition. + * + * @return \Illuminate\Mail\Mailables\Content + */ + public function content(): \Illuminate\Mail\Mailables\Content + { + return new Content( + markdown: 'emails.send-joinus-form', + with: ['data' => $this->data], + ); + } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments(): array + { + $attachments = []; + if (isset($this->data->file)) { + $attachments[] = Attachment::fromPath($this->data->file->getRealPath()) + ->as($this->data->file->getClientOriginalName()) + ->withMime($this->data->file->getClientMimeType()); + } + return $attachments; + } +} + +/** + * @property string $last_name + * @property string $first_name + * @property string $email + * @property string $phone + * @property string $message + * @property \Illuminate\Http\UploadedFile $file + * @phpcs:disable PSR1.Classes.ClassDeclaration.MultipleClasses + */ +class Contact extends \stdClass +{ +} diff --git a/app/Traits/Requests/.gitkeep b/app/Traits/Requests/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/database/seeders/ConvictionpageSeeder.php b/database/seeders/ConvictionpageSeeder.php index 88c3862..bb9eee8 100644 --- a/database/seeders/ConvictionpageSeeder.php +++ b/database/seeders/ConvictionpageSeeder.php @@ -14,12 +14,6 @@ class ConvictionpageSeeder extends Seeder */ public function run() { - // Disable model events to allow Convictionpage creation in seeders. - try { - Convictionpage::unsetEventDispatcher(); - Convictionpage::factory(1)->create(); - } finally { - Convictionpage::setEventDispatcher(new \Illuminate\Events\Dispatcher()); - } + Convictionpage::factory(1)->createQuietly(); } } diff --git a/database/seeders/ExplorerpageSeeder.php b/database/seeders/ExplorerpageSeeder.php index 9616728..a24785a 100644 --- a/database/seeders/ExplorerpageSeeder.php +++ b/database/seeders/ExplorerpageSeeder.php @@ -16,28 +16,22 @@ class ExplorerpageSeeder extends Seeder */ public function run() { - // Disable model events to allow Explorerpage creation in seeders. - try { - FileStorageHelper::removeModelFiles(new Explorerpage()); - Explorerpage::unsetEventDispatcher(); - Explorerpage::factory(1)->create([ - 'picture_1' => FileStorageHelper::storeFile(new Explorerpage(), new \SplFileInfo( - \resource_path('../database/factories/assets/explorerpages/default-picture-265x364.png') - )), - 'picture_2' => FileStorageHelper::storeFile(new Explorerpage(), new \SplFileInfo( - \resource_path('../database/factories/assets/explorerpages/default-picture-265x364.png') - )), - 'picture_3' => FileStorageHelper::storeFile(new Explorerpage(), new \SplFileInfo( - \resource_path('../database/factories/assets/explorerpages/default-picture-265x364.png') - )), - ]); + FileStorageHelper::removeModelFiles(new Explorerpage()); + Explorerpage::factory(1)->createQuietly([ + 'picture_1' => FileStorageHelper::storeFile(new Explorerpage(), new \SplFileInfo( + \resource_path('../database/factories/assets/explorerpages/default-picture-265x364.png') + )), + 'picture_2' => FileStorageHelper::storeFile(new Explorerpage(), new \SplFileInfo( + \resource_path('../database/factories/assets/explorerpages/default-picture-265x364.png') + )), + 'picture_3' => FileStorageHelper::storeFile(new Explorerpage(), new \SplFileInfo( + \resource_path('../database/factories/assets/explorerpages/default-picture-265x364.png') + )), + ]); - $commitments = Commitment::query()->get(); - Explorerpage::query()->each(function (Explorerpage $explorerpage) use ($commitments) { - $explorerpage->commitments()->saveMany($commitments->random(\rand(3, 12))); - }); - } finally { - Explorerpage::setEventDispatcher(new \Illuminate\Events\Dispatcher()); - } //end try + $commitments = Commitment::query()->get(); + Explorerpage::query()->each(function (Explorerpage $explorerpage) use ($commitments) { + $explorerpage->commitments()->saveMany($commitments->random(\rand(3, 12))); + }); } } diff --git a/database/seeders/HomepageSeeder.php b/database/seeders/HomepageSeeder.php index e67aaa7..ef916a9 100644 --- a/database/seeders/HomepageSeeder.php +++ b/database/seeders/HomepageSeeder.php @@ -15,17 +15,11 @@ class HomepageSeeder extends Seeder */ public function run() { - // Disable model events to allow Homepage creation in seeders. - try { - FileStorageHelper::removeModelFiles(new Homepage()); - Homepage::unsetEventDispatcher(); - Homepage::factory(1)->create([ - 'picture' => FileStorageHelper::storeFile(new Homepage(), new \SplFileInfo(\resource_path( - '../database/factories/assets/homepages/default-picture-640x390.png' - ))), - ]); - } finally { - Homepage::setEventDispatcher(new \Illuminate\Events\Dispatcher()); - } + FileStorageHelper::removeModelFiles(new Homepage()); + Homepage::factory(1)->createQuietly([ + 'picture' => FileStorageHelper::storeFile(new Homepage(), new \SplFileInfo(\resource_path( + '../database/factories/assets/homepages/default-picture-640x390.png' + ))), + ]); } } diff --git a/database/seeders/JoinuspageSeeder.php b/database/seeders/JoinuspageSeeder.php index d9f0640..2b64358 100644 --- a/database/seeders/JoinuspageSeeder.php +++ b/database/seeders/JoinuspageSeeder.php @@ -14,12 +14,6 @@ class JoinuspageSeeder extends Seeder */ public function run() { - // Disable model events to allow Joinuspage creation in seeders. - try { - Joinuspage::unsetEventDispatcher(); - Joinuspage::factory(1)->create(); - } finally { - Joinuspage::setEventDispatcher(new \Illuminate\Events\Dispatcher()); - } + Joinuspage::factory(1)->createQuietly(); } } diff --git a/resources/assets/images/global/bg-grey-desktop.svg b/resources/assets/images/global/bg-grey-desktop.svg deleted file mode 100644 index 07f7949..0000000 --- a/resources/assets/images/global/bg-grey-desktop.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/resources/assets/images/global/bg-grey.svg b/resources/assets/images/global/bg-grey.svg index 34933a4..789c40b 100644 --- a/resources/assets/images/global/bg-grey.svg +++ b/resources/assets/images/global/bg-grey.svg @@ -1,13 +1,13 @@ - - - - - - - - \ No newline at end of file + + + + + + + + diff --git a/resources/assets/images/global/bg-yellow.svg b/resources/assets/images/global/bg-yellow.svg index 3fbf1a2..5175b13 100644 --- a/resources/assets/images/global/bg-yellow.svg +++ b/resources/assets/images/global/bg-yellow.svg @@ -1,12 +1,11 @@ - + diff --git a/resources/assets/images/joinus/green-points.svg b/resources/assets/images/joinus/green-points.svg new file mode 100644 index 0000000..3635963 --- /dev/null +++ b/resources/assets/images/joinus/green-points.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/images/joinus/ingredients-1.svg b/resources/assets/images/joinus/ingredients-1.svg new file mode 100644 index 0000000..8621759 --- /dev/null +++ b/resources/assets/images/joinus/ingredients-1.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/images/joinus/ingredients-2.svg b/resources/assets/images/joinus/ingredients-2.svg new file mode 100644 index 0000000..e5118cc --- /dev/null +++ b/resources/assets/images/joinus/ingredients-2.svg @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/images/joinus/ingredients-3.svg b/resources/assets/images/joinus/ingredients-3.svg new file mode 100644 index 0000000..847282a --- /dev/null +++ b/resources/assets/images/joinus/ingredients-3.svg @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/images/joinus/ladle.svg b/resources/assets/images/joinus/ladle.svg new file mode 100644 index 0000000..28c3891 --- /dev/null +++ b/resources/assets/images/joinus/ladle.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/images/joinus/personaje.svg b/resources/assets/images/joinus/personaje.svg new file mode 100644 index 0000000..e9b0693 --- /dev/null +++ b/resources/assets/images/joinus/personaje.svg @@ -0,0 +1,462 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/images/joinus/sticks.svg b/resources/assets/images/joinus/sticks.svg new file mode 100644 index 0000000..c9db74e --- /dev/null +++ b/resources/assets/images/joinus/sticks.svg @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/images/joinus/tomato.svg b/resources/assets/images/joinus/tomato.svg new file mode 100644 index 0000000..1cf7663 --- /dev/null +++ b/resources/assets/images/joinus/tomato.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/lang/en/cookie-notice.php b/resources/lang/en/cookie-notice.php new file mode 100644 index 0000000..0b116b2 --- /dev/null +++ b/resources/lang/en/cookie-notice.php @@ -0,0 +1,43 @@ + 'Customize cookies', + 'button_forbid' => 'Prohibit', + 'button_allow' => 'Allow', + 'button_forbid_all' => 'Reject all', + 'button_allow_all' => 'Accept all', + 'button_customize' => 'Customize', + 'button_back' => 'Back', + 'banner_title' => 'The :site_name website uses cookies!', + 'banner_text_open' => 'This website stores cookies on your computer. :site_name uses this information to improve and personalize your browsing experience, as well as for analysis and indicators concerning our visitors both on this website and on other media. You can click on "Accept" if you consent to the use of these cookies.', + 'banner_text' => 'We use cookies to ensure the smooth operation of our site and for analytical purposes. By continuing to browse this site or by closing this banner, you consent to the use of these cookies.', + 'banner_details' => 'If you refuse the use of cookies, your information will not be tracked during your visit to this site. A cookie will be used in your browser to remember not to track your preferences. Some features will not be accessible. You can change your mind and modify your consent at any time by returning to this site.', + 'banner_details_link' => 'To find out more about the cookies we use, please consult our privacy policy.', + 'banner_details_link_title' => 'Privacy policy', + 'banner_more_details' => 'More details...', + 'banner_less_details' => 'Fewer details...', + 'Panel_title' => 'Cookie management panel', + 'Panel_subtitle' => 'Your privacy is our priority', + 'Panel_details' => 'The functionalities of this site are based on services provided by third parties. If you accept, these third parties will deposit cookies that will enable you to view content on the site hosted by these third parties. Through these cookies, these third parties will collect and use your browsing data for their own purposes, in accordance with their privacy policy (link below). This page allows you to give or withdraw your consent, either globally or service by service.', + 'custom' => [ + 'youtube' => [ + 'name' => 'Youtube', + 'description' => 'Cookies placed via video sharing services are intended to allow the user to view multimedia content directly on the site.', + 'labelLink' => 'Learn more', + 'warning' => 'You must accept cookies to view this video', + ], + 'matomo' => [ + 'title' => 'Matomo', + 'description' => 'Audience measurement services are used to generate traffic statistics, which are useful for improving the site.', + 'labelLink' => 'Learn more', + ], + 'recaptcha' => [ + 'title' => 'reCAPTACHA', + 'description' => 'The purpose of the cookies placed on forms via the recaptcha is to prevent them from being submitted by robots.', + 'labelLink' => 'Learn more', + 'warning' => 'You must accept cookies to send the form', + ] + ] +]; diff --git a/resources/lang/fr/cookie-notice.php b/resources/lang/fr/cookie-notice.php index ead47d5..b569e81 100644 --- a/resources/lang/fr/cookie-notice.php +++ b/resources/lang/fr/cookie-notice.php @@ -3,34 +3,41 @@ // * Version 3.0.8 // phpcs:disable return [ - 'button_customize_cookies' => 'Personnaliser les cookies', - 'button_forbid' => 'Interdire', - 'button_allow' => 'Autoriser', - 'button_forbid_all' => 'Tout refuser', - 'button_allow_all' => 'Tout accepter', - 'button_customize' => 'Personnaliser', - 'button_back' => 'Retour', - 'banner_title' => 'Le site internet :site_name utilise des cookies !', - 'banner_text_open' => 'Ce site web stocke les cookies sur votre ordinateur. :site_name utilise ces informations afin d’améliorer et de personnaliser votre expérience de navigation, ainsi que pour l’analyse et les indicateurs concernant nos visiteurs à la fois sur ce site web et sur d’autres supports. Vous pouvez cliquer sur « Accepter » si vous consentez à l’utilisation de ces cookies.', - 'banner_text' => 'Nous utilisons des cookies pour nous assurer du bon fonctionnement de notre site et à des fins analytiques. En poursuivant votre navigation sur ce site ou en fermant ce bandeau, vous consentez à l’utilisationde ces cookies.', - 'banner_details' => 'Si vous refusez l’utilisation des cookies, vos informations ne seront pas suivies lors de votre visite sur ce site. Un cookie sera utilisé dans votre navigateur afin de se souvenir de ne pas suivre vos préférences. Certaines fonctionnalités ne seront pas accessibles. Vous pouvez changer d’avis et modifier votre consentement à tout moment en revenant sur ce site.', - 'banner_details_link' => - 'Pour en savoir plus sur les cookies que nous utilisons, consultez notre charte de confidentialité.', + 'button_customize_cookies' => 'Personnaliser les cookies', + 'button_forbid' => 'Interdire', + 'button_allow' => 'Autoriser', + 'button_forbid_all' => 'Tout refuser', + 'button_allow_all' => 'Tout accepter', + 'button_customize' => 'Personnaliser', + 'button_back' => 'Retour', + 'banner_title' => 'Le site internet :site_name utilise des cookies !', + 'banner_text_open' => 'Ce site web stocke les cookies sur votre ordinateur. :site_name utilise ces informations afin d’améliorer et de personnaliser votre expérience de navigation, ainsi que pour l’analyse et les indicateurs concernant nos visiteurs à la fois sur ce site web et sur d’autres supports. Vous pouvez cliquer sur « Accepter » si vous consentez à l’utilisation de ces cookies.', + 'banner_text' => 'Nous utilisons des cookies pour nous assurer du bon fonctionnement de notre site et à des fins analytiques. En poursuivant votre navigation sur ce site ou en fermant ce bandeau, vous consentez à l’utilisationde ces cookies.', + 'banner_details' => 'Si vous refusez l’utilisation des cookies, vos informations ne seront pas suivies lors de votre visite sur ce site. Un cookie sera utilisé dans votre navigateur afin de se souvenir de ne pas suivre vos préférences. Certaines fonctionnalités ne seront pas accessibles. Vous pouvez changer d’avis et modifier votre consentement à tout moment en revenant sur ce site.', + 'banner_details_link' => 'Pour en savoir plus sur les cookies que nous utilisons, consultez notre charte de confidentialité.', 'banner_details_link_title' => 'Charte de confidentialité', - 'banner_more_details' => 'Plus de détails...', - 'banner_less_details' => 'Moins de détails...', - 'Panel_title' => 'Panneau de gestion des cookies', - 'Panel_subtitle' => 'Le respect de votre vie privée est notre priorité', - 'Panel_details' => 'Les fonctionnalités de ce site s’appuient sur des services proposés par des tiers. Si vous acceptez, ces tiers déposeront des cookies qui vous permettront de visualiser sur le site du contenu hébergé par ces tiers. Via ces cookies, ces tiers collecteront et utiliseront vos données de navigation pour des finalités qui leur sont propres, conformément à leur politique de confidentialité (lien ci-dessous). Cette page vous permet de donner ou de retirer votre consentement, soit globalement soit service par service.', - + 'banner_more_details' => 'Plus de détails...', + 'banner_less_details' => 'Moins de détails...', + 'Panel_title' => 'Panneau de gestion des cookies', + 'Panel_subtitle' => 'Le respect de votre vie privée est notre priorité', + 'Panel_details' => 'Les fonctionnalités de ce site s’appuient sur des services proposés par des tiers. Si vous acceptez, ces tiers déposeront des cookies qui vous permettront de visualiser sur le site du contenu hébergé par ces tiers. Via ces cookies, ces tiers collecteront et utiliseront vos données de navigation pour des finalités qui leur sont propres, conformément à leur politique de confidentialité (lien ci-dessous). Cette page vous permet de donner ou de retirer votre consentement, soit globalement soit service par service.', 'custom' => [ - 'matomo' => [ - 'title' => 'Matomo', + 'youtube' => [ + 'name' => 'Youtube', + 'description' => 'Les cookies placés via les services de partage de vidéos sont destinés à permettre à l\'utilisateur de visionner des contenus multimédias directement sur le site.', + 'labelLink' => 'En apprendre plus', + 'warning' => 'Vous devez accepter les cookies pour visionner cette vidéo', + ], + 'matomo' => [ + 'title' => 'Matomo', 'description' => 'Les services de mesure d\'audience permettent de générer des statistiques de fréquentation utiles à l\'amélioration du site.', + 'labelLink' => 'En apprendre plus', ], 'recaptcha' => [ - 'title' => 'reCAPTACHA', + 'title' => 'reCAPTACHA', 'description' => 'Les cookies qui sont déposés via le recaptcha sur les formulaires ont pour finalité d\'empêcher que ceux-ci ne soient soumis par des robots.', + 'labelLink' => 'En apprendre plus', + 'warning' => 'Vous devez accepter les cookies pour envoyer le formulaire', ] ] ]; diff --git a/resources/sass/fo/base/_common.scss b/resources/sass/fo/base/_common.scss index e8637d9..2fdf42a 100644 --- a/resources/sass/fo/base/_common.scss +++ b/resources/sass/fo/base/_common.scss @@ -11,6 +11,13 @@ img { max-width: 100%; } background-size: 100% 100%; } +.bg-agis-grey { + background-image: url('@/images/global/bg-grey.svg'); + background-position: center; + background-repeat: no-repeat; + background-size: 100% 100%; +} + .divide { height: 4px; background-image: url('@/images/homepage/h-bar.svg'); diff --git a/resources/sass/fo/fo.scss b/resources/sass/fo/fo.scss index e026224..d5d248e 100644 --- a/resources/sass/fo/fo.scss +++ b/resources/sass/fo/fo.scss @@ -18,6 +18,7 @@ // * PAGES. @import './pages/homepage'; @import './pages/ranges'; +@import './pages/joinus'; @import './pages/contact'; @import './pages/explorerpage'; @import './pages/product'; diff --git a/resources/sass/fo/pages/_joinus.scss b/resources/sass/fo/pages/_joinus.scss new file mode 100644 index 0000000..3e76633 --- /dev/null +++ b/resources/sass/fo/pages/_joinus.scss @@ -0,0 +1,230 @@ +.joinus { + .highlight.black { + width: 100%; + + @include media-breakpoint-up(xl) { + width: fit-content; + } + } + + .swiper-joinus .swiper-slide-content, + .card { + width: 292px; + } + + .swiper-joinus { + position: relative; + + .swiper-button { + &-prev, + &-next { width: 3rem; } + + &-next { rotate: 180deg; } + + &-disabled { opacity: .5; } + } + } + + .details { + padding-bottom: 8rem; + + @include media-breakpoint-up(md) { + padding-bottom: 5rem; + } + + &::after { + position: absolute; + bottom: 0; + left: 50%; + width: 100%; + max-width: 30rem; + height: 10rem; + background: url("@/images/joinus/personaje.svg"); + background-position: right; + background-repeat: no-repeat; + background-size: initial; + content: ""; + pointer-events: none; + transform: translateX(-50%); + + @include media-breakpoint-up(md) { + height: 15rem; + } + } + + .container { + max-width: 30rem; + + .number { + width: 3rem; + + @include media-breakpoint-up(md) { + width: 4rem; + } + } + + .description { + width: calc(100% - 4rem); + } + + .part1-assets::before { + position: absolute; + top: -2rem; + left: 0; + width: 3rem; + height: 1rem; + background: url("@/images/joinus/green-points.svg"); + background-position: center; + background-repeat: no-repeat; + background-size: 100% 100%; + content: ""; + pointer-events: none; + transform: rotate(35deg); + + @include media-breakpoint-up(md) { + top: -1rem; + left: -4rem; + width: 4rem; + transform: rotate(55deg); + } + } + + .part2-assets { + p { + line-height: 1.5; + } + + &::before { + position: absolute; + top: 0; + left: -6rem; + display: none; + width: 4rem; + height: 18rem; + background: url("@/images/joinus/ladle.svg"); + background-position: center; + background-repeat: no-repeat; + background-size: 100% 100%; + content: ""; + pointer-events: none; + + @include media-breakpoint-up(md) { + display: block; + } + } + + &::after { + position: absolute; + right: -6rem; + bottom: 0; + width: 15rem; + height: 6rem; + background: url("@/images/joinus/sticks.svg"); + background-position: center; + background-repeat: no-repeat; + background-size: 100% 100%; + content: ""; + pointer-events: none; + + @include media-breakpoint-up(md) { + right: -15rem; + width: 26rem; + height: 10rem; + } + } + } + + .part3-assets::after { + position: absolute; + right: 0; + bottom: 0; + width: 6rem; + height: 5rem; + background: url("@/images/joinus/ingredients-1.svg"); + background-position: center; + background-repeat: no-repeat; + background-size: 100% 100%; + content: ""; + pointer-events: none; + + @include media-breakpoint-up(md) { + width: 10rem; + height: 7rem; + } + } + + .part4-assets { + &::before { + position: absolute; + bottom: 2rem; + left: -5rem; + display: none; + width: 3rem; + height: 2rem; + background: url("@/images/joinus/tomato.svg"); + background-position: center; + background-repeat: no-repeat; + background-size: 100% 100%; + content: ""; + pointer-events: none; + + @include media-breakpoint-up(md) { + display: block; + } + } + + &::after { + position: absolute; + right: 4rem; + bottom: 1rem; + width: 3rem; + height: 1rem; + background: url("@/images/joinus/green-points.svg"); + background-position: center; + background-repeat: no-repeat; + background-size: 100% 100%; + content: ""; + pointer-events: none; + + @include media-breakpoint-up(md) { + right: 6rem; + bottom: 2rem; + width: 6rem; + height: 2rem; + } + } + } + + .part5-assets::after { + position: absolute; + bottom: -8rem; + left: 2rem; + width: 13rem; + height: 6rem; + background: url("@/images/joinus/ingredients-2.svg"); + background-position: center; + background-repeat: no-repeat; + background-size: 100% 100%; + content: ""; + pointer-events: none; + + @include media-breakpoint-up(md) { + bottom: -4rem; + left: -6rem; + width: 22rem; + height: 8rem; + background: url("@/images/joinus/ingredients-3.svg"); + background-position: center; + background-repeat: no-repeat; + background-size: 100% 100%; + } + } + } + } + + #candidature-spontanee { + .highlight.black { + transform: translateY(-1rem); + } + } +} diff --git a/resources/sass/fo/utilities/_bootstrap-variables.scss b/resources/sass/fo/utilities/_bootstrap-variables.scss index 0455dc5..fb556a9 100644 --- a/resources/sass/fo/utilities/_bootstrap-variables.scss +++ b/resources/sass/fo/utilities/_bootstrap-variables.scss @@ -7,6 +7,8 @@ $secondary: $color-secondary; $tertiary: $color-tertiary; $quad: $color-quad; $quint: $color-quint; +$sext: $color-sext; +$sept: $color-sept; $success: $color-success; $info: $color-info; $warning: $color-warning; @@ -19,6 +21,8 @@ $theme-colors: ( tertiary: $tertiary, quad: $quad, quint: $quint, + sext: $sext, + sept: $sept, success: $success, info: $info, warning: $warning, @@ -31,6 +35,8 @@ $custom-theme-colors: map.merge($theme-colors, 'tertiary': $tertiary, 'quad': $quad, 'quint': $quint, + 'sext': $sext, + 'sept': $sept, )); $theme-colors: map.merge($theme-colors, $custom-theme-colors); $theme-colors-rgb: map-loop($theme-colors, to-rgb, '$value'); diff --git a/resources/sass/fo/utilities/_variables.scss b/resources/sass/fo/utilities/_variables.scss index 5e6b0be..600354c 100644 --- a/resources/sass/fo/utilities/_variables.scss +++ b/resources/sass/fo/utilities/_variables.scss @@ -11,6 +11,8 @@ $color-secondary: #ffd264; $color-tertiary: #ff9251; $color-quad: #6e130a; $color-quint: #003a5d; +$color-sext: #e25141; +$color-sept: #aac27f; // * BACKGROUNDS COLORS $bg-white: $color-white; diff --git a/resources/ts/fo/base/common.ts b/resources/ts/fo/base/common.ts index 2a647d9..f4ca65e 100644 --- a/resources/ts/fo/base/common.ts +++ b/resources/ts/fo/base/common.ts @@ -1,8 +1,8 @@ import Swiper from "swiper"; import { Navigation } from "swiper/modules"; -// * Video frames. document.addEventListener("DOMContentLoaded", function () { + // * Video frames. const videoFrameList = document.querySelectorAll( ".video-frame" ) as NodeListOf; @@ -44,6 +44,32 @@ document.addEventListener("DOMContentLoaded", function () { }); }, 300); } + // * Video inlaid. + const videoInlaidList = document.querySelectorAll( + ".video-inlaid" + ) as NodeListOf; + for (const videoLink of videoInlaidList) { + if (!videoLink.getAttribute("type")) { + throw new Error("Missing attribute type"); + } + if (!videoLink.getAttribute("href")) { + throw new Error("Missing attribute href"); + } + // @ts-ignore + if (window.__CN_VIDEO[videoLink.getAttribute("type")]) { + videoLink.innerHTML = ""; + const newIframe = document.createElement("iframe"); + newIframe.frameBorder = "0"; + newIframe.allow = "fullscreen"; + newIframe.width = "1920px"; + newIframe.height = "1080px"; + newIframe.classList.add("w-100"); + newIframe.classList.add("h-100"); + newIframe.setAttribute("allowfullscreen", "allowfullscreen"); + newIframe.src = String(videoLink.getAttribute("href")); + videoLink.appendChild(newIframe); + } + } // SWIPER const swiperConfig = { "swiper-news": { @@ -51,13 +77,11 @@ document.addEventListener("DOMContentLoaded", function () { grabCursor: true, slidesPerView: 1, spaceBetween: 60, - // Navigation arrows navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, breakpoints: { - // when window width is >= 1200px 1200: { slidesPerView: 3, }, @@ -68,19 +92,27 @@ document.addEventListener("DOMContentLoaded", function () { grabCursor: true, slidesPerView: 1, spaceBetween: 60, - // Navigation arrows navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, breakpoints: { - // when window width is >= 1200px 1200: { slidesPerView: 3, spaceBetween: 0, }, }, }, + "swiper-joinus": { + modules: [Navigation], + grabCursor: true, + slidesPerView: 1, + spaceBetween: 60, + navigation: { + nextEl: ".swiper-button-next", + prevEl: ".swiper-button-prev", + }, + }, "swiper-product-pictures": { modules: [Navigation], grabCursor: true, diff --git a/resources/ts/fo/fo.ts b/resources/ts/fo/fo.ts index 393a71e..dec230b 100644 --- a/resources/ts/fo/fo.ts +++ b/resources/ts/fo/fo.ts @@ -12,6 +12,7 @@ import "./base/common"; // PAGES import "./pages/contact"; +import "./pages/joinus"; // COOKIES import CookieNotice from "@ldc-web/cookie-notice"; diff --git a/resources/ts/fo/pages/joinus.ts b/resources/ts/fo/pages/joinus.ts new file mode 100644 index 0000000..0c87ef4 --- /dev/null +++ b/resources/ts/fo/pages/joinus.ts @@ -0,0 +1,24 @@ +document.addEventListener("DOMContentLoaded", function () { + const joinusPage = document.querySelector("section.joinus"); + if (joinusPage === null) { + return; + } + + // * Return string error. + function getErrorString(fieldName: string) { + return `Élement du dom ${fieldName} inexistant.`; + } + + // * Get filename. + const inputFile = joinusPage.querySelector("input[name=\"file\"]") as HTMLSelectElement | null; + const renderFileName = joinusPage.querySelector("#input-file-name") as HTMLParagraphElement | null; + if (inputFile === null) { + throw new Error(getErrorString("input[name=\"file\"]")); + } + if (renderFileName === null) { + throw new Error(getErrorString("#input-file-name")); + } + inputFile.addEventListener("change", function () { + renderFileName.textContent = this.value; + }); +}); diff --git a/resources/views/emails/send-contact-form.blade.php b/resources/views/emails/send-contact-form.blade.php index 848bc51..967267c 100644 --- a/resources/views/emails/send-contact-form.blade.php +++ b/resources/views/emails/send-contact-form.blade.php @@ -1,7 +1,7 @@ @component('mail::message') # Bonjour, -## Voici un message envoyé depuis le formulaire de contact du site web {{ config('app.name') }} : +## Voici un message envoyé depuis le formulaire de la page "contact" du site web {{ config('app.name') }} : ### Information sur l'utilisateur: @component('mail::panel') diff --git a/resources/views/emails/send-joinus-form.blade.php b/resources/views/emails/send-joinus-form.blade.php new file mode 100644 index 0000000..0d74058 --- /dev/null +++ b/resources/views/emails/send-joinus-form.blade.php @@ -0,0 +1,16 @@ +@component('mail::message') +# Bonjour, + +## Voici un message envoyé depuis le formulaire de la page "rejoignez-nous" du site web {{ config('app.name') }} : + +### Information sur l'utilisateur: +@component('mail::panel') +- **{{ __('validation.attributes.first_name') }}:** {{ $data->first_name ?? '' }} +- **{{ __('validation.attributes.last_name') }}:** {{ $data->last_name ?? '' }} +- **{{ __('validation.attributes.email') }}:** {{ $data->email }} +- **{{ __('validation.attributes.phone') }}:** {{ $data->phone ?? '' }} +- **{{ __('validation.attributes.message') }}:** {{ $data->message }} +@endcomponent + +L'équipe {{ config('app.name') }} +@endcomponent diff --git a/resources/views/fo/layouts/footer.blade.php b/resources/views/fo/layouts/footer.blade.php index 55d0d39..9d0e185 100644 --- a/resources/views/fo/layouts/footer.blade.php +++ b/resources/views/fo/layouts/footer.blade.php @@ -77,8 +77,8 @@ diff --git a/resources/views/fo/layouts/nav-list.blade.php b/resources/views/fo/layouts/nav-list.blade.php index 31516e4..be7706b 100644 --- a/resources/views/fo/layouts/nav-list.blade.php +++ b/resources/views/fo/layouts/nav-list.blade.php @@ -20,8 +20,8 @@ href="#" title="{{ __('Nos actualités') }}"> {{ __('Nos actualités') }} - + {{ __('Rejoignez-nous') }} seo_title ?? __('Rejoignez-nous')) +@section('description', $staticPageModel->seo_description ?? __('Rejoignez-nous la description.')) +@section('breadcrumb', + request()->route()->getName()) + +@section('content') +
+ +
+
+

{{ __('les 5 bonnes raisons') }}

+

{{ __('de devenir') }}

+

{{ __('un explorateur agis') }}

+ {{-- FIRST --}} +
+
+

{{ __('01') }}

+
+
+

{{ Str::of(__('des hommes et des femmes'))->ucFirst()->value() }}

+

{{ __('bienveillants') }}

+

{{ __('motivés et impliqués.') }}

+
+
+ {{-- SECOND --}} +
+
+

+ {{ __('innovation') }} + {{ __('qualité') }} + {{ __('performance') }} +

+

{{ __('sont les meilleurs ingrédients') }}

+

{{ __('de notre entreprise.') }}

+
+
+

{{ __('02') }}

+
+
+ {{-- THIRD --}} +
+
+

{{ __('03') }}

+
+
+

{{ __('vous aimez') }}

+

{{ __('manger ?') }}

+

{{ Str::of(__('rejoignez notre équipe'))->ucFirst()->value() }}

+

{{ __('de Gastronomes') }}

+
+
+ {{-- FOURTH --}} +
+
+

{{ Str::of(__('une entreprise'))->ucFirst()->value() }}

+

{{ __('humaine') }}

+

{{ __('& à l\'écoute de ses talents.') }}

+
+
+

{{ __('04') }}

+
+
+ {{-- FIFTH --}} +
+
+

{{ __('05') }}

+
+
+

{{ Str::of(__('des formations'))->ucFirst()->value() }}

+

{{ __('qualifiantes') }}

+

{{ __('pour gagner en compétences.') }}

+
+
+
+
+
+
+
+

{{ __('Nous sommes tous animés par la passion de nos métiers !') }}

+

{{ __('Une équipe de talents à renforcer.') }}

+ +
+
+

{{ __('Ils témoignent !') }}

+
+
+
+ @foreach ($testimonialModels as $testimonialModel) +
+
+ {{ $testimonialModel->picture_alt }} +
+

{{ $testimonialModel->job }}

+

{{ $testimonialModel->statut }}

+

{{ $testimonialModel->description }}

+
+
+
+ @endforeach +
+ +
+
+
+ @foreach ($testimonialModels as $testimonialModel) +
+
+ {{ $testimonialModel->picture_alt }} +
+

{{ $testimonialModel->job }}

+

{{ $testimonialModel->statut }}

+

{{ $testimonialModel->description }}

+
+
+
+ @endforeach +
+
+
+
+
+
+

{{ __('Vos candidatures spontatées') }}

+
+ @method('POST') + @csrf +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+

{{ __('Pièce jointe') }} :

+
+
+ + +
+
+

+
+
+
+
+
+ + +
+ + + {{ __('cookie-notice.custom.recaptcha.warning') }} + + +
+
+ @if ($errors->has('g-recaptcha-response')) +
+ {{ $errors->first('g-recaptcha-response') }} +
+ @endif +

{{ __('*Champ obligatoire') }}

+
+ +
+
+
+
+
+
+
+@endsection + +@push('scripts') + +@endpush diff --git a/resources/views/vendor/cn-cookies.blade.php b/resources/views/vendor/cn-cookies.blade.php index 692ad90..908abb0 100644 --- a/resources/views/vendor/cn-cookies.blade.php +++ b/resources/views/vendor/cn-cookies.blade.php @@ -29,6 +29,28 @@ $strings = (object)[ $cookies = []; +// YOUTUBE +$cookies['youtube'] = [ + 'name' => __('cookie-notice.custom.youtube.name'), + 'description' => __('cookie-notice.custom.youtube.description'), + 'labelLink' => __('cookie-notice.custom.youtube.labelLink'), + 'link' => 'https://policies.google.com/technologies/cookies?hl=fr&utm_source=ucb', + 'cookies' => ['NID', 'VISITOR_INFO1_LIVE', 'YSC'] +]; + +$cookies['youtube']['script'] = <<