From 4d5dc72b11c6d837c7cd7d20f5c9c022b866406f Mon Sep 17 00:00:00 2001 From: Sebastien Hattry Date: Tue, 24 Oct 2023 12:12:23 +0200 Subject: [PATCH] issue-30 - Add cookie notice --- package-lock.json | 9 +- package.json | 11 +- resources/lang/fr/cookie-notice.php | 36 + resources/sass/fo/fo.scss | 1 + resources/sass/fo/vendor/_cookie-notice.scss | 621 ++++++++++++++++++ resources/ts/fo/fo.ts | 4 + resources/ts/index.d.ts | 2 + resources/views/fo/layout.blade.php | 1 + resources/views/fo/layouts/footer.blade.php | 4 + resources/views/vendor/cn-cookies.blade.php | 111 ++++ .../standard.blade.php | 91 +++ 11 files changed, 885 insertions(+), 6 deletions(-) create mode 100644 resources/lang/fr/cookie-notice.php create mode 100644 resources/sass/fo/vendor/_cookie-notice.scss create mode 100644 resources/views/vendor/cn-cookies.blade.php create mode 100644 resources/views/vendor/cookie-notice-templates/standard.blade.php diff --git a/package-lock.json b/package-lock.json index e73e08e..1c3b857 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "agis", + "name": "srcs", "lockfileVersion": 3, "requires": true, "packages": { @@ -12,6 +12,7 @@ "@fortawesome/free-regular-svg-icons": "latest", "@fortawesome/free-solid-svg-icons": "latest", "@fortawesome/vue-fontawesome": "^3.0.3", + "@ldc-web/cookie-notice": "^3.0.9", "@sipec/vue3-tags-input": "^3.0.4", "@types/bootstrap": "^5.2.7", "@types/node": "^20.8.2", @@ -2416,6 +2417,12 @@ "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==", "dev": true }, + "node_modules/@ldc-web/cookie-notice": { + "version": "3.0.9", + "resolved": "https://lab.s-web.fr/api/v4/projects/50/packages/npm/@ldc-web/cookie-notice/-/@ldc-web/cookie-notice-3.0.9.tgz", + "integrity": "sha1-zU6WMyLg3pHdeT0K9i25HeQ8+Ik=", + "dev": true + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", diff --git a/package.json b/package.json index 5bc8086..ef9ea56 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@fortawesome/free-regular-svg-icons": "latest", "@fortawesome/free-solid-svg-icons": "latest", "@fortawesome/vue-fontawesome": "^3.0.3", + "@ldc-web/cookie-notice": "^3.0.9", "@sipec/vue3-tags-input": "^3.0.4", "@types/bootstrap": "^5.2.7", "@types/node": "^20.8.2", @@ -36,9 +37,9 @@ "bootstrap": "^5.3.2", "chart.js": "^4.4.0", "cropperjs": "^1.6.1", + "eslint": "latest", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-vue": "latest", - "eslint": "latest", "laravel-vite-plugin": "latest", "postcss-discard-comments": "^6.0.0", "prettier": "latest", @@ -46,25 +47,25 @@ "resolve-url-loader": "^5.0.0", "sass": "latest", "slugify": "^1.6.6", + "stylelint": "latest", "stylelint-config-idiomatic-order": "github:ream88/stylelint-config-idiomatic-order", "stylelint-config-sass-guidelines": "latest", "stylelint-config-standard-scss": "latest", "stylelint-scss": "latest", - "stylelint": "latest", "sweetalert2": "^11.7.31", "terser": "latest", "toastify-js": "^1.12.0", "ts-loader": "^9.3.1", - "typescript-eslint": "^0.0.1-alpha.0", "typescript": "latest", + "typescript-eslint": "^0.0.1-alpha.0", + "vite": "^4.0.0", "vite-plugin-babel": "^1.1.3", "vite-plugin-checker": "latest", "vite-plugin-eslint": "latest", "vite-plugin-stylelint": "latest", - "vite": "^4.0.0", + "vue": "latest", "vue-eslint-parser": "^9.1.0", "vue-loader": "^16.8.3", - "vue": "latest", "vue-tsc": "1.6.0" } } diff --git a/resources/lang/fr/cookie-notice.php b/resources/lang/fr/cookie-notice.php new file mode 100644 index 0000000..ead47d5 --- /dev/null +++ b/resources/lang/fr/cookie-notice.php @@ -0,0 +1,36 @@ + '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.', + + 'custom' => [ + '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.', + ], + 'recaptcha' => [ + '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.', + ] + ] +]; diff --git a/resources/sass/fo/fo.scss b/resources/sass/fo/fo.scss index 6d66a3c..ab3e017 100644 --- a/resources/sass/fo/fo.scss +++ b/resources/sass/fo/fo.scss @@ -6,6 +6,7 @@ // * VENDOR @import './vendor/ckEditorContent'; @import './vendor/bootstrap'; +@import "./vendor/cookie-notice"; // * BASE @import './base/bootstrap-overload'; diff --git a/resources/sass/fo/vendor/_cookie-notice.scss b/resources/sass/fo/vendor/_cookie-notice.scss new file mode 100644 index 0000000..d79ad41 --- /dev/null +++ b/resources/sass/fo/vendor/_cookie-notice.scss @@ -0,0 +1,621 @@ +@use "sass:color"; + +:root { + --cs-primary-color: var(); +} + +$ck-primary-color: #ffd264 !default; +$ck-secondary-color: #e33f1c !default; +$ck-background-color: #fff !default; +$ck-list-background-color: #e4e4e4 !default; +$ck-borders-color: #808080 !default; +$ck-shadow-color: 0 0.1rem 1rem rgb(0 0 0 / 35%) !default; +$ck-title-font: 'Readex Pro', serif !default; +$ck-title-line-height: inherit !default; +$ck-title-size: 25px !default; +$ck-text-font: 'Rufina', serif !default; +$ck-text-size: 14px !default; +$ck-btn-background-color: #fff !default; +$ck-accept-color: #3a3 !default; +$ck-deny-color: #a33 !default; + +// CN Wrapper z-index +$cn-cookie-button-z-index: 1050 !default; + +// Cookie Button dimension +$cn-cookie-button-width: 2.4rem !default; +$cn-cookie-button-height: 2.4rem !default; +$cn-cookie-button-padding: 0.3rem !default; + +// Cookie Button dimension (above mobile) +$cn-cookie-button-width-h: 3rem !default; +$cn-cookie-button-height-h: 3rem !default; +$cn-cookie-button-padding-h: 0.5rem !default; + +// Cookie Button position +$cn-cookie-button-position-left: 0.5rem; /* Distance par rapport à la gauche de la fenêtre */ +$cn-cookie-button-position-right: auto; /* Distance par rapport à la droite de la fenêtre */ +$cn-cookie-button-position-bottom: 0.5rem; /* Distance par rapport au bas de la fenêtre */ +$cn-cookie-animation-left: 0; /* Position gauche de base des cookies */ +$cn-cookie-animation-right: auto; /* Position droite de base des cookies */ + +// Cookie Button position hide btn vars +$cn-cookie-button-position-right-h: auto; +$cn-cookie-button-position-bottom-h: #{$cn-cookie-button-position-bottom - 2rem}; +$cn-cookie-button-position-left-h: #{$cn-cookie-button-position-left - 2rem}; +$cn-cookie-button-transition-show: all 1s 6s; +$cn-cookie-button-transition-hide: all 1s; + +// Buttons +$cn-button-bg-color: $ck-primary-color !default; +$cn-button-font-family: $ck-text-font !default; +$cn-button-font-size: 1rem !default; +$cn-button-line-height: 1 !default; + +@import "@ldc-web/cookie-notice/src/scss/mixins"; +@import "@ldc-web/cookie-notice/src/scss/reset"; + +/** 3.0.0 */ + +/* FENETRE D'ACCUEIL */ +$ck-bg-color: $ck-background-color; + +/* Title settings */ +$ck-w1-bgcolor-title: $ck-background-color; +$ck-w1-font-family-title: $ck-title-font; +$ck-w1-line-height-title: $ck-title-line-height; +$ck-w1-font-size-title: $ck-title-size; +$ck-w1-color-title: $ck-secondary-color; + +/* Text settings */ +$ck-w1-font-family-txt: $ck-text-font; +$ck-w1-font-size-txt: $ck-text-size; +$ck-w1-color-txt: $color-dark; +$ck-w1-color-href-hover: $ck-secondary-color; + +/* Button settings */ +$ck-w1-color-btn-hover: $ck-secondary-color; +$ck-w1-font-family-btn-txt: $ck-text-font; +$ck-w1-font-size-btn-txt: $ck-text-size; +$ck-w1-color-btn-txt-hover: text($ck-secondary-color); + +/* Title settings */ +$ck-w2-font-family-title: $ck-title-font; +$ck-w2-font-size-title: $ck-title-size; +$ck-w2-color-title: $color-dark; + +/* Text settings */ +$ck-w2-font-family-txt: $ck-text-font; +$ck-w2-font-size-txt: $ck-text-size; +$ck-w2-color-txt: $color-dark; + +/* Accept/Deny btn settings */ +$ck-color-accept: $ck-borders-color; +$ck-color-deny: $ck-borders-color; +$ck-color-accept-hover: $ck-accept-color; +$ck-color-deny-hover: $ck-deny-color; +$ck-color-txt: #fff; + +/* Cookies list settings */ +$ck-bgcolor-list: $ck-list-background-color; +$ck-font-family-list: $ck-text-font; +$ck-font-size-list: $ck-text-size; +$ck-color-list: $ck-secondary-color; +$ck-color-title: $ck-secondary-color; +$breakpoint-mobile: 535px; + +%nav-button { + display: flex; + height: 3rem; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 0; + background-color: text($cn-button-bg-color); + color: $cn-button-bg-color; + font-family: $ck-text-font; + font-size: 1rem; + + &:hover, + &:focus { + background-color: color.adjust( + $color: $cn-button-bg-color, + $lightness: -10% + ); + color: text( + color.adjust($color: $cn-button-bg-color, $lightness: -10%) + ); + } + + &:focus { + outline-color: text( + color.adjust($color: $cn-button-bg-color, $lightness: -10%) + ); + } +} + +// * Prevent click on clickable element using cookie notice + +.cn-modal-bg { + display: none; +} + +.cn-open .cn-modal-bg { + position: fixed; + z-index: 1030; + top: 0; + display: block; + width: 100vw; + height: 100vh; + background-color: rgb(0 0 0 / 60%); +} + +.cn-disabled { + pointer-events: none; +} + +#cn-wrapper { + @extend %reset-styles; + // Display over BS elements + z-index: $cn-cookie-button-z-index; + + // BIG COOKIE BTN + #cn-cookie-btn { + position: fixed; + right: $cn-cookie-button-position-right; + bottom: $cn-cookie-button-position-bottom; + left: $cn-cookie-button-position-left; + width: $cn-cookie-button-width; + height: $cn-cookie-button-height; + padding: $cn-cookie-button-padding; + background-color: $ck-btn-background-color; + border-radius: 100%; + box-shadow: $ck-shadow-color; + cursor: pointer; + + @media (min-width: $breakpoint-mobile) { + right: $cn-cookie-button-position-right-h; + bottom: $cn-cookie-button-position-bottom-h; + left: $cn-cookie-button-position-left-h; + width: $cn-cookie-button-width-h; + height: $cn-cookie-button-height-h; + padding: $cn-cookie-button-padding-h; + transition: $cn-cookie-button-transition-show; + + &:hover { + right: $cn-cookie-button-position-right; + bottom: $cn-cookie-button-position-bottom; + left: $cn-cookie-button-position-left; + transition: $cn-cookie-button-transition-hide; + } + } + + &:focus { + outline-color: color.adjust( + $color: $ck-secondary-color, + $lightness: -10% + ); + } + + &-icon { + path { + fill: $ck-secondary-color; + } + + circle { + fill: $ck-secondary-color; + } + } + } + + // COOKIE BANNER MODAL + #cn-banner { + position: fixed; + z-index: $cn-cookie-button-z-index; + top: 0; + bottom: 0; + left: 0; + display: flex; + width: 100vw; + height: 100vh; + max-height: 100vh; + flex-direction: column; + align-items: center; + justify-content: flex-end; + padding: 0; + margin: auto; + margin-bottom: 0; + background-color: $ck-bg-color; + border-radius: 0; + box-shadow: $ck-shadow-color; + line-height: initial; + opacity: 0; + // * prevent body scroll (for mobile) + pointer-events: none; + transition: 0.3s; + user-select: none; + visibility: hidden; + + .cn-modal-top-line { + align-self: end; + + #cn-close-modal { + width: 4rem; + height: 3rem; + border-bottom-left-radius: 0.5rem; + + @media (min-width: $breakpoint-mobile) { + width: 3rem; + height: 2rem; + border-top-right-radius: 0.5rem; + } + } + } + + // * allow child body scroll + > * { + pointer-events: all; + } + + @media (min-width: $breakpoint-mobile) { + right: $cn-cookie-animation-right; + bottom: calc($cn-cookie-button-position-bottom + 60px); + left: $cn-cookie-animation-left; + width: 30rem; + height: auto; + max-height: 26rem; + border-radius: 0.5rem; + } + } + + #cn-li-template { + display: none; + } + + .d-none { + display: none !important; + } + + // CONTENT WRAPPER + .cn-content { + flex-grow: 1; + padding: 0.8rem; + overflow-y: auto; + + // 1rst Page BANNER + .cn-banner-content { + display: flex; + min-height: 100%; + flex-direction: column; + color: $ck-w1-color-txt; + font-family: $ck-w1-font-family-txt; + font-size: $ck-w1-font-size-txt; + + @media (min-width: $breakpoint-mobile) { + flex-flow: row wrap; + align-items: center; + + .cn-banner-img { + width: 33%; + } + + .cn-banner-text { + width: 66%; + } + } + + // LOGO + .cn-banner-img { + text-align: center; + + img { + width: 90%; + object-fit: contain; + } + } + + .cn-banner-text { + flex: 2; + + // TITLE + .cn-banner-title { + color: $ck-w1-color-title; + font-family: $ck-w1-font-family-title; + font-size: $ck-w1-font-size-title; + font-weight: bold; + line-height: $ck-w1-line-height-title; + text-align: left; + } + + .cn-banner-para-p { + margin: 6px 0; + text-align: justify; + } + } + + .cn-banner-details { + display: flex; + overflow: hidden; + height: 0; + flex-direction: row; + align-items: flex-start; + justify-content: center; + text-align: justify; + transition: 0.3s; + } + + .cn-banner-btn-details { + width: 100%; + margin: 1rem 0; + } + + .cn-banner-btn-details-p { + @extend %nav-button; + + display: inline-block; + width: 100%; + margin: 0 auto; + cursor: pointer; + font-size: 14px; + text-align: center; + } + } + + // 2nd Page MODAL + .cn-modal-container { + .cn-modal-title { + color: $ck-w2-color-title; + font-family: $ck-w2-font-family-title; + font-size: $ck-w2-font-size-title; + font-weight: bold; + text-align: center; + } + + .cn-modal-subtitle { + margin-bottom: 6px; + color: $ck-w2-color-txt; + color: $ck-w2-color-title; + font-family: $ck-w2-font-family-txt; + font-size: $ck-w2-font-size-txt; + text-align: center; + } + + .cn-modal-description { + display: flex; + flex-direction: column; + align-items: center; + color: $ck-w2-color-txt; + font-family: $ck-w2-font-family-txt; + font-size: $ck-w2-font-size-txt; + font-weight: normal; + line-height: initial; + } + + .cn-modal-wrapper { + position: relative; + display: flex; + overflow: auto; + flex-direction: column; + align-items: center; + + ul { + display: flex; + flex-direction: column; + padding: 0 20px; + list-style: none; + } + + .cn-cookie-wrapper { + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: 20px; + border: 1px solid $ck-bgcolor-list; + margin: 10px 0; + border-radius: 20px; + } + + span { + color: $ck-color-list; + font-family: $ck-font-family-list; + font-size: $ck-font-size-list; + } + + a { + color: $ck-color-list; + font-family: $ck-font-family-list; + font-size: $ck-font-size-list; + } + + label { + color: $ck-color-list; + font-family: $ck-font-family-list; + font-size: $ck-font-size-list; + } + } + + .cn-cookie { + &-name { + color: $ck-color-title; + } + + &-infos { + display: flex; + width: 100%; + flex: 1; + flex-direction: column; + + span:first-of-type { + font-size: calc($ck-font-size-list * 1.25); + font-weight: bold; + } + + .cn-cookie-description { + color: $ck-w2-color-txt; + } + + a { + width: fit-content; + } + } + + &-buttons { + display: flex; + width: 200px; + justify-content: space-around; + margin-top: 6px; + + input { + display: none; + } + + label { + display: block; + width: 100px; + padding: 6px 20px; + color: $ck-color-txt; + cursor: pointer; + transition: color 0.3s; + } + + div { + display: table; + margin: 0.5em; + text-align: center; + } + } + } + + .accept, + .deny { + label { + @extend %nav-button; + + height: inherit; + background: $ck-color-accept; + } + } + + .accept { + label:hover, + label:focus { + background-color: color.adjust( + $color: $ck-color-accept-hover, + $lightness: -10% + ); + } + + .active { + background-color: $ck-color-accept-hover; + } + } + + .deny { + label:hover, + label:focus { + background-color: color.adjust( + $color: $ck-color-deny-hover, + $lightness: -10% + ); + } + + .active { + background-color: $ck-color-deny-hover; + } + } + + // stylelint-disable-next-line selector-max-compound-selectors + .accept input:checked ~ label { + background-color: $ck-color-accept-hover; + } + // stylelint-disable-next-line selector-max-compound-selectors + .deny input:checked ~ label { + background-color: $ck-color-deny-hover; + } + } + } + + // NAV BAR + .cn-nav { + display: flex; + overflow: hidden; + width: 100%; + height: 3rem * 2; + flex-shrink: 0; + flex-wrap: wrap; + align-items: center; + border-top: 1px solid $ck-borders-color; + + #cn-deny-banner { + @extend %nav-button; + + width: 50%; + } + + #cn-accept-banner { + @extend %nav-button; + + width: 50%; + border-right: 1px solid $ck-borders-color; + border-left: 1px solid $ck-borders-color; + font-weight: bolder; + } + + #cn-settings-banner { + @extend %nav-button; + + width: 100%; + border-top: 1px solid $ck-borders-color; + } + + @media (min-width: $breakpoint-mobile) { + height: 3rem; + flex-wrap: initial; + border-bottom-left-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; + + #cn-deny-banner { + width: 33.33%; + } + + #cn-accept-banner { + width: 33.33%; + } + + #cn-settings-banner { + width: 33.33%; + border-top: initial; + } + } + } + + @media (min-width: $breakpoint-mobile) { + width: 100%; + height: 100%; + } +} + +// SHOW CN BANNER MODAL +.cn-open { + overflow: hidden !important; + + #cn-wrapper #cn-banner { + opacity: 1; + visibility: visible; + + @media (min-width: $breakpoint-mobile) { + right: $cn-cookie-button-position-right; + left: $cn-cookie-button-position-left; + } + } + + #cn-wrapper #cn-cookie-btn { + @media (min-width: $breakpoint-mobile) { + right: $cn-cookie-button-position-right; + bottom: $cn-cookie-button-position-bottom; + left: $cn-cookie-button-position-left; + transition: $cn-cookie-button-transition-hide; + } + } +} diff --git a/resources/ts/fo/fo.ts b/resources/ts/fo/fo.ts index bdbe2fa..f35fa50 100644 --- a/resources/ts/fo/fo.ts +++ b/resources/ts/fo/fo.ts @@ -9,3 +9,7 @@ import "./utilities/vue-fo"; // CUSTOM import "./base/common"; + +// COOKIES +import CookieNotice from "@ldc-web/cookie-notice"; +window.CookieNotice = CookieNotice; diff --git a/resources/ts/index.d.ts b/resources/ts/index.d.ts index 4c614ed..33320fa 100644 --- a/resources/ts/index.d.ts +++ b/resources/ts/index.d.ts @@ -1,6 +1,7 @@ export {}; import { AxiosStatic } from "axios"; import type VueTagsInput from "@sipec/vue3-tags-input"; +import CookieNotice from "@ldc-web/cookie-notice"; // * Enum interface EnumInterface { @@ -74,6 +75,7 @@ declare global { axios: AxiosStatic; Swal: Function; vueDebug: boolean | undefined; + CookieNotice: typeof CookieNotice; __SYSTEM: { _asset: string; _locale: string; diff --git a/resources/views/fo/layout.blade.php b/resources/views/fo/layout.blade.php index 7314dd7..5706ae9 100644 --- a/resources/views/fo/layout.blade.php +++ b/resources/views/fo/layout.blade.php @@ -26,6 +26,7 @@ @include('fo.layouts.footer') @stack('scripts-constants') + @include('vendor.cn-cookies') @include('modules.script-constants') @vite(['resources/ts/fo/fo.ts']) @stack('scripts') diff --git a/resources/views/fo/layouts/footer.blade.php b/resources/views/fo/layouts/footer.blade.php index 2dbe0ea..8ca73a0 100644 --- a/resources/views/fo/layouts/footer.blade.php +++ b/resources/views/fo/layouts/footer.blade.php @@ -102,6 +102,10 @@
{{ __('Branding & Web Design :') }} {{ __('Agence-S') }} + + {{ __('cookie-notice.button_customize_cookies') }} +
diff --git a/resources/views/vendor/cn-cookies.blade.php b/resources/views/vendor/cn-cookies.blade.php new file mode 100644 index 0000000..5278ab4 --- /dev/null +++ b/resources/views/vendor/cn-cookies.blade.php @@ -0,0 +1,111 @@ +{{-- blade-formatter-disable --}} +@php + +$site_name = Str::ucfirst(config('app.name')); +$logo_picture_url = Vite::asset('resources/assets/images/layout/logo.svg', 'build'); +$logo_alt_text = "Logo {$site_name}"; +// $confidentiality_page_url = route('page.confidentiality'); +// TODO : Changer qd la page existera +$confidentiality_page_url = "#"; + +$strings = (object)[ + 'button_customize_cookies' => __('cookie-notice.button_customize_cookies'), + 'button_forbid' => __('cookie-notice.button_forbid'), + 'button_allow' => __('cookie-notice.button_allow'), + '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_back' => Str::upper(__('cookie-notice.button_back')), + 'banner_title' => __('cookie-notice.banner_title', ['site_name' => $site_name]), + 'banner_text_open' => __('cookie-notice.banner_text_open', ['site_name' => $site_name]), + 'banner_text' => __('cookie-notice.banner_text'), + 'banner_details' => __('cookie-notice.banner_details'), + 'banner_details_link' => __('cookie-notice.banner_details_link'), + 'banner_details_link_title' => __('cookie-notice.banner_details_link_title'), + 'banner_more_details' => __('cookie-notice.banner_more_details'), + 'banner_less_details' => __('cookie-notice.banner_less_details'), + 'Panel_title' => __('cookie-notice.Panel_title'), + 'Panel_subtitle' => __('cookie-notice.Panel_subtitle'), + 'Panel_details' => __('cookie-notice.Panel_details'), +]; + +$cookies = []; + +// 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'] +]; + +$cookies['recaptcha']['script'] = << +@endpush diff --git a/resources/views/vendor/cookie-notice-templates/standard.blade.php b/resources/views/vendor/cookie-notice-templates/standard.blade.php new file mode 100644 index 0000000..89a4a1c --- /dev/null +++ b/resources/views/vendor/cookie-notice-templates/standard.blade.php @@ -0,0 +1,91 @@ +