GDATAMART Policy Cookiee Message
<%-- Cookiee HTML --%>
<div class="cookie_wrapper">
<button type="button" class="close" style="color:#fff; padding-right:5px;" onclick="hideClick()"><span aria-hidden="true" style="color:#fff">×</span></button>
<div class="cookie_content">
<h4>This website uses cookies</h4>
<p>This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Cookie Policy.</p>
<div class="buttons">
<button class="saveButton">I understand</button>
<a href="https://www.gdatamart.com/privacy-policy.aspx" target="_blank" class="item">Learn more</a>
</div>
</div>
</div>
<%-- END --%>
<%-- Cookie Js --%>
<script type="text/javascript">
var cookieBox = document.querySelector(".cookie_wrapper"),
acceptBtn = cookieBox.querySelector(".saveButton");
acceptBtn.onclick = ()=>{
//setting cookie for 1 month, after one month it'll be expired automatically
document.cookie = "GDMcpCookie=7b85-40-4f0-89d3-2af68fdfg8a1; max-age="+60*60*24*30;
if(document.cookie){ //if cookie is set
cookieBox.classList.add("hide"); //hide cookie box
}else{ //if cookie not set then alert an error
alert("Cookie can't be set! Please unblock this site from the cookie setting of your browser.");
}
}
var checkCookie = document.cookie.indexOf("GDMcpCookie=7b85-40-4f0-89d3-2af68fdfg8a1"); //checking our cookie
//if cookie is set then hide the cookie box else show it
checkCookie != -1 ? cookieBox.classList.add("hide") : cookieBox.classList.remove("hide");
function hideClick(){
cookieBox.classList.add("hide")
};
</script>
<%-- End --%>
/*---->>>Cookie Style<<<-----*/
.cookie_wrapper{
position: fixed;
bottom: 20px;
right: 20px;
max-width: 320px;
max-height:80%;
background: #2D2D2D;
padding: 8px;
border-radius: 8px;
box-shadow: 1px 7px 14px -5px rgba(0,0,0,0.15);
text-align: center;
}
.cookie_wrapper.hide{
opacity: 0;
pointer-events: none;
transform: scale(0.8);
transition: all 0.3s ease;
}
.cookie_content h4{
font-size: 17px;
font-weight: 600;
color: #fff;
}
.cookie_content{
margin-top: 10px;
padding: 10px 15px;
}
.cookie_content p{
color: #fff;
font-size: 12px;
margin: 5px 0 20px 0;
}
.cookie_content .buttons{
display: flex;
align-items: center;
justify-content: center;
}
.saveButton{
padding: 10px 20px;
border: none;
outline: none;
color: #fff;
font-size: 16px;
font-weight: 500;
border-radius: 5px;
background: #EC5D27;
cursor: pointer;
transition: all 0.3s ease;
}
.saveButton:hover{
transform: scale(0.97);
}
.buttons .item{
margin: 0 10px;
}
.buttons a{
color: #FCBA7F;
}
/*end*/
Comments
Post a Comment