chore: bump CN to 6.0.3
This commit is contained in:
parent
94156c7db0
commit
0cbf60cf03
9 changed files with 252 additions and 194 deletions
|
|
@ -60,6 +60,7 @@ class SecureHeaders
|
|||
'https://yl.s-web.fr',
|
||||
]) . ';',
|
||||
"img-src 'self' data: blob: " . implode(' ', [
|
||||
'https://yl.s-web.fr',
|
||||
// * VITE DEV
|
||||
config('app.debug') ? "https://{$host}:4443" : ''
|
||||
]) . ';',
|
||||
|
|
@ -97,6 +98,7 @@ class SecureHeaders
|
|||
"$scheme://www.google-analytics.com",
|
||||
'https://www.google.com/recaptcha/',
|
||||
'https://www.gstatic.com/recaptcha/',
|
||||
'https://yl.s-web.fr',
|
||||
// * VITE DEV
|
||||
config('app.debug') ? "https://{$host}:4443" : '',
|
||||
]) . ';'
|
||||
|
|
@ -107,8 +109,11 @@ class SecureHeaders
|
|||
implode(' ', $cspPolicies) . $reportUri
|
||||
);
|
||||
$response->headers->set('Feature-Policy', \implode(',', [
|
||||
'fullscreen', 'accelerometer', 'encrypted-media',
|
||||
'gyroscope', 'picture-in-picture'
|
||||
'fullscreen',
|
||||
'accelerometer',
|
||||
'encrypted-media',
|
||||
'gyroscope',
|
||||
'picture-in-picture'
|
||||
]) . ';');
|
||||
return $response;
|
||||
}
|
||||
|
|
|
|||
8
package-lock.json
generated
8
package-lock.json
generated
|
|
@ -12,7 +12,7 @@
|
|||
"@fortawesome/free-regular-svg-icons": "^6.5.1",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.5.1",
|
||||
"@fortawesome/vue-fontawesome": "^3.0.5",
|
||||
"@ldc-web/cookie-notice": "^4.1.0",
|
||||
"@ldc-web/cookie-notice": "^6.0.3",
|
||||
"@sipec/vue3-tags-input": "^3.0.4",
|
||||
"@types/bootstrap": "^5.2.7",
|
||||
"@types/node": "^20.8.2",
|
||||
|
|
@ -1050,9 +1050,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@ldc-web/cookie-notice": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://lab.s-web.fr/api/v4/projects/50/packages/npm/@ldc-web/cookie-notice/-/@ldc-web/cookie-notice-4.1.0.tgz",
|
||||
"integrity": "sha1-bhDGIDjM6T0uMaovPpEc2hjTa+4=",
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://lab.s-web.fr/api/v4/projects/50/packages/npm/@ldc-web/cookie-notice/-/@ldc-web/cookie-notice-6.0.3.tgz",
|
||||
"integrity": "sha1-mW2DD+8ipWkmvKhZ3m9h5wemAHI=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
"@fortawesome/free-regular-svg-icons": "^6.5.1",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.5.1",
|
||||
"@fortawesome/vue-fontawesome": "^3.0.5",
|
||||
"@ldc-web/cookie-notice": "^4.1.0",
|
||||
"@ldc-web/cookie-notice": "^6.0.3",
|
||||
"@sipec/vue3-tags-input": "^3.0.4",
|
||||
"@types/bootstrap": "^5.2.7",
|
||||
"@types/node": "^20.8.2",
|
||||
|
|
|
|||
|
|
@ -1,28 +1,22 @@
|
|||
<?php
|
||||
|
||||
// * Version 4.0.0
|
||||
// phpcs:disable
|
||||
return [
|
||||
'button_customize_cookies' => 'Personnaliser les cookies',
|
||||
'button_close_cookies' => 'Fermer la fenêtre des cookies',
|
||||
'button_forbid' => 'Interdire',
|
||||
'button_allow' => 'Autoriser',
|
||||
'button_toggle_cookie' => 'Autoriser ou refuser',
|
||||
'button_forbid_all' => 'Tout refuser',
|
||||
'button_allow_all' => 'Tout accepter',
|
||||
'button_forbid_all_title' => 'Refuser tous les cookies et fermer le panneau des cookies',
|
||||
'button_allow_all_title' => 'Accepter tous les cookies et fermer le panneau des cookies',
|
||||
'button_customize' => 'Personnaliser',
|
||||
'button_back' => 'Retour',
|
||||
'button_validate_and_close' => 'Valider et fermer',
|
||||
'button_title_open_new_tab' => 'Ouvrir le lien dans un nouvel onglet',
|
||||
'banner_title' => 'Le site internet :site_name utilise des cookies !',
|
||||
'banner_text' => 'Nous utilisons des cookies pour nous assurer du bon fonctionnement de notre site et à des fins analytiques.
|
||||
Vous pouvez changer d’avis à tout moment en cliquant sur l’icône présente sur chaque page de notre site.
|
||||
En autorisant ces services tiers, vous acceptez le dépôt et la lecture de cookies et l’utilisation de technologies de suivi nécessaires à leur bon fonctionnement.',
|
||||
'modal_title' => 'Fenêtre de gestion de cookies',
|
||||
'panel_title' => 'Panneau de gestion des cookies',
|
||||
'panel_content' => 'Contenu du panneau 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.',
|
||||
'picture_cookie_title' => 'Image d’un bon gros cookie',
|
||||
'navigation_title' => 'Navigation du panneau des cookies',
|
||||
'custom' => [
|
||||
|
|
@ -36,22 +30,16 @@ return [
|
|||
'labelLink' => 'En apprendre plus',
|
||||
'warning' => 'Vous devez accepter les cookies pour visionner cette vidéo',
|
||||
],
|
||||
'vimeo' => [
|
||||
'name' => 'Vimeo',
|
||||
'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' => 'reCAPTCHA',
|
||||
'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 reCAPTACHA pour envoyer le formulaire',
|
||||
'warning' => 'Vous devez accepter les cookies reCAPTCHA pour envoyer le formulaire',
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -20,8 +20,22 @@
|
|||
<p class="text-capitalize m-0 text-center">{{ __('T. +33 (0)4 90 80 99 99') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-3 border-dark fw-bold rounded-4 cn-cookie-activate d-flex flex-column flex-md-row mb-3 mt-4 border bg-white p-3"
|
||||
data-cookie-name="recaptcha">
|
||||
<span class="d-flex flex-column w-md-75 w-100">
|
||||
<strong class="text-underline text-bold text-dark fs-6 mb-2">
|
||||
{{ __('cookie-notice.custom.recaptcha.warning') }}
|
||||
</strong>
|
||||
<br><br>
|
||||
<small class="text-dark fw-normal fs-6">
|
||||
{{ __('Acceptez ce cookie pour utiliser les formulaires') }}
|
||||
</small>
|
||||
</span>
|
||||
<button class="btn btn-secondary w-lg-25 h-50 fs-6 rounded-4 mt-md-0 mt-3 border-0"
|
||||
id="recaptcha-accept">{{ __('AUTORISER') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="contact-form" method="POST" action="{{ route('fo.contact.store') }}" enctype="multipart/form-data">
|
||||
<form id="contact-form" method="POST" action="{{ route('fo.contact.store') }}" enctype="multipart/form-data" inert>
|
||||
@method('POST')
|
||||
@csrf
|
||||
<div class="bg-agis-yellow mb-md-5 m-0 pb-5">
|
||||
|
|
@ -33,7 +47,7 @@
|
|||
<div class="row w-100 mx-auto">
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<div class="h-100 me-md-5 position-relative">
|
||||
<fieldset class="select-form d-flex flex-column justify-content-end align-items-start h-100" inert="true">
|
||||
<fieldset class="select-form d-flex flex-column justify-content-end align-items-start h-100">
|
||||
<select class="form-control text-capitalize" name="civility" role="button">
|
||||
<option class="text-capitalize" disabled selected>{{ __('validation.custom.civility') }}</option>
|
||||
@foreach (\App\Enums\Contact\CivilityEnum::toArray() as $key => $enumObject)
|
||||
|
|
@ -47,56 +61,56 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
||||
<label class="mt-1">{{ Str::of(__('validation.attributes.last_name'))->ucFirst() }} :</label>
|
||||
<input class="form-control" name="last_name" value="{{ old('last_name') }}">
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
||||
<label class="mt-1">{{ Str::of(__('validation.attributes.first_name'))->ucFirst() }} :</label>
|
||||
<input class="form-control" name="first_name" value="{{ old('first_name') }}">
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
||||
<label class="mt-1">{{ Str::of(__('validation.custom.society'))->ucFirst() }} :</label>
|
||||
<input class="form-control" name="society" value="{{ old('society') }}">
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
||||
<label class="mt-1">{{ Str::of(__('validation.attributes.email'))->ucFirst() }}* :</label>
|
||||
<input class="form-control" name="email" value="{{ old('email') }}" required>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
||||
<label class="mt-1">{{ Str::of(__('validation.attributes.phone'))->ucFirst() }} :</label>
|
||||
<input class="form-control" name="phone" type="number" value="{{ old('phone') }}">
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
||||
<label class="mt-1">{{ Str::of(__('validation.attributes.address'))->ucFirst() }}* :</label>
|
||||
<input class="form-control" name="address" value="{{ old('address') }}" required>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
||||
<label class="mt-1">{{ Str::of(__('validation.attributes.postal_code'))->ucFirst() }}* :</label>
|
||||
<input class="form-control" name="postal_code" type="number" value="{{ old('postal_code') }}" required>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
||||
<label class="mt-1">{{ Str::of(__('validation.attributes.city'))->ucFirst()->value() }}* :</label>
|
||||
<input class="form-control" name="city" value="{{ old('city') }}" required>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<div class="ms-md-5 position-relative pt-md-0 h-100 pt-4">
|
||||
<fieldset class="select-form d-flex flex-column justify-content-end align-items-start h-100" inert="true">
|
||||
<fieldset class="select-form d-flex flex-column justify-content-end align-items-start h-100">
|
||||
<select class="form-control text-capitalize" name="object" role="button" required>
|
||||
<option class="text-capitalize" disabled selected>{{ __('validation.custom.object') }}</option>
|
||||
@foreach (\App\Enums\Contact\ObjectEnum::toArray() as $key => $enumObject)
|
||||
|
|
@ -114,7 +128,7 @@
|
|||
{{ Str::of(__('pour pouvoir vous répondre nous avons besoin de quelques informations :'))->ucFirst()->value() }}
|
||||
</p>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
||||
<label class="mt-1" for="product_name">
|
||||
{{ Str::of(__('validation.custom.product_name'))->ucFirst()->value() }}* :
|
||||
</label>
|
||||
|
|
@ -123,7 +137,7 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
||||
<label class="mt-1" for="product_date_limit">
|
||||
{{ Str::of(__('validation.custom.product_date_limit'))->ucFirst()->value() }}* :
|
||||
<span class="text-body-secondary">{{ __('Ex : 25/08/2028') }}</span>
|
||||
|
|
@ -133,7 +147,7 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
||||
<label class="mt-1" for="product_barcode">
|
||||
{{ Str::of(__('validation.custom.product_barcode'))->ucFirst()->value() }}*
|
||||
{{ __('validation.custom.product_barcode_detail') }} :
|
||||
|
|
@ -143,7 +157,7 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
||||
<label class="mt-1" for="product_lot">
|
||||
{{ Str::of(__('validation.custom.product_lot'))->ucFirst()->value() }}* :
|
||||
</label>
|
||||
|
|
@ -152,7 +166,7 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
||||
<label class="mt-1" for="product_date_consumption">
|
||||
{{ Str::of(__('validation.custom.product_date_consumption'))->ucFirst()->value() }}* :
|
||||
<span class="text-body-secondary">{{ __('Ex : 25/08/2028') }}</span>
|
||||
|
|
@ -162,7 +176,7 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
||||
<label class="mt-1" for="product_location">
|
||||
{{ Str::of(__('validation.custom.product_location'))->ucFirst()->value() }}* :
|
||||
</label>
|
||||
|
|
@ -171,7 +185,7 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 my-3 p-0">
|
||||
<fieldset class="row" inert="true">
|
||||
<fieldset class="row">
|
||||
<div class="col-12 col-md-6 pe-md-5 m-xl-0 mb-2">
|
||||
<p class="mb-0 mt-1">
|
||||
{{ Str::of(__('souhaitez-vous joindre une photo ?'))->ucFirst()->value() }}
|
||||
|
|
@ -195,7 +209,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="col-12 mb-3 p-0">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start" inert="true">
|
||||
<fieldset class="d-flex flex-column justify-content-center align-items-start">
|
||||
<label class="mt-1" for="message">
|
||||
{{ Str::of(__('message'))->ucFirst()->value() }} {{ __('(entre 3 et 500 caractères)') }}* :
|
||||
</label>
|
||||
|
|
@ -203,8 +217,7 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 mb-1 p-0">
|
||||
<fieldset class="d-flex justify-content-start align-items-start align-items-md-center flex-row"
|
||||
inert="true">
|
||||
<fieldset class="d-flex justify-content-start align-items-start align-items-md-center flex-row">
|
||||
<input class="form-check-input rounded-0 mt-2 p-3" id="accept_rules" name="accept_rules" type="checkbox"
|
||||
value="{{ old('accept_rules') }}" role="button" required>
|
||||
<label class="ms-2 mt-1" for="accept_rules" role="button">
|
||||
|
|
@ -218,8 +231,7 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
<div class="col-12 mb-1 p-0">
|
||||
<fieldset class="d-flex justify-content-start align-items-start align-items-md-center flex-row"
|
||||
inert="true">
|
||||
<fieldset class="d-flex justify-content-start align-items-start align-items-md-center flex-row">
|
||||
<input class="form-check-input rounded-0 mt-2 p-3" id="send_data" name="send_data" type="checkbox"
|
||||
value="{{ old('send_data') }}" role="button" required>
|
||||
<label class="ms-2 mt-1" for="send_data" role="button">
|
||||
|
|
@ -243,13 +255,6 @@
|
|||
),
|
||||
) !!}</span>
|
||||
</div>
|
||||
<span id="recaptcha-warning" href="" rel="nofollow">
|
||||
<strong class="text-underline text-bold text-normal text-danger">
|
||||
{{ __('cookie-notice.custom.recaptcha.warning') }}
|
||||
</strong>
|
||||
<button class="btn btn-sm btn-primary"
|
||||
id="recaptcha-accept">{{ __('Accepter Recaptcha uniquement') }}</button>
|
||||
</span>
|
||||
<div class="d-flex flex-column justify-content-center align-items-center">
|
||||
<div id="r_captcha"></div>
|
||||
@if ($errors->has('g-recaptcha-response'))
|
||||
|
|
@ -262,8 +267,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<button class="g-recaptcha btn btn-primary w-100 text-capitalize"
|
||||
data-sitekey="{{ config('services.google.recaptcha.public') }}" type="submit"
|
||||
inert="true">{{ Str::ucfirst(__('contact.send')) }}</button>
|
||||
data-sitekey="{{ config('services.google.recaptcha.public') }}"
|
||||
type="submit">{{ Str::ucfirst(__('contact.send')) }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
|
@ -272,7 +277,14 @@
|
|||
@push('scripts')
|
||||
<script nonce="{{ $nonce }}">
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const initFormCaptcha = () => {
|
||||
const newDiv = document.createElement("div");
|
||||
newDiv.classList.add('g-recaptcha');
|
||||
document.getElementById('r_captcha').appendChild(newDiv);
|
||||
document.getElementById('contact-form').inert = true;
|
||||
};
|
||||
window.__CN_Recaptcha = function() {
|
||||
initFormCaptcha();
|
||||
(function(d, t) {
|
||||
let g = d.createElement(t),
|
||||
s = d.getElementsByTagName(t)[0];
|
||||
|
|
@ -280,16 +292,16 @@
|
|||
s.parentNode.insertBefore(g, s)
|
||||
}(document, 'script'));
|
||||
};
|
||||
window.__CN_Recaptcha_Reset = function() {
|
||||
document.querySelector('#r_captcha > div')?.remove();
|
||||
};
|
||||
window.__CN_Recaptcha_Loaded = function() {
|
||||
grecaptcha.render('r_captcha', {
|
||||
document.getElementById('contact-form').inert = false;
|
||||
grecaptcha.render(document.querySelector('#r_captcha > div'), {
|
||||
'sitekey': '{{ config('services.google.recaptcha.public') }}'
|
||||
});
|
||||
document.getElementById('recaptcha-warning').remove();
|
||||
document.getElementById('contact-form').querySelectorAll('[inert="true"]').forEach(element => {
|
||||
element.inert = false;
|
||||
});
|
||||
};
|
||||
document.getElementById("recaptcha-accept")?.addEventListener('click', function(e) {
|
||||
document.getElementById("recaptcha-accept").addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
window.WebCookieNotice.acceptCookie('recaptcha');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -22,26 +22,12 @@
|
|||
@if ($homepageModel->display_video)
|
||||
<div class="ratio ratio-16x9 y-video">
|
||||
@if (\App\Rules\IsValidVimeoId::validates($homepageModel->video_id))
|
||||
<div class="video-inlaid" type="vimeo"
|
||||
href="https://player.vimeo.com/video/{{ $homepageModel->video_id }}?autoplay=1&loop=1&badge=0">
|
||||
<a class="cn-cookie-link" id="vimeo-warning" href="" rel="nofollow">
|
||||
<strong class="text-underline text-bold text-normal text-danger">
|
||||
{{ __('cookie-notice.custom.vimeo.warning') }}
|
||||
</strong>
|
||||
</a>
|
||||
</div>
|
||||
<div class="cn-vimeo" data-id="{{ $homepageModel->video_id }}"></div>
|
||||
@endif
|
||||
@if (\App\Rules\IsValidYoutubeId::validates($homepageModel->video_id))
|
||||
{{-- For loop to work need to provide a playlist --}}
|
||||
{{-- http://web.archive.org/web/20121016180134/http://brianwong.com/blog/2012-youtube-embed-code-autoplay-on-and-all-other-parameters/ --}}
|
||||
<div class="video-inlaid" type="youtube"
|
||||
href="https://www.youtube.com/embed/{{ $homepageModel->video_id }}?autoplay=1&loop=1">
|
||||
<a class="cn-cookie-link" id="youtube-warning" href="" rel="nofollow">
|
||||
<strong class="text-underline text-bold text-normal text-danger">
|
||||
{{ __('cookie-notice.custom.youtube.warning') }}
|
||||
</strong>
|
||||
</a>
|
||||
</div>
|
||||
<div class="cn-youtube" data-id="{{ $homepageModel->video_id }}"></div>
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
|
|
@ -170,8 +156,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<img src="{{ asset($rangeModel->picture_thumbnail) }}"
|
||||
title="{{ $rangeModel->picture_thumbnail_title }}"
|
||||
alt="{{ $rangeModel->picture_thumbnail_alt }}">
|
||||
title="{{ $rangeModel->picture_thumbnail_title }}" alt="{{ $rangeModel->picture_thumbnail_alt }}">
|
||||
<div class="w-100 d-xl-none">
|
||||
<a class="text-dark w-fit"
|
||||
href="{{ route('fo.ranges.show', $rangeModel->slug) }}">{{ __('> En savoir +') }}</a>
|
||||
|
|
|
|||
|
|
@ -104,22 +104,10 @@
|
|||
<p>{{ __('Une équipe de talents à renforcer.') }}</p>
|
||||
<div class="ratio ratio-16x9">
|
||||
@if (\App\Rules\IsValidYoutubeId::validates($joinuspageModel->video_id))
|
||||
<div class="video-inlaid" type="youtube" href="https://www.youtube.com/embed/{{ $joinuspageModel->video_id }}">
|
||||
<a class="cn-cookie-link" id="youtube-warning" href="" rel="nofollow">
|
||||
<strong class="text-underline text-bold text-normal text-danger">
|
||||
{{ __('cookie-notice.custom.youtube.warning') }}
|
||||
</strong>
|
||||
</a>
|
||||
</div>
|
||||
<div class="cn-youtube" data-id="{{ $joinuspageModel->video_id }}"></div>
|
||||
@endif
|
||||
@if (\App\Rules\IsValidVimeoId::validates($joinuspageModel->video_id))
|
||||
<div class="video-inlaid" type="vimeo" href="https://player.vimeo.com/video/{{ $joinuspageModel->video_id }}">
|
||||
<a class="cn-cookie-link" id="vimeo-warning" href="" rel="nofollow">
|
||||
<strong class="text-underline text-bold text-normal text-danger">
|
||||
{{ __('cookie-notice.custom.vimeo.warning') }}
|
||||
</strong>
|
||||
</a>
|
||||
</div>
|
||||
<div class="cn-vimeo" data-id="{{ $joinuspageModel->video_id }}"></div>
|
||||
@endif
|
||||
</div>
|
||||
<p>
|
||||
|
|
|
|||
256
resources/views/vendor/cn-cookies.blade.php
vendored
256
resources/views/vendor/cn-cookies.blade.php
vendored
|
|
@ -11,24 +11,87 @@ $strings = (object)[
|
|||
'button_customize_cookies' => __('cookie-notice.button_customize_cookies'),
|
||||
'button_close_cookies' => __('cookie-notice.button_close_cookies'),
|
||||
'button_title_open_new_tab' => __('cookie-notice.button_title_open_new_tab'),
|
||||
'button_forbid' => __('cookie-notice.button_forbid'),
|
||||
'button_allow' => __('cookie-notice.button_allow'),
|
||||
'button_toggle_cookie' => __('cookie-notice.button_toggle_cookie'),
|
||||
'button_forbid_all' => Str::upper(__('cookie-notice.button_forbid_all')),
|
||||
'button_allow_all' => Str::upper(__('cookie-notice.button_allow_all')),
|
||||
'button_customize' => Str::upper(__('cookie-notice.button_customize')),
|
||||
'button_forbid_all_title' => __('cookie-notice.button_forbid_all_title'),
|
||||
'button_allow_all_title' => __('cookie-notice.button_allow_all_title'),
|
||||
'button_back' => Str::upper(__('cookie-notice.button_back')),
|
||||
'button_validate_and_close' => Str::upper(__('cookie-notice.button_validate_and_close')),
|
||||
'banner_title' => __('cookie-notice.banner_title', ['site_name' => $site_name]),
|
||||
'banner_text' => __('cookie-notice.banner_text'),
|
||||
'panel_title' => __('cookie-notice.panel_title'),
|
||||
'banner_text' => sprintf(
|
||||
"%s<br><br>%s",
|
||||
"Nous utilisons des cookies pour nous assurer du bon fonctionnement de notre site et à des fins analytiques. Vous pouvez changer d'avis à tout moment en cliquant sur l'icône présente sur chaque page de notre site. En autorisant ces services tiers, vous acceptez le dépôt et la lecture de cookies et l'utilisation de technologies de suivi nécessaires à leur bon fonctionnement.",
|
||||
"<a href='/charte-de-confidentialite'>Charte de confidentialité</a>"
|
||||
),
|
||||
'panel_content' => __('cookie-notice.panel_content'),
|
||||
'panel_subtitle' => __('cookie-notice.panel_subtitle'),
|
||||
'panel_details' => __('cookie-notice.panel_details'),
|
||||
'picture_cookie_title' => __('cookie-notice.picture_cookie_title'),
|
||||
'navigation_title' => __('cookie-notice.navigation_title'),
|
||||
];
|
||||
|
||||
$cookieInline = function ($cookieName, $text, $subtext = '') {
|
||||
return <<<SCRIPT
|
||||
(() => {
|
||||
const cookieActivateContainer = document.createElement("div");
|
||||
cookieActivateContainer.classList.add(
|
||||
'd-flex',
|
||||
'justify-content-center',
|
||||
'align-items-center'
|
||||
);
|
||||
|
||||
const cookieActivate = document.createElement("span");
|
||||
cookieActivate.classList.add(
|
||||
'cn-cookie-activate',
|
||||
'border',
|
||||
'border-3',
|
||||
'border-dark',
|
||||
'p-3',
|
||||
'rounded-3',
|
||||
'text-center'
|
||||
);
|
||||
cookieActivate.dataset.cookieName = '{$cookieName}';
|
||||
|
||||
const childSpan = document.createElement("span");
|
||||
const childSpanSpan = document.createElement("span");
|
||||
childSpanSpan.classList.add(
|
||||
'text-dark',
|
||||
'fs-6',
|
||||
'fw-bold',
|
||||
'lh-sm'
|
||||
);
|
||||
const childSpanSmall = document.createElement("span");
|
||||
childSpanSmall.classList.add(
|
||||
'small-text',
|
||||
'fs-6',
|
||||
'lh-sm'
|
||||
);
|
||||
childSpanSpan.textContent = '{$text}';
|
||||
childSpanSmall.textContent = '{$subtext}';
|
||||
childSpan.appendChild(childSpanSpan);
|
||||
childSpan.appendChild(childSpanSmall);
|
||||
|
||||
const childBtn = document.createElement("button");
|
||||
childBtn.classList.add(
|
||||
'btn',
|
||||
'btn-secondary',
|
||||
'rounded-2',
|
||||
'border-0',
|
||||
'fs-6',
|
||||
'fw-bold',
|
||||
'ms-3',
|
||||
'px-4',
|
||||
'py-3'
|
||||
);
|
||||
childBtn.textContent = 'Autoriser';
|
||||
|
||||
cookieActivate.appendChild(childSpan);
|
||||
cookieActivate.appendChild(childBtn);
|
||||
cookieActivateContainer.appendChild(cookieActivate);
|
||||
return cookieActivateContainer;
|
||||
})
|
||||
SCRIPT;
|
||||
};
|
||||
|
||||
$cookies = [];
|
||||
|
||||
// YOUTUBE
|
||||
|
|
@ -37,52 +100,42 @@ $cookies['youtube'] = [
|
|||
'description' => __('cookie-notice.custom.youtube.description'),
|
||||
'labelLink' => __('cookie-notice.custom.youtube.labelLink'),
|
||||
'link' => 'https://policies.google.com/technologies/cookies?hl=fr&utm_source=ucb',
|
||||
'labelLink' => __('En savoir +'),
|
||||
'cookies' => ['NID', 'VISITOR_INFO1_LIVE', 'YSC']
|
||||
'cookies' => [
|
||||
"NID", "ENID", "_Secure-ENID", "VISITOR_INFO1_LIVE", "YEC", "__Secure-YEC", "YSC",
|
||||
"GEUP", "PREF", "pm_sess", "CGIC", "SOCS", "GPS", "yt-player-bandwidth", "yt-player-headers-readable"
|
||||
]
|
||||
];
|
||||
$inlineYt = $cookieInline(
|
||||
'youtube',
|
||||
'Youtube est désactivé'
|
||||
);
|
||||
|
||||
$cookies['youtube']['script'] = <<<SCRIPT
|
||||
function () {
|
||||
// * Video inlaid.
|
||||
const videoInlaidList = document.querySelectorAll('.video-inlaid[type="youtube"]');
|
||||
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");
|
||||
}
|
||||
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);
|
||||
let youtubeVids = document.getElementsByClassName('cn-youtube');
|
||||
for (let item of youtubeVids) {
|
||||
let id = item.dataset.id;
|
||||
let e = document.createElement('iframe');
|
||||
e.src = "https://www.youtube.com/embed/" + id + "?autoplay=1&loop=1&playlist=" + id;
|
||||
e.width = "1920px";
|
||||
e.height = "1080px";
|
||||
e.classList.add("w-100");
|
||||
e.classList.add("h-100");
|
||||
e.frameBorder = "0";
|
||||
e.allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture";
|
||||
e.allowFullscreen = true;
|
||||
item.innerHTML = "";
|
||||
item.appendChild(e);
|
||||
}
|
||||
}
|
||||
SCRIPT;
|
||||
$cookies['youtube']['fallback'] = <<<FALLBACK
|
||||
function () {
|
||||
// * Video inlaid.
|
||||
const videoInlaidList = document.querySelectorAll('.video-inlaid[type="youtube"]');
|
||||
for (const item of videoInlaidList) {
|
||||
let a = document.createElement('a');
|
||||
a.innerText = 'Autoriser';
|
||||
a.classList.add('cn-cookie-link');
|
||||
a.setAttribute('role', 'button');
|
||||
a.onclick = function () {
|
||||
WebCookieNotice.openCookieModalToCookiePage();
|
||||
};
|
||||
let e = document.createElement('p');
|
||||
e.innerHTML = 'Youtube est désactivé. ';
|
||||
let youtubeVids = document.getElementsByClassName('cn-youtube');
|
||||
for (let item of youtubeVids) {
|
||||
item.innerHTML = "";
|
||||
e.appendChild(a);
|
||||
item.appendChild(e);
|
||||
item.appendChild({$inlineYt}());
|
||||
setTimeout(() => listenInlineCnButtons(), 500);
|
||||
}
|
||||
}
|
||||
FALLBACK;
|
||||
|
|
@ -93,61 +146,55 @@ $cookies['vimeo'] = [
|
|||
'description' => __('Les cookies déposés via les services de partage de vidéo ont pour finalité de permettre à l’utilisateur de visionner directement sur le site le contenu multimédia.'),
|
||||
'link' => 'https://vimeo.com/cookie_policy',
|
||||
'labelLink' => __('En savoir +'),
|
||||
'cookies' => ['NID', 'VISITOR_INFO1_LIVE', 'YSC']
|
||||
'cookies' => [
|
||||
"vuid", "__utmt_player"
|
||||
]
|
||||
];
|
||||
$inlineVo = $cookieInline(
|
||||
'vimeo',
|
||||
'Vimeo est désactivé'
|
||||
);
|
||||
|
||||
$cookies['vimeo']['script'] = <<<SCRIPT
|
||||
function () {
|
||||
let videoInlaidList = document.querySelectorAll('.video-inlaid[type="vimeo"]');
|
||||
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");
|
||||
}
|
||||
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);
|
||||
let vimeoVids = document.getElementsByClassName('cn-vimeo');
|
||||
for (let item of vimeoVids) {
|
||||
let id = item.dataset.id;
|
||||
let e = document.createElement('iframe');
|
||||
e.src = "https://player.vimeo.com/video/" + id + "?autoplay=1&loop=1&badge=0";
|
||||
e.width = "1920px";
|
||||
e.height = "1080px";
|
||||
e.classList.add("w-100");
|
||||
e.classList.add("h-100");
|
||||
e.frameBorder = "0";
|
||||
e.allow = "autoplay; fullscreen; picture-in-picture";
|
||||
e.allowFullscreen = true;
|
||||
item.innerHTML = "";
|
||||
item.appendChild(e);
|
||||
}
|
||||
}
|
||||
SCRIPT;
|
||||
$cookies['vimeo']['fallback'] = <<<FALLBACK
|
||||
function () {
|
||||
let videoInlaidList = document.querySelectorAll('.video-inlaid[type="vimeo"]');
|
||||
for (const item of videoInlaidList) {
|
||||
let a = document.createElement('a');
|
||||
a.innerText = 'Autoriser';
|
||||
a.classList.add('cn-cookie-link');
|
||||
a.setAttribute('role', 'button');
|
||||
a.onclick = function () {
|
||||
WebCookieNotice.openCookieModalToCookiePage();
|
||||
};
|
||||
let e = document.createElement('p');
|
||||
e.innerHTML = 'Vimeo est désactivé. ';
|
||||
let vimeoVids = document.getElementsByClassName('cn-vimeo');
|
||||
for (let item of vimeoVids) {
|
||||
item.innerHTML = "";
|
||||
e.appendChild(a);
|
||||
item.appendChild(e);
|
||||
item.appendChild({$inlineVo}());
|
||||
setTimeout(() => listenInlineCnButtons(), 500);
|
||||
}
|
||||
}
|
||||
FALLBACK;
|
||||
|
||||
|
||||
// RECAPTCHA
|
||||
$cookies['recaptcha'] = [
|
||||
'name' => __('cookie-notice.custom.recaptcha.title'),
|
||||
'description' => __('cookie-notice.custom.recaptcha.description'),
|
||||
'link' => 'https://policies.google.com/privacy',
|
||||
'labelLink' => __('En savoir +'),
|
||||
'cookies' => ['NID', '__Secure-3PAPISID', '__Secure-3PSID', '__Secure-3PSIDCC']
|
||||
'name' => __('cookie-notice.custom.recaptcha.title'),
|
||||
'description' => __('cookie-notice.custom.recaptcha.description'),
|
||||
'link' => 'https://policies.google.com/privacy',
|
||||
'labelLink' => __('cookie-notice.custom.recaptcha.labelLink'),
|
||||
'cookies' => [
|
||||
"NID", "_grecaptcha", "__Secure-3PAPISID", "__Secure-3PSID", "__Secure-3PSIDCC",
|
||||
"_GRECAPTCHA", "rc::c", "rc::b", "rc::a", "itsec-recaptcha-opt-in-*"
|
||||
]
|
||||
];
|
||||
|
||||
$cookies['recaptcha']['script'] = <<<SCRIPT
|
||||
|
|
@ -155,16 +202,39 @@ function () {
|
|||
if (window.__CN_Recaptcha) {
|
||||
window.__CN_Recaptcha();
|
||||
}
|
||||
[...document.getElementsByClassName('cn-cookie-activate')].forEach(function(el) {
|
||||
if (el.dataset.cookieName === 'recaptcha') {
|
||||
el.classList.add('d-none');
|
||||
document.getElementById('contact-form').inert = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
SCRIPT;
|
||||
$cookies['recaptcha']['fallback'] = <<<FALLBACK
|
||||
function () {
|
||||
if (window.__CN_Recaptcha_Reset) {
|
||||
window.__CN_Recaptcha_Reset();
|
||||
}
|
||||
[...document.getElementsByClassName('cn-cookie-activate')].forEach(function(el) {
|
||||
if (el.dataset.cookieName === 'recaptcha') {
|
||||
el.classList.remove('d-none');
|
||||
document.getElementById('contact-form').inert = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
FALLBACK;
|
||||
|
||||
// MATOMO
|
||||
$cookies['matomo'] = [
|
||||
'name' => __('cookie-notice.custom.matomo.title'),
|
||||
'description' => __('cookie-notice.custom.matomo.description'),
|
||||
'link' => 'https://fr.matomo.org/gdpr-analytics/',
|
||||
'labelLink' => __('En savoir +'),
|
||||
'cookies' => ['_pk']
|
||||
'labelLink' => __('cookie-notice.custom.matomo.labelLink'),
|
||||
'cookies' => [
|
||||
"_pk*",
|
||||
"_pk_ref", "_pk_cvar", "_pk_id", "_pk_ses", "_pk_hsr", "piwik_ignore", "_pk_uid",
|
||||
"_pk_ref", "_pk_cvar", "_pk_id", "_pk_ses", "_pk_hsr", "mtm_consent", "matomo_ignore", "matomo_sessid"
|
||||
]
|
||||
];
|
||||
|
||||
$cookies['matomo']['script'] = <<<SCRIPT
|
||||
|
|
@ -216,6 +286,24 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
window.WebCookieNotice['{{ $index_name }}'] = window.WebCookieNotice['{{ $index_name }}'].conf;
|
||||
@endforeach
|
||||
window.WebCookieNotice = new window.CookieNotice(window.WebCookieNotice);
|
||||
|
||||
function listenInlineCnButtons() {
|
||||
const cookieInlineActivation =
|
||||
document.getElementsByClassName("cn-cookie-activate");
|
||||
[...cookieInlineActivation].forEach((cookieEl) => {
|
||||
const cookieBtnActivation = cookieEl.querySelector("button");
|
||||
if (!cookieBtnActivation) {
|
||||
throw new Error("Invalid template cookie button");
|
||||
}
|
||||
cookieBtnActivation.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
if (cookieEl.dataset.cookieName) {
|
||||
window.WebCookieNotice.acceptCookie(cookieEl.dataset.cookieName);
|
||||
cookieEl.classList.add("d-none");
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
|
|||
|
|
@ -33,19 +33,14 @@
|
|||
<span>{!! nl2br(e($strings->banner_title)) !!}</span>
|
||||
</div>
|
||||
<div class="cn-banner-para-p">
|
||||
<p>{!! nl2br(e($strings->banner_text)) !!}</p>
|
||||
<p>{!! clean($strings->banner_text) !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- 2ND PAGE CUSTOMIZE PANEL --}}
|
||||
<div class="cn-modal-container d-none">
|
||||
<p class="cn-modal-title" aria-level="h2">{{ $strings->panel_title }}</p>
|
||||
<p class="cn-modal-subtitle">{!! nl2br(e($strings->panel_subtitle)) !!}</p>
|
||||
<p class="cn-modal-description">{!! nl2br(e($strings->panel_details)) !!}</p>
|
||||
<div class="cn-modal-wrapper">
|
||||
{{-- COOKIES LIST --}}
|
||||
<ul id="cn-modal-list"></ul>
|
||||
</div>
|
||||
{{-- COOKIES LIST --}}
|
||||
<ul id="cn-modal-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
{{-- NAV BAR --}}
|
||||
|
|
@ -54,7 +49,7 @@
|
|||
title="{{ $strings->button_forbid_all_title }}">{{ $strings->button_forbid_all }}</button>
|
||||
<button class="cn-banner-btn cn-accept" id="cn-accept-banner"
|
||||
title="{{ $strings->button_allow_all_title }}">{{ $strings->button_allow_all }}</button>
|
||||
<button class="cn-banner-btn cn-custom" id="cn-settings-banner" data-open-modal="{{ $strings->button_back }}"
|
||||
<button class="cn-banner-btn cn-custom" id="cn-settings-banner" data-open-modal="{{ $strings->button_validate_and_close }}"
|
||||
data-close-modal="{{ $strings->button_customize }}">{{ $strings->button_customize }}</button>
|
||||
</div>
|
||||
|
||||
|
|
@ -67,14 +62,11 @@
|
|||
<a class="cn-cookie-link" title="{{ $strings->button_title_open_new_tab }}" target="blank">#link</a>
|
||||
</div>
|
||||
<div class="cn-cookie-buttons">
|
||||
<div class="deny">
|
||||
<input id="" name="" data-name="" data-status="false" type="radio">
|
||||
<label for="" role="button" tabindex="0">{{ $strings->button_forbid }}</label>
|
||||
</div>
|
||||
<div class="accept">
|
||||
<input id="" name="" data-name="" data-status="true" type="radio">
|
||||
<label for="" role="button" tabindex="0">{{ $strings->button_allow }}</label>
|
||||
</div>
|
||||
<label class="cn-switch" title="{{ $strings->button_toggle_cookie }}" role="checkbox"
|
||||
aria-label="{{ $strings->button_toggle_cookie }}" aria-checked="undefined" tabindex="0">
|
||||
<input type="checkbox" tabindex="-1" />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue