Add Cookie management
This commit is contained in:
parent
364020ecb3
commit
b101d3952a
10 changed files with 1183 additions and 13 deletions
|
|
@ -72,14 +72,23 @@ define('DB_COLLATE', '');
|
|||
*
|
||||
* @since 2.6.0
|
||||
*/
|
||||
define('AUTH_KEY', '3lxfhsfr7vvueubusinfq6wh3jzcct0dpokf9wvlesvyqctufzjrsjctkxomfkai');
|
||||
define('SECURE_AUTH_KEY', 'g8shsentpna4xjwd2hrndysspzqstjqhshl5ltojzfx2jt00mmgv5erkv9hhzfks');
|
||||
define('LOGGED_IN_KEY', 'bttywkfpheo5alewblait7g63ztfsoiscbrerdbzeinwt0qzyl3nopohusmoffo6');
|
||||
define('NONCE_KEY', 'g9vf7ljkcjkpgdtejb2rscp53u4lbhoezdzdytomoudzsibrsqh0lwn9rtcfgc8s');
|
||||
define('AUTH_SALT', 'maxi2iuf7im4jyxok9o9phyuwtesnqdvxpes8cbv6rcjglj4ksqbokhtafqlodm2');
|
||||
define('SECURE_AUTH_SALT', 'fxzzvwcjmq4gar1pmhgkhrdzgx2h8c8euy5ux3t5s4h9gu686hg6euxop5ahvqp1');
|
||||
define('LOGGED_IN_SALT', 'yxhrdruruy18h4euqzayua2avomvrjqdolujk66waswrx3kywpxuxwvbetnn1ymx');
|
||||
define('NONCE_SALT', 'h2xmi72rczdra3rx8gimpnhhztx1oudvlq5zsuufpztg6iipng6pyfpzwdh336x0');
|
||||
// define('AUTH_KEY', '3lxfhsfr7vvueubusinfq6wh3jzcct0dpokf9wvlesvyqctufzjrsjctkxomfkai');
|
||||
// define('SECURE_AUTH_KEY', 'g8shsentpna4xjwd2hrndysspzqstjqhshl5ltojzfx2jt00mmgv5erkv9hhzfks');
|
||||
// define('LOGGED_IN_KEY', 'bttywkfpheo5alewblait7g63ztfsoiscbrerdbzeinwt0qzyl3nopohusmoffo6');
|
||||
// define('NONCE_KEY', 'g9vf7ljkcjkpgdtejb2rscp53u4lbhoezdzdytomoudzsibrsqh0lwn9rtcfgc8s');
|
||||
// define('AUTH_SALT', 'maxi2iuf7im4jyxok9o9phyuwtesnqdvxpes8cbv6rcjglj4ksqbokhtafqlodm2');
|
||||
// define('SECURE_AUTH_SALT', 'fxzzvwcjmq4gar1pmhgkhrdzgx2h8c8euy5ux3t5s4h9gu686hg6euxop5ahvqp1');
|
||||
// define('LOGGED_IN_SALT', 'yxhrdruruy18h4euqzayua2avomvrjqdolujk66waswrx3kywpxuxwvbetnn1ymx');
|
||||
// define('NONCE_SALT', 'h2xmi72rczdra3rx8gimpnhhztx1oudvlq5zsuufpztg6iipng6pyfpzwdh336x0');
|
||||
|
||||
define('AUTH_KEY', 'J;E.R(2Sf?85#m~6e)nsQH+0H A/Sm^,mQ`ui79`ak8.la/(#P*}~wx6Ju|6rS|o');
|
||||
define('SECURE_AUTH_KEY', 'e#%_g|$gtt[U1)+%+O||H#Ow!=,$]4T~&N>qkKb!O-m^0i4W<#5wRH>ki6fB>A*B');
|
||||
define('LOGGED_IN_KEY', 'ZyR?_G-u?i[X X_ogeCe55+Mwa8n%)MGq8Bk&@@!<EM=|TP|~|:u{BG8B mw?Rm|');
|
||||
define('NONCE_KEY', 'l8tcsXN!+Yetu9&ZK fk2%MV8k-A=)6J|NYS#eVpHtOFgyrHJV?x!rjZV`9$/}|;');
|
||||
define('AUTH_SALT', '=h1gyz2xS]ZKVDS<L+(548KfQ?%^SH|Eq}f|Fq z&V*Vh=Y=gh-yb*:3JTz;,MfU');
|
||||
define('SECURE_AUTH_SALT', '-=CIC0GeYaH`l:=0xzZx[n@hSP%Sqquz}e-M_S(*[FsdUkoy<B$Ca=g7[4+4|ga+');
|
||||
define('LOGGED_IN_SALT', 'E~;Q+L{W)l*oDAI6oB|*rXq/C.b^$wUu^7Gtb1vSZpUNC~y,-%oe/kypZDw(0$I$');
|
||||
define('NONCE_SALT', '12v6P@vh,n*DQ/|Yh+7}TR@8lv=dS3t#E/i;<f4Rw8{0,O[iHIZfd6[*gwW8oaU2');
|
||||
|
||||
/**#@-*/
|
||||
|
||||
|
|
|
|||
585
wp-content/themes/pole-sbv/css/cookies-ldc.css
Normal file
585
wp-content/themes/pole-sbv/css/cookies-ldc.css
Normal file
|
|
@ -0,0 +1,585 @@
|
|||
/* DEBUT DU PARAMETRAGE */
|
||||
/* - Choix des FONTS */
|
||||
/* - Changement des couleurs et des polices */
|
||||
|
||||
:root{
|
||||
/* PARTIE A RENSEIGNER */
|
||||
--primary-color: #FFF;
|
||||
--secondary-color: #d0ae88;
|
||||
--background-color: #292929;
|
||||
--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: #e30613;
|
||||
|
||||
/* 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: #292929;
|
||||
--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: var(--background-color);
|
||||
/* Title settings */
|
||||
--ck-w2-bgcolor-title: var(--background-color); /*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;}
|
||||
}
|
||||
|
|
@ -38,12 +38,126 @@
|
|||
<a href="<?=custom_get_page_link(412);?>"><?php pll_e('Contact'); ?></a>
|
||||
<a href="<?=custom_get_page_link(328);?>" class="mobile-hidden"><?php pll_e('Actualités'); ?></a>
|
||||
<a href="<?=custom_get_page_link(414);?>"><?php pll_e('Mentions légales'); ?></a>
|
||||
<a href="#" class="ldcweb-cn-cookie-link"><?php pll_e('Gestion des cookies'); ?></a>
|
||||
<a href="<?=custom_get_page_link(412);?>#coordonnees" class="mobile-hidden"><?php pll_e('Coordonnées SBV'); ?></a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<div id="ldcweb-cn">
|
||||
<div id="ldcweb-banner" class="ldcweb-cn-banner">
|
||||
<div class="banner-img">
|
||||
<img src="<?php bloginfo( 'template_url' ) ?>/images/logo.svg" 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 src="<?php bloginfo('stylesheet_directory'); ?>/js/ldcweb-cn.js"></script>
|
||||
<script>
|
||||
window.LDCWebCN = new LdcwebCn({
|
||||
'recaptcha': {
|
||||
'name': "API - 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',
|
||||
'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=6LdCuTQUAAAAALjD2gh_Aqos348_bRQEtBiDIy82';
|
||||
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_UA_108555037_1', '_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=UA-108555037-1';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', 'UA-108555037-1');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.min.js"></script>
|
||||
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.fancybox.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
|
@ -57,6 +171,7 @@
|
|||
<link href="<?php bloginfo('stylesheet_directory'); ?>/css/main.css" rel="stylesheet">
|
||||
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.validate.min.js"></script>
|
||||
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/additional-methods.min.js"></script>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ pll_register_string( "Nos solutions au service de nos clients footer", "Nos sol
|
|||
pll_register_string( "Tous droits réservés", "Tous droits réservés", 'Footer');
|
||||
pll_register_string( "Tous droits réservés", "Tous droits réservés", 'Footer');
|
||||
pll_register_string( "Mentions légales", "Mentions légales", 'Footer');
|
||||
pll_register_string( "Gestion des cookies", "Gestion des cookies", 'Footer');
|
||||
pll_register_string( "Coordonnées SBV", "Coordonnées SBV", 'Footer');
|
||||
pll_register_string( "Tél :", "Tél :", 'Footer');
|
||||
|
||||
|
|
@ -169,6 +170,12 @@ function mytheme_ninja_forms_translate( $label ){
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
// ---------------------------------------------------------------------
|
||||
// SCRIPTS
|
||||
// ---------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
SMTP Mail/HTML Mail
|
||||
*******************************************************************/
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
<script src="js/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/images/favicon/favicon-16x16.png">
|
||||
<link href="<?php bloginfo('stylesheet_directory'); ?>/css/cookies-ldc.css" rel="stylesheet">
|
||||
|
||||
<?php wp_head(); ?>
|
||||
</head><!--/head-->
|
||||
|
|
|
|||
323
wp-content/themes/pole-sbv/js/ldcweb-cn.js
Normal file
323
wp-content/themes/pole-sbv/js/ldcweb-cn.js
Normal file
|
|
@ -0,0 +1,323 @@
|
|||
/**
|
||||
* 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();
|
||||
}
|
||||
}
|
||||
43
wp-content/themes/pole-sbv/mentionslegales_en_template.php
Normal file
43
wp-content/themes/pole-sbv/mentionslegales_en_template.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/**
|
||||
* Template Name: Mentions Légales EN Template
|
||||
* @package WordPress
|
||||
*/
|
||||
get_header(); ?>
|
||||
<?php
|
||||
$id = 464;
|
||||
$post = get_post($id);
|
||||
?>
|
||||
<div class="banner banner-decor" style="background-image:url(<?php the_field('page_banner', 464) ?>)">
|
||||
<div class="container">
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Accueil</a></li>
|
||||
<li><?php echo $post->post_title ?></li>
|
||||
</ul>
|
||||
<div class="caption-title">
|
||||
<h1>
|
||||
<span class="bold"><?php echo $post->post_title ?></span>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<main id="main">
|
||||
<div id="content">
|
||||
<section class="text-content">
|
||||
<div class="container legal">
|
||||
<?php
|
||||
$content = apply_filters('the_content', $post->post_content);
|
||||
echo $content;
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
<?php get_footer(); ?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -4,16 +4,19 @@
|
|||
* @package WordPress
|
||||
*/
|
||||
get_header(); ?>
|
||||
|
||||
<?php
|
||||
$id = 414;
|
||||
$post = get_post($id);
|
||||
?>
|
||||
<div class="banner banner-decor" style="background-image:url(<?php the_field('page_banner', 414) ?>)">
|
||||
<div class="container">
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Accueil</a></li>
|
||||
<li>Mentions Légales</li>
|
||||
<li><?php echo $post->post_title ?></li>
|
||||
</ul>
|
||||
<div class="caption-title">
|
||||
<h1>
|
||||
<span class="bold">Mentions légales et conditions d'utilisation</span>
|
||||
<span class="bold"><?php echo $post->post_title ?></span>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -23,8 +26,6 @@ get_header(); ?>
|
|||
<section class="text-content">
|
||||
<div class="container legal">
|
||||
<?php
|
||||
$id = 414;
|
||||
$post = get_post($id);
|
||||
$content = apply_filters('the_content', $post->post_content);
|
||||
echo $content;
|
||||
?>
|
||||
|
|
|
|||
43
wp-content/themes/pole-sbv/privacy_en_template.php
Normal file
43
wp-content/themes/pole-sbv/privacy_en_template.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/**
|
||||
* Template Name: Politique de Confidentialité EN Template
|
||||
* @package WordPress
|
||||
*/
|
||||
get_header(); ?>
|
||||
<?php
|
||||
$id = 464;
|
||||
$post = get_post($id);
|
||||
?>
|
||||
<div class="banner banner-decor" style="background-image:url(<?php the_field('page_banner', 464) ?>)">
|
||||
<div class="container">
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Accueil</a></li>
|
||||
<li><?php echo $post->post_title ?></li>
|
||||
</ul>
|
||||
<div class="caption-title">
|
||||
<h1>
|
||||
<span class="bold"><?php echo $post->post_title ?></span>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<main id="main">
|
||||
<div id="content">
|
||||
<section class="text-content">
|
||||
<div class="container legal">
|
||||
<?php
|
||||
$content = apply_filters('the_content', $post->post_content);
|
||||
echo $content;
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
<?php get_footer(); ?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
43
wp-content/themes/pole-sbv/privacy_template.php
Normal file
43
wp-content/themes/pole-sbv/privacy_template.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/**
|
||||
* Template Name: Politique de Confidentialité Template
|
||||
* @package WordPress
|
||||
*/
|
||||
get_header(); ?>
|
||||
<?php
|
||||
$id = 414;
|
||||
$post = get_post($id);
|
||||
?>
|
||||
<div class="banner banner-decor" style="background-image:url(<?php the_field('page_banner', 414) ?>)">
|
||||
<div class="container">
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Accueil</a></li>
|
||||
<li><?php echo $post->post_title ?></li>
|
||||
</ul>
|
||||
<div class="caption-title">
|
||||
<h1>
|
||||
<span class="bold"><?php echo $post->post_title ?></span>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<main id="main">
|
||||
<div id="content">
|
||||
<section class="text-content">
|
||||
<div class="container legal">
|
||||
<?php
|
||||
$content = apply_filters('the_content', $post->post_content);
|
||||
echo $content;
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
<?php get_footer(); ?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Reference in a new issue