From e313334521dd0416a0666269dcdb539c873e32ac Mon Sep 17 00:00:00 2001 From: Roodney Moraes Date: Sat, 16 Nov 2024 23:12:18 -0300 Subject: [PATCH] Ajusta estilos do banner de consentimento de cookies e remove logs do Google Analytics --- src/css/custom-index.css | 2 ++ src/css/custom-page.css | 1 + src/js/google-analytics.js | 8 -------- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/css/custom-index.css b/src/css/custom-index.css index 80d81ab..9b90b35 100644 --- a/src/css/custom-index.css +++ b/src/css/custom-index.css @@ -190,6 +190,7 @@ footer .social-icons a { .cookie-consent-banner div { width: 100%; + margin-bottom: 12px; } .cookie-consent-banner .d-flex { @@ -199,6 +200,7 @@ footer .social-icons a { .cookie-consent-banner .btn { width: 100%; + margin-top: 10px; margin-bottom: 10px; } diff --git a/src/css/custom-page.css b/src/css/custom-page.css index 2470bb5..028f84a 100644 --- a/src/css/custom-page.css +++ b/src/css/custom-page.css @@ -67,6 +67,7 @@ footer { .cookie-consent-banner div { width: 100%; + margin-bottom: 12px; } .cookie-consent-banner .d-flex { diff --git a/src/js/google-analytics.js b/src/js/google-analytics.js index 38e8bd9..4d0a572 100644 --- a/src/js/google-analytics.js +++ b/src/js/google-analytics.js @@ -1,30 +1,23 @@ document.addEventListener('DOMContentLoaded', () => { const consentAccepted = localStorage.getItem('consentAccepted'); - console.log('Consent accepted:', consentAccepted); if (!consentAccepted) { - console.log('Displaying cookie consent banner'); document.getElementById('cookieConsentBanner').style.display = 'block'; } document.getElementById('acceptConsent').addEventListener('click', () => { - console.log('Accept button clicked'); localStorage.setItem('consentAccepted', 'true'); loadGoogleAnalytics(); document.getElementById('cookieConsentBanner').style.display = 'none'; document.getElementById('cookieConsentBanner').setAttribute('style', 'display: none !important'); - console.log('Banner hidden after accept'); }); document.getElementById('declineConsent').addEventListener('click', () => { - console.log('Decline button clicked'); document.getElementById('cookieConsentBanner').style.display = 'none'; document.getElementById('cookieConsentBanner').setAttribute('style', 'display: none !important'); - console.log('Banner hidden after decline'); }); function loadGoogleAnalytics() { - console.log('Loading Google Analytics'); const script = document.createElement('script'); script.src = 'https://www.googletagmanager.com/gtag/js?id=G-CMLZKJVKKY'; script.async = true; @@ -35,7 +28,6 @@ document.addEventListener('DOMContentLoaded', () => { function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-CMLZKJVKKY'); - console.log('Google Analytics loaded'); }; }