214
| <![CDATA[<style>
/* GOOGLE ANALYTICS */
.cookies-container {
color: #222;
position: fixed;
bottom: 2rem;
z-index: 1000;
}
.card-title {
font-style: normal;
font-weight: normal;
font-size: 21px;
line-height: 1.5;
margin-bottom: 20px;
margin-top: 0;
}
.card-link {
font-weight: bold;
text-decoration: none;
color: #2F2F2F;
}
.card-text {
font-style: normal;
font-weight: normal;
line-height: 150%;
align-items: center;
color: #505050;
}
.cookies-content {
background: white;
padding: 20px;
opacity: 0;
transform: translateY(1rem);
animation: slideUp 0.5s forwards;
border-radius: 4px;
background: rgba(251, 251, 251, 0.95);
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.7);
}
@keyframes slideUp {
to {
transform: initial;
opacity: initial;
}
}
.cookies-pref label {
margin-right: 1rem;
}
.cookies-save {
grid-column: 2;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background: #0D7944;
color: white;
cursor: pointer;
border: none;
border-radius: 5px;
padding: 0.8rem 2rem;
font-size: 16px;
}
.cookies-save:hover {
background: var(--Primary2);
transition: .3s;
}
@media (max-width: 500px) {
.cookies-content {
grid-template-columns: 1fr;
}
.cookies-save {
grid-column: 1;
grid-row: 3;
}
}
</style>]]>
|
322
| <![CDATA[<script>
function cookies(functions) {
const clientName = 'camarairupi';
const container = document.querySelector('.cookies-container');
const save = document.querySelector('.cookies-save');
if (!container || !save) return null;
const localPref = JSON.parse(window.localStorage.getItem('cookies-pref' + clientName));
if (localPref) activateFunctions(localPref);
function getFormPref() {
return [...document.querySelectorAll('[data-function]')]
.filter((el) => el.checked)
.map((el) => el.getAttribute('data-function'));
}
function activateFunctions(pref) {
pref.forEach((f) => functions[f]());
container.style.display = 'none';
window.localStorage.setItem('cookies-pref' + clientName, JSON.stringify(pref));
}
function handleSave() {
const pref = getFormPref();
activateFunctions(pref);
}
save.addEventListener('click', handleSave);
}
function analytics() {
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-139795666-1');
console.log('Função anali..');
}
function simplecookie() {
console.log('Política de Privacidade Autorizada');
}
cookies({
analytics, });
</script>]]>
|