add package cookies 3.1.2 + add matomo - issue #2

This commit is contained in:
Alexis Gousseau 2023-11-27 16:59:50 +01:00
parent 77963e6675
commit 89e278fd6d
16 changed files with 15171 additions and 1061 deletions

2
.gitignore vendored
View file

@ -5,6 +5,8 @@
.ssh/
.upload/
.viminfo
.npmrc
auth.json
# ignore version-checker files
version-checker/

View file

@ -3,7 +3,7 @@ require_once 'vendor/autoload.php';
Dotenv\Dotenv::createImmutable(__DIR__)->load();
// Custom Dotenv Boolean Support
if (! function_exists('evalBool')) {
if (!function_exists('evalBool')) {
function evalBool($value)
{
return (strcasecmp($value, 'true') ? false : true);
@ -23,7 +23,7 @@ require_once 'vendor/autoload.php';
Dotenv\Dotenv::createImmutable(__DIR__)->load();
// Custom Dotenv Boolean Support
if (! function_exists('evalBool')) {
if (!function_exists('evalBool')) {
/**
* Undocumented function
*
@ -195,17 +195,17 @@ define('FROM_MAIL', getenv('FROM_MAIL'));
define('CRM_TOKEN', getenv('CRM_TOKEN'));
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the Codex.
*
* @link https://codex.wordpress.org/Debugging_in_WordPress
*/
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the Codex.
*
* @link https://codex.wordpress.org/Debugging_in_WordPress
*/
define('SCRIPT_DEBUG', evalBool(getenv('SCRIPT_DEBUG')));
define('WP_DEBUG', evalBool(getenv('WP_DEBUG')));
@ -213,6 +213,8 @@ define('WP_DEBUG_DISPLAY', evalBool(getenv('WP_DEBUG_DISPLAY')));
define('WP_HTTP_BLOCK_EXTERNAL', evalBool(getenv('WP_HTTP_BLOCK_EXTERNAL')));
define('MATOMO_SITE_ID', getenv('MATOMO_SITE_ID'));
// LDC WEB STATUS CHECKER
define('PROJECT_UUID', getenv('PROJECT_UUID'));
@ -222,7 +224,7 @@ if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] = "on") {
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
}
/* That's all, stop editing! Happy publishing. */
/* That's all, stop editing! Happy publishing. */
/**
* Absolute path to the WordPress directory.

File diff suppressed because one or more lines are too long

View file

@ -1,585 +0,0 @@
/* DEBUT DU PARAMETRAGE */
/* - Choix des FONTS */
/* - Changement des couleurs et des polices */
:root{
/* PARTIE A RENSEIGNER */
--primary-color: #f8a326;
--secondary-color: #bdbdbd;
--background-color: #ffffff;
--title-font: "Satisfy", sans-serif;
--title-size: 30px;
--text-font: "Barlow", sans-serif;
--text-size: 16px;
--accept-color: #33aa33;
--deny-color: #aa3333;
/* PARTIE A RENSEIGNER FACULTATIF */
/* FENETRE D'ACCUEIL */
--ck-bg-color: var(--background-color);
/* Title settings */
--ck-w1-bgcolor-title: var(--background-color);
--ck-w1-font-family-title: var(--title-font);
--ck-w1-font-size-title: var(--title-size);
--ck-w1-color-title: #000000;
/* Text settings */
--ck-w1-font-family-txt: var(--text-font);
--ck-w1-font-size-txt: var(--text-size);
--ck-w1-color-txt: var(--primary-color);
--ck-w1-color-href-hover: var(--secondary-color);
/* Button settings */
--ck-w1-color-btn: var(--primary-color);
--ck-w1-color-btn-hover: var(--secondary-color);
--ck-w1-font-family-btn-txt: var(--text-font);
--ck-w1-font-size-btn-txt: var(--text-size);
--ck-w1-color-btn-txt: #ffffff;
--ck-w1-color-btn-txt-hover: #ffffff;
--ck-w1-color-btn-border: transparent;
--ck-w1-color-btn-border-hover: transparent;
/* FENETRE DE PERSONNALISATION */
--ck-bg-color-modal-wrapper: #ffffff;
/* Title settings */
--ck-w2-bgcolor-title: var(--primary-color);
--ck-w2-font-family-title: var(--title-font);
--ck-w2-font-size-title: var(--title-size);
--ck-w2-color-title: #ffffff;
/* Text settings */
--ck-w2-font-family-txt: var(--text-font);
--ck-w2-font-size-txt: var(--text-size);
--ck-w2-color-txt: #ffffff;
--ck-w2-color-href-hover: #000000;
/* Accept/Deny btn settings */
--ck-color-accept: #808080;
--ck-color-accept-hover: var(--accept-color);
--ck-color-deny: #808080;
--ck-color-deny-hover: var(--deny-color);
--ck-color-txt: #ffffff;
--ck-color-txt-hover: #ffffff;
/* Cookies list settings */
--ck-bgcolor-list: #e4e4e4;
--ck-font-family-list: var(--text-font);
--ck-font-size-list: var(--text-size);
--ck-color-list: #000000;
}
/* FIN DU PARAMETRAGE */
/* MOBILE FIRST */
#ldcweb-cn *,#ldcweb-cn *::before, #ldcweb-cn *::after {
padding: 0;
margin: 0;
box-sizing: border-box;
}
#template{display: none;}
#ldcweb-cn.open-banner .ldcweb-cn-banner{display: flex;}
#ldcweb-cn.open-modal #ldcweb-cn-modal{display: flex;}
#ldcweb-cn.open-banner, #ldcweb-cn.open-modal{display: flex;}
#ldcweb-cn {
display: none;
flex-direction: column;
justify-content: flex-end;
position: fixed;
left: 0; right: 0;
top: 0; bottom: 0;
width: 100%; height: 100%;
background: rgba(0, 0, 0, 0.7);
z-index: 99999999999;
opacity: 1;
line-height: initial;
}
#ldcweb-cn p,
#ldcweb-cn a{
font-family: var(--ck-w1-font-family-txt);
font-size: var(--ck-w1-font-size-txt);
color: var(--ck-w1-color-txt);
}
#ldcweb-cn a{
text-decoration: underline;
transition: color .5s;
}
#ldcweb-cn a:hover{color: var(--ck-w1-color-href-hover);}
#ldcweb-cn .ldcweb-cn-banner, #ldcweb-cn-modal .modal-wrapper{
overflow: auto;
display: flex;
flex-direction: column;
align-items: center;
}
#ldcweb-cn .ldcweb-cn-banner{
display: none;
padding: 6vw 10vw;
max-height: 50vh;
box-shadow: 0px 5px 10px -5px #000 inset;
background-color: var(--ck-bg-color);
}
#ldcweb-cn .ldcweb-cn-banner div:not(:last-child){margin-bottom: 4vw;}
#ldcweb-cn .banner-img{
flex: 1;
max-width: 200px;
}
#ldcweb-cn .banner-img img{width: 100%;}
#ldcweb-cn .col{flex: 2;}
#ldcweb-cn .banner-title p{
font-family: var(--ck-w1-font-family-title);
font-size: var(--ck-w1-font-size-title);
font-weight: bold;
color: var(--ck-w1-color-title);
text-align: center;
}
#ldcweb-cn .banner-txt{text-align: center;}
#ldcweb-cn .btns {
flex: 1;
display: flex;
flex-direction: column;
}
#ldcweb-cn .btns .btn {
display: block;
/* flex: 1; */
padding: 1em;
text-align: center;
min-width: 12em;
width: 100%;
line-height: 0;
background-color: var(--ck-w1-color-btn);
text-decoration: none;
font-family: var(--ck-w1-font-family-btn-txt);
font-size: var(--ck-w1-font-size-btn-txt);
color: var(--ck-w1-color-btn-txt);
transition: all .5s;
}
#ldcweb-cn .btns .btn:hover {
background-color: var(--ck-w1-color-btn-hover);
background-image: linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.5));
color: var(--ck-w1-color-btn-txt-hover);
}
/* MODAL */
#ldcweb-cn-modal {
display: none;
align-items: center;
justify-content: center;
position: fixed;
left: 0; right: 0;
top: 0; bottom: 0;
width: 100%; height: 100%;
z-index: 200;
background: rgba(0, 0, 0, 0.7);
opacity: 1;
}
#ldcweb-cn-modal .modal-wrapper{
position: relative;
background-color: var(--ck-bg-color-modal-wrapper);
max-height: 100vh;
}
#ldcweb-cn-modal .modal-wrapper > div:not(:first-of-type){width: 100%;}
#ldcweb-cn-modal .modal-btn-close{
position: absolute;
right: 0;
top: 0;
width: 5vw; height: 6vw;
display: flex;
justify-content: center;
align-items: center;
}
#ldcweb-cn-modal .modal-btn-close a{
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
font-weight: bold;
color: var(--ck-w2-color-title);
background-color: var(--ck-w2-bgcolor-title);
text-decoration: none;
border-radius: 0 0 0 50%;
transition: all .5s;
}
#ldcweb-cn-modal .modal-btn-close a:hover{
color: #000000;
background-color: #808080;
background-image: linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.5));
box-shadow: -1px 1px 10px -4px #000;
}
#ldcweb-cn-modal .modal-title, #ldcweb-cn-modal .modal-all
{background-color: var(--ck-w2-bgcolor-title);}
#ldcweb-cn-modal .modal-title .description,
#ldcweb-cn-modal .modal-title > div,
#ldcweb-cn-modal .modal-all{
display: flex;
flex-direction: column;
align-items: center;
}
#ldcweb-cn-modal .modal-title .description,
#ldcweb-cn-modal .modal-title > div a,
#ldcweb-cn-modal .modal-all p,
#ldcweb-cn-modal .modal-all a{
font-family: var(--ck-w2-font-family-txt);
font-size: var(--ck-w2-font-size-txt);
color: var(--ck-w2-color-txt);
text-align: center;
}
#ldcweb-cn-modal .modal-title > div a:hover,
#ldcweb-cn-modal .modal-all a:hover
{color: var(--ck-w2-color-href-hover);}
/* TITLE */
#ldcweb-cn-modal .modal-wrapper .modal-title{padding: 4vw;}
#ldcweb-cn-modal .modal-title .title{
font-family: var(--ck-w2-font-family-title);
font-size: var(--ck-w2-font-size-title);
font-weight: bold;
color: var(--ck-w2-color-title);
text-align: center;
}
#ldcweb-cn-modal .modal-title .title::after,
#ldcweb-cn-modal .modal-title > div::after{
content: "";
display: block;
width: 90%; height: 2px;
margin: 4vw auto;
background-color: rgba(255, 255, 255, .5);
}
#ldcweb-cn-modal .modal-title a{width: fit-content;}
/* ALL */
#ldcweb-cn-modal .modal-wrapper .modal-all{padding: 0 4vw 4vw;}
#ldcweb-cn-modal .modal-all .all-buttons{
display: flex;
flex-direction: column;
align-items: center;
}
#ldcweb-cn-modal .modal-all .all-buttons > div{
width: calc(100% + 15vw);
margin: 2vw 0 0;
}
#ldcweb-cn-modal .modal-all a{
display: block;
padding: 3vw 0;
color: var(--ck-color-txt);
/* font-weight: bold; */
text-decoration: none;
transition: all .5s;
}
#ldcweb-cn-modal .all-buttons > div.accept > a.active {
background-color: var(--ck-color-accept-hover);
background-image: linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.5));
}
#ldcweb-cn-modal .all-buttons > div.deny > a.active {
background-color: var(--ck-color-deny-hover);
background-image: linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.5));
}
#ldcweb-cn-modal .modal-all > div > div:first-of-type a{background-color: var(--ck-color-accept);}
#ldcweb-cn-modal .modal-all > div > div:last-of-type a{background-color: var(--ck-color-deny);}
#ldcweb-cn-modal .modal-all > div > div:first-of-type a:hover{
color: var(--ck-color-txt-hover);
background-color: var(--ck-color-accept-hover);
background-image: linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.5));
}
#ldcweb-cn-modal .modal-all > div > div:last-of-type a:hover{
color: var(--ck-color-txt-hover);
background-color: var(--ck-color-deny-hover);
background-image: linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.5));
}
/* DETAILS */
#ldcweb-cn-modal .modal-wrapper .modal-details{padding: 2vw 0;}
#ldcweb-cn-modal .modal-details ul{
display: flex;
flex-direction: column;
}
#ldcweb-cn-modal .modal-details li > div{
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 2vw 0;
padding: 2vw 4vw;
background-color: var(--ck-bgcolor-list);
}
#ldcweb-cn-modal .modal-details li span,
#ldcweb-cn-modal .modal-details li a,
#ldcweb-cn-modal .modal-details li label{
font-family: var(--ck-font-family-list);
font-size: var(--ck-font-size-list);
color: var(--ck-color-list);
}
#ldcweb-cn-modal .modal-details li a:hover{color:var(--secondary-color);}
#ldcweb-cn-modal .modal-details .ldcweb-cn-infos{
display: flex;
flex-direction: column;
flex: 1;
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-infos span:first-of-type{
font-size: calc(var(--ck-font-size-list) * 1.25);
font-weight: bold;
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-infos a{width: fit-content;}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons{display: flex;}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:first-of-type,
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:last-of-type
{transition: all .5s;}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:first-of-type{
margin-right: 2vw;
background: var(--ck-color-accept);
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:last-of-type{background: var(--ck-color-deny);}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div{
width: 25vw;
margin: 2vw 0;
display: table;
/* font-weight: bold; */
text-align: center;
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:first-of-type:hover,
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:last-of-type:hover{
cursor: pointer;
background: linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.5));
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:hover > label{color: var(--ck-color-txt-hover);}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:first-of-type input:checked ~ label,
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:first-of-type input ~label.active{
background-color: var(--ck-color-accept-hover);
background-image: linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.5));
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:last-of-type input:checked ~ label,
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:last-of-type input ~ label.active{
background-color: var(--ck-color-deny-hover);
background-image: linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.5));
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons input{display: none;}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons label{
display: block;
padding: 1.5vw 0;
color: var(--ck-color-txt);
transition: color .5s;
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons label:hover{
cursor: pointer;
color: var(--ck-color-txt-hover);
}
/* ************************* */
/* ** ** */
/* ************************* */
/* ** ** */
/* ** ** */
/* ** ** */
/* ** ** */
/* ** ** */
/* ** ** */
/* ** ** */
/* ******* */
@media only screen and (min-width:768px) {
#ldcweb-cn .ldcweb-cn-banner{
padding-top: 4vw;
padding-bottom: 4vw;
}
#ldcweb-cn .btns {flex-direction: row;}
#ldcweb-cn .btns > div:first-child,
#ldcweb-cn .btns > div:last-child
{margin-top: 0;}
#ldcweb-cn .btns > div:not(:last-child) {margin: 0 2vw 0 0;}
/* MODAL */
#ldcweb-cn-modal .modal-wrapper{width: 90vw;}
/* ALL */
#ldcweb-cn-modal .modal-all{
flex-direction: row;
justify-content: space-between;
}
#ldcweb-cn-modal .modal-all a{padding: 2vw 0;}
#ldcweb-cn-modal .modal-all .all-buttons > div{margin: 0;}
#ldcweb-cn-modal .modal-all .all-buttons > div:last-of-type{margin: 1vw 0 0;}
#ldcweb-cn-modal .modal-all a{width: 30vw;}
/* DETAILS */
#ldcweb-cn-modal .modal-details li > div{flex-direction: row;}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons{flex-direction: column;}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div{
width: 20vw;
margin: 0;
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:first-of-type{margin: 0 0 1vw;}
}
/* **** */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* **** */
@media only screen and (min-width:1024px) {
#ldcweb-cn .ldcweb-cn-banner{
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
padding: 2vw 3vw;
}
#ldcweb-cn .ldcweb-cn-banner div:not(:last-child){margin: 0 0 .5em 0;}
#ldcweb-cn .ldcweb-cn-banner > div:not(:last-child){margin: 0 4vw 0 0;}
#ldcweb-cn .ldcweb-cn-banner .banner-img{
height: 100%;
display: flex;
align-items: center;
}
#ldcweb-cn .banner-img img{height: fit-content;}
#ldcweb-cn .banner-txt{text-align: start;}
#ldcweb-cn .btns {
height: 100%;
flex-direction: column;
justify-content: center;
}
#ldcweb-cn .btns > div:first-child .btn{margin: 0;}
/* MODAL */
#ldcweb-cn-modal .modal-wrapper{width: 80vw;}
#ldcweb-cn-modal .modal-btn-close{
width: 3vw;
height: 3vw;
}
/* TITLE */
#ldcweb-cn-modal .modal-wrapper .modal-title{padding: 2vw;}
#ldcweb-cn-modal .modal-title .title::after,
#ldcweb-cn-modal .modal-title > div::after{margin: 2vw auto;}
/* ALL */
#ldcweb-cn-modal .modal-wrapper .modal-all{padding: 0 2vw 2vw;}
#ldcweb-cn-modal .modal-all a{padding: 1.5vw 0;}
#ldcweb-cn-modal .modal-all .all-buttons{flex-direction: row;}
#ldcweb-cn-modal .modal-all .all-buttons > div:first-of-type{margin: 0 1vw 0 0;}
#ldcweb-cn-modal .modal-all .all-buttons > div:last-of-type{margin: 0;}
#ldcweb-cn-modal .modal-all a{width: 22vw;}
/* DETAILS */
#ldcweb-cn-modal .modal-wrapper .modal-details{padding: 1vw 0;}
#ldcweb-cn-modal .modal-details li > div{
margin: 1vw 0;
padding: 2vw;
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons{
flex-direction: row;
align-items: center;
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div{
width: 10vw;
margin: 0;
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:first-of-type{margin: 0 1vw 0;}
}
/* ******** */
/* * ***** * */
/* * * * * */
/* *** * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * * */
/* * ************** */
/* * * */
/* ***************** */
@media only screen and (min-width: 1440px) {
#ldcweb-cn .col{flex: 4;}
/* MODAL */
#ldcweb-cn-modal .modal-wrapper{width: 60vw;}
#ldcweb-cn-modal .modal-btn-close{
width: 2vw;
height: 2vw;
}
/* ALL */
#ldcweb-cn-modal .modal-all .all-buttons > div:first-of-type{margin: 0 1vw 0 0;}
#ldcweb-cn-modal .modal-all a{
width: 15vw;
padding: 1vw 0;
}
/* DETAILS */
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div{width: 8vw;}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons label{padding: 1vw 0;}
}
/* ************ */
/* * **** */
/* ********* * */
/* ***** * */
/* ** * */
/* ** * */
/* ********** * */
/* * * */
/* ********* * */
/* ***** * */
/* ** * */
/* ** * */
/* ********** * */
/* * *** */
/* ************ */
@media only screen and (min-width: 1920px) {
#ldcweb-cn p{font-size: calc(var(--ck-w1-font-size-txt) * 1.25);}
#ldcweb-cn .banner-title p{font-size: calc(var(--ck-w1-font-size-title) * 1.25);}
#ldcweb-cn .btns .btn {font-size: calc(var(--ck-w1-font-size-btn-txt) * 1.25);}
/* MODAL */
#ldcweb-cn-modal .modal-wrapper{width: 50vw;}
#ldcweb-cn-modal .modal-btn-close{
width: 2rem;
height: 2rem;
}
#ldcweb-cn-modal .modal-title .description,
#ldcweb-cn-modal .modal-title > div a,
#ldcweb-cn-modal .modal-all p,
#ldcweb-cn-modal .modal-all a
{font-size: calc(var(--ck-w2-font-size-txt) * 1.25);}
/* TITLE */
#ldcweb-cn-modal .modal-wrapper .modal-title{padding: 1vw;}
#ldcweb-cn-modal .modal-title .title{font-size: calc(var(--ck-w2-font-size-title) * 1.25);}
#ldcweb-cn-modal .modal-title .title::after,
#ldcweb-cn-modal .modal-title > div::after{margin: 1vw auto;}
/* ALL */
#ldcweb-cn-modal .modal-wrapper .modal-all{padding: 0 1vw 1vw;}
#ldcweb-cn-modal .modal-all a{
width: 13vw;
padding: .5vw 0;
}
/* DETAILS */
#ldcweb-cn-modal .modal-wrapper .modal-details{padding: .5vw 0;}
#ldcweb-cn-modal .modal-details li > div{
margin: .5vw 0;
padding: 1vw;
}
#ldcweb-cn-modal .modal-details li span,
#ldcweb-cn-modal .modal-details li a,
#ldcweb-cn-modal .modal-details li label
{font-size: calc(var(--ck-font-size-list) * 1.25);}
#ldcweb-cn-modal .modal-details .ldcweb-cn-infos span:first-of-type{font-size: calc(var(--ck-font-size-list) * 1.5);}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons{
flex-direction: row;
align-items: center;
}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div{width: 5vw;}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons div:first-of-type{margin: 0 1vw 0;}
#ldcweb-cn-modal .modal-details .ldcweb-cn-buttons label{padding: .5vw 0;}
}

View file

@ -1,15 +1,17 @@
<?php
/*****************************************************************
Recent Posts
******************************************************************/
$args = array(
'numberposts' => -1,
'offset' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'post',
'post_status' => 'publish',
'suppress_filters' => true );
*****************************************************************/
$args = [
'numberposts' => -1,
'offset' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'post',
'post_status' => 'publish',
'suppress_filters' => true
];
$recent_posts = wp_get_recent_posts($args);
?>
@ -23,151 +25,41 @@ $recent_posts = wp_get_recent_posts($args);
</div> <!-- .row -->
<div class="row">
<div class="col-sm-4 col-md-4">
<h3 class="subtitle">Contact</h3>
<h3 class="subtitle">Contact</h3>
<p class="text">
ESPRI RESTAURATION<br />
Siège<br />
ZI de Beaufeu CS 30018<br />
72210 ROËZ&Eacute;-SUR-SARTHE<br />
ESPRI RESTAURATION<br />
Siège<br />
ZI de Beaufeu CS 30018<br />
72210 ROËZ&Eacute;-SUR-SARTHE<br />
</p>
<p>02 43 39 59 50</p>
</div>
<div class="col-sm-4 col-md-4">
<h3 class="subtitle">Partagez ce site à vos contacts</h3>
<?php include('tpl/sharers.php'); ?>
</div>
<div class="col-sm-4 col-md-4">
<h3 class="subtitle">Nos dernières actualités</h3>
<ul class="nav-news">
<?php foreach( $recent_posts as $recent )
{ ?>
<li><a href="<?php echo get_permalink($recent['ID']); ?>"><time class="publish-date"><?php echo date('d/m/Y', strtotime($recent['post_date']));?></time> - <?php echo $recent['post_title']; ?></a></li>
<?php
}
?>
<?php foreach ($recent_posts as $recent) { ?>
<li>
<a href="<?php echo get_permalink($recent['ID']); ?>">
<time class="publish-date"><?php echo date('d/m/Y', strtotime($recent['post_date'])); ?></time> - <?php echo $recent['post_title']; ?>
</a>
</li>
<?php } ?>
</ul>
</div>
</div> <!-- .row -->
</div> <!-- .container -->
</section>
<section class="footer-links">
<?php wp_nav_menu( array( 'theme_location' => 'secundary', 'menu_class' => 'footer-menu' ) ); ?>
<?php wp_nav_menu(['theme_location' => 'secundary', 'menu_class' => 'footer-menu']); ?>
</section>
<div id="ldcweb-cn">
<div id="ldcweb-banner" class="ldcweb-cn-banner">
<div class="banner-img">
<img src="<?php bloginfo( 'template_url' ) ?>/img/logo.png" alt="Logo" />
</div>
<div class="col">
<div class="banner-title">
<p aria-level="h1">Le respect de votre vie privée est notre priorité</p>
</div>
<div class="banner-txt">
<p>Ce site web stocke les cookies sur votre ordinateur. LDC 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.
<br>Vous pouvez cliquer sur « Accepter » si vous consentez à l’utilisation de ces cookies.
<br>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.
<br>Vous pouvez changer d’avis et modifier votre consentement à tout moment en revenant sur ce site.
<br>Pour en savoir plus sur les cookies que nous utilisons, consultez notre <a href="/politique-de-confidentialite/">politique de confidentialité</a>.
<br></p>
</div>
</div>
<div class="btns">
<div>
<a href="#" id="ldcweb-cn-accept-banner" class="btn ldcweb-cn-accept">OK, TOUT ACCEPTER</a>
</div>
<div>
<a href="#" id="ldcweb-cn-deny-banner" class="btn ldcweb-cn-deny">TOUT REFUSER</a>
</div>
<div>
<a href="#" class="btn ldcweb-cn-personalize">Personnaliser</a>
</div>
</div>
</div>
<div id="ldcweb-cn-modal">
<div class="modal-wrapper">
<div class="modal-btn-close"><a href="#" id="close-link">X</a></div>
<div class="modal-title">
<p class="title" aria-level="h2">Panneau de gestion des cookies</p>
<p class="description">Les fonctionnalités de ce site s’appuient sur des services proposés par des tiers.
<br>Si vous acceptez, ces tiers déposeront des cookies qui vous permettront de visualiser sur le site du contenu hébergé par ces tiers.
<br>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.</p>
</div>
<div class="modal-all">
<p>Préférence pour tous les services</p>
<div class="all-buttons">
<div class="accept"><a href="#" id="ldcweb-cn-accept">Autoriser tous les cookies</a></div>
<div class="deny"><a href="#" id="ldcweb-cn-deny">Interdire tous les cookies</a></div>
</div>
</div>
<div class="modal-details">
<ul id="ldcweb-cn-list">
</ul>
<div id="template">
<div>
<div class="ldcweb-cn-infos">
<span class="ldcweb-cn-name">Google Analytics (universal)</span>
<span class="ldcweb-cn-description">Ce service peut déposer 8 cookies.</span>
<a class="ldcweb-cn-link" href="#">En savoir plus</a>
</div>
<div class="ldcweb-cn-buttons">
<div class="accept" id="accept-btn">
<input type="radio" id="analytics1" name="analytics" data-name="analytics" data-status="true">
<label for="analytics1">Autoriser</label>
</div>
<div class="deny" id="deny-btn">
<input type="radio" id="analytics2" name="analytics" data-name="analytics" data-status="false">
<label for="analytics2">Interdire</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
window.LDCWebCN = new LdcwebCn({
'recaptcha': {
'name': "API - 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',
'link': 'https://policies.google.com/privacy',
'cookies': ['NID', '__Secure-3PAPISID', '__Secure-3PSID', '__Secure-3PSIDCC'],
'script': function () {
(function (d, t) {
let g = d.createElement(t), s = d.getElementsByTagName(t)[0];
g.src = 'https://www.google.com/recaptcha/api.js?render=6LfIWWYUAAAAAC-CE47p1xrxUWpT7IjhU1mAIhbz';
s.parentNode.insertBefore(g, s)
}(document, 'script'));
}
},
'analytics': {
'name': "MESURES D'AUDIENCE - Google Analytics",
'description': 'Les services de mesure d\'audience permettent de générer des statistiques de fréquentation utiles à l\'amélioration du site.',
'link': 'https://support.google.com/analytics/answer/6004245',
'cookies': ['NID', '_ga', '_gat_gtag_G_KF16WW4QLP', '_gid'],
'script': function () {
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src='https://www.googletagmanager.com/gtag/js?id=G-KF16WW4QLP';g.id='analytics';
s.parentNode.insertBefore(g,s)}(document,'script'));
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-KF16WW4QLP');
}
}
});
</script>
<?php include('resources/view/vendor/cn-cookies.php'); ?>
</footer>
<?php wp_footer(); ?>
</body>
</html>
</html>

View file

@ -92,10 +92,10 @@ function klendathu_register_js() {
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
wp_enqueue_script( 'klendathu-cookies', get_template_directory_uri() . '/js/ldcweb-cn.js', array( 'jquery' ), '1.11', false );
wp_enqueue_script( 'klendathu-bootstrap', get_template_directory_uri() . '/js/bootstrap/bootstrap.js', array( 'jquery' ), '1.11', false );
wp_enqueue_script( 'klendathu-responsive', get_template_directory_uri() . '/js/klendathu.js', array( 'jquery' ), '1.11', false );
wp_enqueue_script( 'klendathu-fitvids', get_template_directory_uri() . '/js/fitvids.js', array( 'jquery' ), '1.11', false );
wp_enqueue_script('klendathu-cookies', get_template_directory_uri() . '/node_modules/@ldc-web/cookie-notice/dist/browser/cookie-cn.js', [], '3.1.2', true);
wp_enqueue_script('klendathu-bootstrap', get_template_directory_uri() . '/js/bootstrap/bootstrap.js', ['jquery'], '1.11', false);
wp_enqueue_script('klendathu-responsive', get_template_directory_uri() . '/js/klendathu.js', ['jquery'], '1.11', false);
wp_enqueue_script('klendathu-fitvids', get_template_directory_uri() . '/js/fitvids.js', ['jquery'], '1.11', false);
}
/*
@ -126,9 +126,9 @@ function klendathu_register_style() {
}
function klendathu_register_css() {
echo '<link href="' . get_bloginfo( 'template_url' ) . '/css/cookies-ldc.css" type="text/css" rel="stylesheet" media="all" />';
echo '<link href="' . get_bloginfo( 'template_url' ) . '/css/bootstrap.css" type="text/css" rel="stylesheet" media="all" />';
echo '<link href="' . get_bloginfo( 'template_url' ) . '/css/style.css" type="text/css" rel="stylesheet" media="all" />';
echo '<link href="' . get_bloginfo( 'template_url' ) . '/css/cookie-notice.css" type="text/css" rel="stylesheet" media="all" />';
}
function klendathu_register_less() {
@ -141,6 +141,9 @@ function klendathu_register_less() {
if ( $lessOptions['style'] == 'LESS' ) echo '<link href="' . get_bloginfo( 'template_url' ) . '/less/style.less?'. time() .'" type="text/css" rel="stylesheet/less" media="all" />';
else echo '<link href="' . get_bloginfo( 'template_url' ) . '/css/style.css" type="text/css" rel="stylesheet" media="all" />';
if ( $lessOptions['style'] == 'LESS' ) echo '<link href="' . get_bloginfo( 'template_url' ) . '/node_modules/@ldc-web/cookie-notice/dist/browser/cookie-cn.css'. time() .'" type="text/css" rel="stylesheet/less" media="all" />';
else echo '<link href="' . get_bloginfo( 'template_url' ) . '/css/cookie-notice.css" type="text/css" rel="stylesheet" media="all" />';
echo '<script type="text/javascript">less = { env: "development" };</script>';
echo '<script src="' . get_bloginfo( 'template_url' ) . '/js/less-1.4.1.js" type="text/javascript"></script>';
}

View file

@ -1,323 +0,0 @@
/**
* LDC Service Web
* Version 1.1
*/
class LdcwebCn {
constructor(config) {
this.config = config;
this.cookieContainer = document.getElementById('ldcweb-cn');
this.bannerContainer = document.getElementById('ldcweb-banner');
this.modalContainer = document.getElementById('ldcweb-cn-modal');
this.modalCloseBtn = document.getElementById('close-link');
this.acceptAllBtnBanner = document.getElementById('ldcweb-cn-accept-banner');
this.denyAllBtnBanner = document.getElementById('ldcweb-cn-deny-banner');
this.acceptAllBtn = document.getElementById('ldcweb-cn-accept');
this.denyAllBtn = document.getElementById('ldcweb-cn-deny');
this.personalizeBtn = document.getElementsByClassName('ldcweb-cn-personalize');
this.changeBtn = document.getElementsByClassName('ldcweb-cn-change');
this.cookiesList = document.getElementById('ldcweb-cn-list');
this.cookieLink = document.getElementsByClassName('ldcweb-cn-cookie-link');
this.template = document.getElementById('template').cloneNode(true);
document.getElementById('template').remove();
let cookies = this.getLDCWebCookie('ldcwebcn-init');
if (cookies === undefined) {
let newCookie = [];
for (const [key, value] of Object.entries(this.config)) {
newCookie.push(key + "=wait");
}
this.saveLDCWebCookie(newCookie);
this.cookieContainer.classList.add('open-banner');
} else {
let test = cookies.split(',');
test.forEach(elm => {
let test = elm.split('=');
if (test[1] === 'wait') {
this.cookieContainer.classList.add('open-banner');
}
});
}
this.modalCloseBtn.addEventListener(
'click',
function (e) {
e.preventDefault();
let cookies = this.getLDCWebCookie('ldcwebcn-init');
let test = cookies.split(',');
let bIsCompleted = true;
for (let item of test) {
if (item.indexOf('=wait') !== -1) {
bIsCompleted = false;
break;
}
}
if (bIsCompleted) {
this.cookieContainer.classList.remove('open-modal');
this.cookieContainer.classList.remove('open-banner');
} else {
alert("Vous devez renseigner votre choix pour tous les cookies, svp.");
}
}.bind(this)
);
let accept = function (e) {
e.preventDefault();
for (const [key, value] of Object.entries(this.config)) {
this.addCookie(key, value);
}
for (let acceptLabel of this.cookieContainer.querySelectorAll('.accept > label')) {
acceptLabel.classList.add('active');
}
for (let denyLabel of this.cookieContainer.querySelectorAll('.deny > label')) {
denyLabel.classList.remove('active');
}
this.updateAllCookiesButtonsActiveStatus();
this.cookieContainer.classList.remove('open-modal');
this.cookieContainer.classList.remove('open-banner');
}.bind(this);
this.acceptAllBtnBanner.addEventListener('click', accept);
this.acceptAllBtn.addEventListener('click', accept);
let deny = function (e) {
e.preventDefault();
for (const [key, value] of Object.entries(this.config)) {
this.removeCookie(key, value);
}
for (let acceptLabel of this.cookieContainer.querySelectorAll('.accept > label')) {
acceptLabel.classList.remove('active');
}
for (let denyLabel of this.cookieContainer.querySelectorAll('.deny > label')) {
denyLabel.classList.add('active');
}
this.updateAllCookiesButtonsActiveStatus();
this.cookieContainer.classList.remove('open-modal');
this.cookieContainer.classList.remove('open-banner');
}.bind(this);
this.denyAllBtnBanner.addEventListener('click', deny);
this.denyAllBtn.addEventListener('click', deny);
for (let item of this.cookieLink) {
this.addEvent(
item,
'click',
function (e) {
e.preventDefault();
this.openModal();
}.bind(this)
);
}
for (let item of this.personalizeBtn) {
this.addEvent(
item,
'click',
function (e) {
e.preventDefault();
this.setCookieList();
}.bind(this)
);
}
this.setListenerOnChange();
let cookie = this.getLDCWebCookie('ldcwebcn-init');
let test = cookie.split(',');
test.forEach(elm => {
let test = elm.split('=');
if (test[1] === 'true') {
this.config[test[0]].script();
}else{
if (this.config[test[0]].fallback !== undefined){
this.config[test[0]].fallback();
}
}
});
this.updateAllCookiesButtonsActiveStatus();
}
setCookieList() {
this.cookiesList.innerHTML = "";
let cookiesSite = this.getLDCWebCookie('ldcwebcn-init');
let acceptInputEvent = function(acceptLabel, denyLabel, key, value) {
return function (e) {
acceptLabel.classList.add('active');
denyLabel.classList.remove('active');
this.updateAllCookiesButtonsActiveStatus();
this.addCookie(key, value);
}.bind(this, [acceptLabel, denyLabel, key, value]);
};
let denyInputEvent = function(acceptLabel, denyLabel, key, value) {
return function (e) {
acceptLabel.classList.remove('active');
denyLabel.classList.add('active');
this.updateAllCookiesButtonsActiveStatus();
this.removeCookie(key, value);
}.bind(this, [acceptLabel, denyLabel, key, value]);
};
for (const [key, value] of Object.entries(this.config)) {
let cookie = document.createElement('li');
cookie.append(this.template.children.item(0).cloneNode(true));
let name = cookie.querySelector('span.ldcweb-cn-name');
let description = cookie.querySelector('span.ldcweb-cn-description');
let link = cookie.querySelector('a.ldcweb-cn-link');
let acceptInput = cookie.querySelector('.accept > input');
let denyInput = cookie.querySelector('.deny > input');
let acceptLabel = cookie.querySelector('.accept > label');
let denyLabel = cookie.querySelector('.deny > label');
name.textContent = value.name;
description.textContent = value.description;
link.textContent = "En savoir plus";
link.setAttribute("href", value.link);
acceptInput.id = key + '1';
acceptInput.name = key;
acceptInput.dataset.name = key;
acceptLabel.htmlFor = key + '1';
denyInput.id = key + '2';
denyInput.name = key;
denyInput.dataset.name = key;
denyLabel.htmlFor = key + '2';
acceptInput.addEventListener('click', acceptInputEvent.apply(this, [acceptLabel, denyLabel, key, value]));
denyInput.addEventListener('click', denyInputEvent.apply(this, [acceptLabel, denyLabel, key, value]));
this.cookiesList.append(cookie);
let cookiesArray = cookiesSite.split(',');
for (const cookieEl of cookiesArray) {
let name = cookieEl.slice(0, cookieEl.indexOf('='));
let status = cookieEl.slice(cookieEl.indexOf('=') + 1);
if (name === key) {
acceptLabel.classList.remove('active');
denyLabel.classList.remove('active');
switch (status) {
case 'true':
acceptLabel.classList.add('active');
break;
case 'false':
denyLabel.classList.add('active');
break;
}
}
if (status === 'wait') {
this.cookieContainer.classList.add('open-banner');
}
}
}
this.cookieContainer.classList.add('open-modal');
this.setListenerOnChange();
}
updateAllCookiesButtonsActiveStatus() {
let acceptsButtons = this.cookieContainer.querySelectorAll('div.accept > label');
let deniesButtons = this.cookieContainer.querySelectorAll('div.deny > label');
let activeAcceptsButtons = this.cookieContainer.querySelectorAll('div.accept > label.active');
let activeDeniesButtons = this.cookieContainer.querySelectorAll('div.deny > label.active');
this.acceptAllBtn.classList.remove('active');
this.denyAllBtn.classList.remove('active');
if (acceptsButtons.length && acceptsButtons.length === activeAcceptsButtons.length) {
this.acceptAllBtn.classList.add('active');
}
if (deniesButtons.length && deniesButtons.length === activeDeniesButtons.length) {
this.denyAllBtn.classList.add('active');
}
}
addCookie(key, value) {
if (value.script) {
value.script();
}
this.changeStatus(key, "true");
}
removeCookie(key, value) {
for (let cookieName of value.cookies) {
this.deleteBrowserCookie(cookieName, "/", "." + location.host);
}
if (document.getElementById(key)) {
document.getElementById(key).remove();
}
this.changeStatus(key, "false");
}
setListenerOnChange() {
this.changeBtn = document.getElementsByClassName('ldcweb-cn-change');
let itemClick = function(item) {
return function () {
this.changeStatus(item.getAttribute('data-name'), item.getAttribute('data-status'));
}.bind(this);
};
for (let item of this.changeBtn) {
this.addEvent(
item,
'click',
itemClick.bind(this, [item])
);
}
}
changeStatus(name, status) {
let newCookie = [];
let cookie = this.getLDCWebCookie('ldcwebcn-init');
let test = cookie.split(',');
test.forEach(elm => {
let test = elm.split('=');
if (test[0] === name) {
newCookie.push(name + "=" + status);
if (status === 'false') {
this.config[test[0]].cookies.forEach(elm => {
let cookies = this.getLDCWebCookie(elm);
if (cookies !== undefined) {
document.cookie = elm + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; domain=" + document.domain + "; path=/";
document.cookie = elm + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; domain=." + document.domain + "; path=/";
}
});
}
} else {
newCookie.push(elm);
}
});
this.saveLDCWebCookie(newCookie);
}
deleteBrowserCookie(name, path, domain) {
if (this.getLDCWebCookie(name)) {
document.cookie = name + "=" +
((path) ? ";path=" + path : "") +
((domain) ? ";domain=" + domain : "") +
";expires=Thu, 01 Jan 1970 00:00:01 GMT";
}
}
getLDCWebCookie(name) {
let matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : undefined;
}
addEvent(element, evnt, funct) {
if (element.attachEvent)
return element.attachEvent('on' + evnt, funct);
else
return element.addEventListener(evnt, funct, false);
}
saveLDCWebCookie(content) {
let date = new Date();
let newDate = new Date(date.setMonth(date.getMonth() + 13));
document.cookie = "ldcwebcn-init=" + content + "; expires=" + newDate.toUTCString() + "; path=/;";
}
openModal() {
this.setCookieList();
this.updateAllCookiesButtonsActiveStatus();
}
}

View file

@ -57,6 +57,7 @@
@import "template.less";
@import "product.less";
@import "home.less";
@import './../node_modules/@ldc-web/cookie-notice/dist/browser/cookie-cn.css';
/*
//-------------------------------------------------------

View file

@ -0,0 +1,3 @@
{
"/css/cookie-notice.css": "/css/cookie-notice.css"
}

14850
wp-content/themes/klendathu/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,25 @@
{
"name": "espri-restauration",
"version": "1.0.0",
"description": "espri-restauration project",
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production",
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@ldc-web/cookie-notice": "^3.1.2",
"laravel-mix": "^6.0.49",
"resolve-url-loader": "^5.0.0"
},
"dependencies": {
"laravel-mix-polyfill": "^3.0.1",
"sass": "^1.64.2",
"sass-loader": "^13.3.2"
}
}

View file

@ -0,0 +1,118 @@
<?php
$site_name = get_bloginfo('name');
$logo_picture_url = get_stylesheet_directory_uri() . '/img/logo.png';
$logo_alt_text = "Logo " . $site_name;
$logo_title_text = "Logo " . $site_name;
$strings = (object)[
'modal_title' => 'Fenêtre de gestion de cookies',
'button_customize_cookies' => 'Personnaliser les cookies',
'button_close_cookies' => 'Fermer la fenêtre des cookies',
'button_title_open_new_tab' => 'Ouvrir le lien dans un nouvel onglet',
'button_forbid' => 'Interdire',
'button_allow' => 'Autoriser',
'button_forbid_all' => strtoupper('Tout refuser'),
'button_allow_all' => strtoupper('Tout accepter'),
'button_customize' => strtoupper('Personnaliser'),
'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_back' => strtoupper('Retour'),
'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.',
'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 cookie',
];
$cookies = [];
// RECAPTCHA
$cookies['recaptcha'] = [
'name' => 'API - 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.',
'link' => 'https://policies.google.com/privacy',
'labelLink' => 'En savoir +',
'cookies' => ['NID', '__Secure-3PAPISID', '__Secure-3PSID', '__Secure-3PSIDCC']
];
$cookies['recaptcha']['script'] = <<<SCRIPT
function () {
if (window.__CN_Recaptcha) {
window.__CN_Recaptcha();
}
}
SCRIPT;
// MATOMO
$cookies['matomo'] = [
'name' => 'Matomo',
'description' => 'Les services de mesure d\'audience permettent de générer des statistiques de fréquentation utiles à l\'amélioration du site.',
'link' => 'https://fr.matomo.org/gdpr-analytics/',
'labelLink' => 'En savoir +',
'cookies' => ['_pk']
];
$cookies['matomo']['script'] = <<<SCRIPT
function () {
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//yl.s-web.fr/";
_paq.push(['setTrackerUrl', u+'rainbow']);
_paq.push(['setSiteId', '
SCRIPT;
$cookies['matomo']['script'] .= MATOMO_SITE_ID;
$cookies['matomo']['script'] .= <<<SCRIPT
']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'unicorn'; s.parentNode.insertBefore(g,s);
})();
}
SCRIPT;
?>
<?php include('cookie-notice-templates/standard.php'); ?>
<script nonce="{{ $nonce ?? '' }}">
document.addEventListener('DOMContentLoaded', function() {
window.WebCookieNotice = {};
<?php foreach ($cookies as $index_name => $cookie) { ?>
window.WebCookieNotice['<?php echo $index_name ?>'] = {};
window.WebCookieNotice['<?php echo $index_name ?>'].tmp = {};
// SCRIPT
window.WebCookieNotice['<?php echo $index_name ?>'].tmp.script =
<?php
echo strip_tags($cookie['script']);
?>;
<?php unset($cookie['script']); ?>
// FALLBACK
<?php if (isset($cookie['fallback'])) { ?>
window.WebCookieNotice['<?php echo $index_name ?>'].tmp.fallback =
<?php
echo strip_tags($cookie['fallback']);
?>;
<?php unset($cookie['fallback']); ?>
<?php } ?>
window.WebCookieNotice['<?php echo $index_name ?>'].conf = <?php echo json_encode($cookie) ?>;
window.WebCookieNotice['<?php echo $index_name ?>'].conf.script =
window.WebCookieNotice['<?php echo $index_name ?>'].tmp.script;
window.WebCookieNotice['<?php echo $index_name ?>'].conf.fallback =
window.WebCookieNotice['<?php echo $index_name ?>'].tmp.fallback;
window.WebCookieNotice['<?php echo $index_name ?>'] =
window.WebCookieNotice['<?php echo $index_name ?>'].conf;
<?php } ?>
window.WebCookieNotice = new CookieNotice(window.WebCookieNotice);
});
</script>

View file

@ -0,0 +1,77 @@
<div id="cn-wrapper" title="<?= $strings->modal_title; ?>" role="alertdialog" tabindex="-1">
<button id="cn-cookie-btn" title="<?= $strings->button_customize_cookies; ?>">
<!-- COOKIE SVG -->
<svg viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg">
<title><?= $strings->picture_cookie_title; ?></title>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.0001 2.93383C14.0001 4.16622 14.6159 5.25477 15.5567 5.90849C15.3526 6.46423 15.2412 7.06473 15.2412 7.69126C15.2412 10.5472 17.5564 12.8624 20.4123 12.8624C21.0807 12.8624 21.7195 12.7356 22.3059 12.5047C22.9456 13.527 24.0817 14.2069 25.3766 14.2069C26.1872 14.2069 26.9357 13.9404 27.539 13.4903C27.5453 13.6594 27.5484 13.8294 27.5484 14C27.5484 21.4826 21.4826 27.5484 14 27.5484C6.51748 27.5484 0.45166 21.4826 0.45166 14C0.45166 6.51748 6.51748 0.45166 14 0.45166C14.3209 0.45166 14.6391 0.462811 14.9543 0.484747C14.3618 1.12929 14.0001 1.98931 14.0001 2.93383ZM21.2176 2.53212C21.2195 2.54914 21.2213 2.56619 21.2229 2.58328C21.2569 2.58864 21.2909 2.59433 21.3247 2.60035C21.2891 2.57745 21.2534 2.5547 21.2176 2.53212ZM25.5171 6.86104C25.523 6.89745 25.5285 6.93399 25.5336 6.97066C25.5512 6.97141 25.5687 6.97228 25.5861 6.97328C25.5633 6.93574 25.5403 6.89833 25.5171 6.86104ZM12.5247 2.09283C12.4748 2.38291 12.4487 2.68118 12.4487 2.98553C12.4487 4.33316 12.9591 5.56158 13.7972 6.48802C13.7266 6.87842 13.6898 7.28054 13.6898 7.69126C13.6898 11.404 16.6996 14.4137 20.4123 14.4137C20.8725 14.4137 21.3219 14.3675 21.7562 14.2794C22.689 15.1941 23.9669 15.7582 25.3766 15.7582C25.5439 15.7582 25.7094 15.7503 25.8726 15.7347C25.0321 21.5385 20.0368 25.9971 14.0001 25.9971C7.37431 25.9971 2.00305 20.6258 2.00305 14.0001C2.00305 7.87378 6.59498 2.82 12.5247 2.09283Z" fill="#dc9c52" />
<circle cx="7.58784" cy="12.8624" r="1.96503" fill="#dc9c52" />
<circle cx="8.82887" cy="19.2745" r="1.3445" fill="#dc9c52" />
<circle cx="13.6897" cy="14.5171" r="1.03423" fill="#dc9c52" />
<circle cx="11.4144" cy="7.48439" r="0.930805" fill="#dc9c52" />
<circle cx="17.5164" cy="20.3089" r="1.86161" fill="#dc9c52" />
<circle cx="21.3432" cy="6.7604" r="0.930805" fill="#dc9c52" />
<circle cx="22.1706" cy="1.89958" r="1.44792" fill="#dc9c52" />
<circle cx="26.8245" cy="8.31185" r="0.72396" fill="#dc9c52" />
</svg>
</button>
<!-- BANNER -->
<div id="cn-banner" tabindex="-1">
<div class="cn-modal-top-line">
<button id="cn-close-modal" title="<?= $strings->button_close_cookies; ?>">X</button>
</div>
<!-- CONTENT VIEW -->
<div class="cn-content" title="<?= $strings->panel_content; ?>" tabindex="0">
<!-- 1ST PAGE BANNER -->
<div class="cn-banner-content">
<div class="cn-banner-img">
<img src="<?= $logo_picture_url; ?>" title="<?= $logo_title_text; ?>" alt="<?= $logo_alt_text; ?>">
</div>
<div class="cn-banner-text">
<div class="cn-banner-title">
<span><?= nl2br($strings->banner_title); ?></span>
</div>
<div class="cn-banner-para-p">
<p><?= nl2br($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($strings->panel_subtitle); ?></p>
<p class="cn-modal-description"><?= nl2br($strings->panel_details); ?></p>
<div class="cn-modal-wrapper">
<!-- COOKIES LIST -->
<ul id="cn-modal-list"></ul>
</div>
</div>
</div>
<!-- NAV BAR -->
<div class="cn-nav" title="<?= $strings->navigation_title; ?>" role="navigation">
<button class="cn-banner-btn cn-deny" id="cn-deny-banner" 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; ?>" data-close-modal="<?= $strings->button_customize; ?>"><?= $strings->button_customize; ?></button>
</div>
<!-- COOKIE LIST LI TEMPLATE -->
<div id="cn-li-template">
<div class="cn-cookie-wrapper">
<div class="cn-cookie-infos">
<span class="cn-cookie-name">#name</span>
<span class="cn-cookie-description">#description</span>
<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>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1 @@
@import "./vendor/_cookies-notice.scss"

View file

@ -0,0 +1,13 @@
$ck-primary-color: #000000 !default;
$ck-secondary-color: #f8a326 !default;
$ck-background-color: #e5e5e5 !default;
$ck-list-background-color: #000000 !default;
$ck-title-font: 'Amatic SC', Arial, sans-serif !default;
$ck-title-size: 30px !default;
$ck-text-font: Roboto, Arial, sans-serif !default;
#cn-wrapper {
position: fixed;
}
@import "./../../../node_modules/@ldc-web/cookie-notice/src/scss/themes/standard.scss";

View file

@ -0,0 +1,30 @@
const path = require("path");
const mix = require("laravel-mix");
require("laravel-mix-polyfill");
const polyfill = {
enabled: true,
bugfixes: true,
useBuiltIns: "usage",
targets: "last 3 version, not dead, >0.3%",
};
mix.webpackConfig({
resolve: {
extensions: ["*", ".js", ".vue", ".ts"],
alias: {
"@": path.resolve("assets"),
},
},
});
mix.options({
postCss: [
require("postcss-discard-comments")({
removeAll: true,
}),
],
});
mix.polyfill(polyfill).sass("src/sass/app.scss", "css/cookie-notice.css");