*Esse arquivo fica dentro da pasta /layouts.
.png)
<link href="<https://unpkg.com/[email protected]/dist/cookieBubble.min.css>" rel="stylesheet">
<script src="<https://unpkg.com/[email protected]/dist/cookieBubble.min.js>"></script>
<script>
jQuery(document).ready(function( $ ){
$.cookieBubble({
messageTextColor:'rgba(0, 0, 0, 1)',
buttonText:'OK',
messageFontSize:'12',
iconColor:'rgba(255, 255, 255, 1)',
buttonColor:'rgba(0, 0, 0, 1)',
iconVisibility:true,
cookiePolicyButtonText:'Saiba mais',
cookiePolicyButtonUrl:'<http://allaboutcookies.org>',
cookiePolicyButtonTarget:'_blank',
boxPosition:'bottom-left',
messageText:'Esse site usa cookies para melhorar sua experiência, ao continuar navegando você concorda com o uso de cookies.'
})
});
</script>
Como você pode ver temos uma tag <link href="https://unpkg.com/[email protected]/dist/cookieBubble.min.css" rel="stylesheet"> acima do script ( na primeira linha ). Ele é responsável por trazer a estilização através de um link externo.
Para facilitar a estilização podemos simplismente comentar essa linha ou excluí-la e colocarmos esse código de estilização diretamente no main.css** do próprio tema.
*Esse arquivo fica localizado na pasta /css.
.png)
.cookie-bubble {
position: fixed;
width: 100%;
max-width: 400px;
min-height: 100px;
border-radius: 10px;
background-color: #fff;
-webkit-box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
z-index: 9999;
font-family: sans-serif;
}
.cookie-bubble.top-left {
top: 10px;
left: 10px;
}
.cookie-bubble.top-right {
top: 10px;
right: 0;
}
.cookie-bubble.top-center {
top: 10px;
left: calc(100vw - 100vw / 2 - 400px / 2);
}
.cookie-bubble.bottom-left {
bottom: 10px;
left: 10px;
}
.cookie-bubble.bottom-right {
bottom: 10px;
right: 0;
}
.cookie-bubble.bottom-center {
bottom: 10px;
left: calc(100vw - 100vw / 2 - 400px / 2);
}
.cookie-bubble.show.top-center,
.cookie-bubble.show.top-left,
.cookie-bubble.show.top-right {
-webkit-animation-name: popInTop;
animation-name: popInTop;
-webkit-animation-duration: 2s;
animation-duration: 2s;
-webkit-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
.cookie-bubble.show.bottom-center,
.cookie-bubble.show.bottom-left,
.cookie-bubble.show.bottom-right {
-webkit-animation-name: popInBottom;
animation-name: popInBottom;
-webkit-animation-duration: 2s;
animation-duration: 2s;
-webkit-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
.cookie-bubble.hide {
display: none;
}
.cookie-bubble .cb-wrapper {
position: relative;
display: inline-block;
padding: 15px;
}
.cookie-bubble .cb-wrapper .cb-row {
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
text-align: left;
}
.cookie-bubble .cb-wrapper .cb-row .cb-row-content .message {
position: relative;
width: 100%;
display: inline-block;
color: #000;
font-size: 18px;
margin-top: 0;
}
.cookie-bubble .cb-wrapper .cb-row .cb-row-content .cb-controls {
position: relative;
width: 100%;
float: left;
margin-top: 10px;
}
.cookie-bubble .cb-wrapper .cb-row .cb-image {
padding-right: 23px;
}
.cookie-bubble .cb-wrapper .cb-row .cb-image .cookie-inner-color {
fill: #00a4ff;
}
.cookie-bubble .cb-wrapper .cb-row .cb-image svg {
width: 75px;
}
.cookie-bubble .cb-wrapper .cb-row .agreement-btn {
margin: 0 10px 0 0;
text-decoration: none;
color: #fff;
background: #00a4ff;
padding: 10px 20px;
border-radius: 100px;
font-size: 14px;
opacity: 1;
border: none;
cursor: pointer;
text-transform: uppercase;
font-weight: 600;
float: left;
}
.cookie-bubble .cb-wrapper .cb-row .agreement-btn:hover {
background-color: #0083cc;
}
.cookie-bubble .cb-wrapper .cb-row .cookie-policy-btn {
margin: 0;
color: #000;
padding: 10px 0;
border-radius: 100px;
font-size: 14px;
opacity: 0.95;
border: none;
cursor: pointer;
font-weight: 400;
float: left;
}
.cookie-bubble .cb-wrapper .cb-row .cookie-policy-btn:hover {
opacity: 1;
text-decoration: underline;
}
.cookieBubble .copyright-wrapper {
margin-top: 20px;
}
.cookieBubble .copyright-wrapper a.copyright {
position: absolute;
width: 80px;
height: 16px;
bottom: 8px;
right: 7px;
margin-top: 30px;
background: url(../img/cb_copyright.svg);
background-size: cover;
}
@-webkit-keyframes popInBottom {
0% {
-webkit-transform: translateY(120%);
transform: translateY(120%);
}
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
@keyframes popInBottom {
0% {
-webkit-transform: translateY(120%);
transform: translateY(120%);
}
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
@-webkit-keyframes popInTop {
0% {
-webkit-transform: translateY(-120%);
transform: translateY(-120%);
}
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
@keyframes popInTop {
0% {
-webkit-transform: translateY(-120%);
transform: translateY(-120%);
}
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
@media (max-width: 420px) {
.cookieBubble {
border-radius: 0;
max-width: inherit;
left: 0 !important;
bottom: 0 !important;
}
.cookieBubble .cb-image {
display: none;
}
}
.png)