Last active
August 29, 2015 14:22
-
-
Save dagostoni/274c932ad81df12ca58b to your computer and use it in GitHub Desktop.
Cookie Choice Google
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JS | |
sono commentati tutti gli stili associati via javascript e vengono gestiti autonomamente da css | |
HTML | |
va incollato subito dopo l'apertura del <body> | |
https://www.cookiechoices.org/#resources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="/cookiechoices.js"></script> | |
<script> | |
function showCookieChoice(event) { | |
cookieChoices.showCookieConsentBar('Questo sito fa uso di cookies per servirti meglio. Continuando ad utilizzarlo, acconsenti e li accetti', 'chiudi', 'approfondisci', 'http://www.sito.it/cookie-policy-del-sito'); | |
} | |
if (document.addEventListener) | |
document.addEventListener('DOMContentLoaded', showCookieChoice); | |
else | |
window.onload = showCookieChoice; | |
</script> | |
<!-- // versione originale Google | |
<script src="/cookiechoices.js"></script> | |
<script> | |
document.addEventListener('DOMContentLoaded', function(event) { | |
cookieChoices.showCookieConsentBar('Questo sito fa uso di cookies per servirti meglio. Continuando ad utilizzarlo, acconsenti e li accetti','chiudi', 'approfondisci', 'http://www.sito.it/cookie-policy-del-sito'); | |
}); | |
</script> | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cookieChoiceInfo{ | |
/* STANDARD STYLE JS */ | |
position:fixed; | |
width:100%; | |
background-color:#eee; | |
margin:0; | |
left:0; | |
top:0; | |
padding:4px; | |
z-index:1000; | |
text-align:center; | |
/* STANDARD STYLE JS END */ | |
background-color:#333; | |
color:#fafafa; | |
font-size: 14px; | |
padding:8px; | |
box-sizing:border-box; | |
} | |
@media (max-width: 850px){ | |
#cookieChoiceInfo span{ | |
display: block; | |
margin-bottom:5px; | |
} | |
} | |
#cookieChoiceInfo a{ | |
display:inline-block; | |
background-color:#fafafa; | |
padding:3px 9px; | |
color:#111; | |
text-decoration:none; | |
font-size:14px; | |
margin-left:8px; | |
} | |
#cookieChoiceInfo a:hover{ | |
background-color:#f0f0f0; | |
text-decoration:none; | |
} | |
#cookieChoiceInfo a#cookieChoiceDismiss{ | |
margin-left:24px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment