From 11ea3f98bd16ad371dddce5aa51a852468896872 Mon Sep 17 00:00:00 2001 From: Roman Pyrih Date: Wed, 21 Aug 2024 12:42:36 +0200 Subject: [PATCH] adding cookies --- .../themes/hello-elementor/functions.php | 11 + wp-content/themes/hello-elementor/header.php | 1 + .../CookieNoticePro/cookienoticepro.script.js | 429 ++++++++++++++ .../CookieNoticePro/cookienoticepro.style.css | 544 ++++++++++++++++++ .../libs/CookieNoticePro/cookies.php | 45 ++ .../libs/CookieNoticePro/index.html | 79 +++ 6 files changed, 1109 insertions(+) create mode 100644 wp-content/themes/hello-elementor/libs/CookieNoticePro/cookienoticepro.script.js create mode 100644 wp-content/themes/hello-elementor/libs/CookieNoticePro/cookienoticepro.style.css create mode 100644 wp-content/themes/hello-elementor/libs/CookieNoticePro/cookies.php create mode 100644 wp-content/themes/hello-elementor/libs/CookieNoticePro/index.html diff --git a/wp-content/themes/hello-elementor/functions.php b/wp-content/themes/hello-elementor/functions.php index fa48439..93a3e36 100644 --- a/wp-content/themes/hello-elementor/functions.php +++ b/wp-content/themes/hello-elementor/functions.php @@ -272,3 +272,14 @@ function enqueue_custom_scripts() { wp_enqueue_script( 'custom-script', get_template_directory_uri() . '/assets/js/custom.js', array(), '1.0', true ); } add_action( 'wp_enqueue_scripts', 'enqueue_custom_scripts' ); + +function add_custom_css() { + wp_enqueue_style('own-custom-style', get_template_directory_uri() . '/libs/CookieNoticePro/cookienoticepro.style.css', array(), '1.0', 'all'); +} +add_action('wp_enqueue_scripts', 'add_custom_css'); + +function cookie_notice_pro() { + wp_enqueue_style('own-custom-style', get_template_directory_uri() . '/libs/CookieNoticePro/cookienoticepro.style.css', array(), '1.0', 'all'); + wp_enqueue_script('own-custom-script', get_template_directory_uri() . '/libs/CookieNoticePro/cookienoticepro.script.js', array('jquery'), '1.0', true); +} +add_action('wp_enqueue_scripts', 'cookie_notice_pro'); \ No newline at end of file diff --git a/wp-content/themes/hello-elementor/header.php b/wp-content/themes/hello-elementor/header.php index 52e737e..26ac1f3 100644 --- a/wp-content/themes/hello-elementor/header.php +++ b/wp-content/themes/hello-elementor/header.php @@ -21,6 +21,7 @@ $skip_link_url = apply_filters( 'hello_elementor_skip_link_url', '#content' ); + > diff --git a/wp-content/themes/hello-elementor/libs/CookieNoticePro/cookienoticepro.script.js b/wp-content/themes/hello-elementor/libs/CookieNoticePro/cookienoticepro.script.js new file mode 100644 index 0000000..eac8958 --- /dev/null +++ b/wp-content/themes/hello-elementor/libs/CookieNoticePro/cookienoticepro.script.js @@ -0,0 +1,429 @@ +/* + * Copyright (c) 2024 Flerosoft (https://flerosoft.com) + * Software Name: Cookie Notice Pro - jQuery Plugin + * Product Page : https://cookienoticepro.flerosoft.com + * Documentation: https://cookienoticepro.flerosoft.com/docs + * Description: Cookie Notice Pro, a lightweight jQuery plugin, helps you to comply with GDPR. +Make your own cookie information popup in minutes. + * Changelog: https://cookienoticepro.flerosoft.com/docs/getting-started#item-1-4 +*/ + +(function ($) { + + 'use strict' + + const settingsIcon = + ''; + + const cookieIcon = + ' '; + + const closeIcon = ''; + + /* + *-------------------------------------------------------------------------- + * CONFIG OR SETTINGS - Customize the popup banner START + *-------------------------------------------------------------------------- + */ + const config = { + themeSettings: { + primaryColor: "#000000", // Primary Color of Popup Banner + darkColor: "#3b3e4a", // Dark Theme Color + lightColor: "#ffffff", // Light Theme Color + themeMode: "light", // Theme Mode (light|dark) + }, + enableGoogleConsentMode: true, // Add support for Google consent mode v2 (https://cookiebannergenerator.com/implementing-google-consent-mode-v2-with-cookie-notice-pro-a-step-by-step-guide/) + enableMinimize: true, // Enable minimized floating cookie icon to adjust preferences + showCookieIcon: true, // Hide or show the cookie icon + showSettingsBtn: true, // Hide or show the preference settings(true|false) + showCloseIcon: false, // Hide or show the popup close icon(true|false) + showDeclineBtn: true, // Hide or show the cookie decline button(true|false) + fullWidth: false, // Full width popup works only when "displayPosition" is set to top/bottom + allCheckboxesChecked: true, // The setting checkboxes should be checked by default initially or not(true|false) + + displayPosition: "bottom", // Where popup should appear(top|right|bottom|left) + settingsBtnLabel: "Personnaliser", // Text of settings button + + delay: 1, // After how much time should popup appear(2000 is equal to 2 seconds) + expires: 365, // Expiry date of cookie(365 is equal to 365 days) + + title: "Nous apprécions la vie privée des utilisateurs.", // Title of popup bannner + description: "Nous utilisons des cookies pour améliorer la qualité de la navigation, afficher des publicités ou du contenu adaptés aux besoins individuels des utilisateurs, et analyser le trafic sur le site. En cliquant sur le bouton « Accepter tout », vous acceptez l'utilisation de cookies par nos soins.", // Message + acceptBtnLabel: "Accepter", // Accept cookie button text + declineInfoBtnLabel: "Refuser", // Decline cookie button text + moreInfoBtnLink: "/regulamin", // Learn more link(default: privacy policy page) + moreInfoBtnLabel: "", // More info link text + cookieTypesTitle: "Sélectionnez les cookies à accepter.", // Title of cookie preference options + necessaryCookieTypeLabel: "Obligatoires", // Label text of Necessary cookie item + floatingIconTooltip: "Personnaliser", // Tooltip of floating cookie icon (Minimized) + necessaryCookieTypeDesc: "Ces cookies sont essentiels au bon fonctionnement du site web et ne peuvent pas être désactivés dans nos systèmes..", // Hover text of necessary cookies + onConsentAccept: ()=> { // It will inject scripts in head if cookie preferences menu(showSettingsBtn) is enabled + console.log("Consent accepted!") + }, + onConsentReject: ()=> { // This code will run on cookie reject/decline + console.log("Consent Rejected!"); + }, + cookieTypes: [ + // Typy plików cookie, wartość i opis (Wybór preferencji cookie) + { + type: "Fonctionnels", + value: "preferences", // ATTENTION : NE PAS MODIFIER CETTE VALEUR + description: "Les cookies essentiels sont cruciaux pour les fonctions de base du site web, et le site ne fonctionnera pas comme prévu sans eux. Ces cookies ne conservent aucune donnée permettant d'identifier une personne.", + }, + { + type: "Publicité", + value: "marketing", // ATTENTION : NE PAS MODIFIER CETTE VALEUR + description: "Les cookies publicitaires sont utilisés pour fournir aux utilisateurs des publicités personnalisées en fonction des pages qu'ils ont visitées précédemment et pour analyser l'efficacité des campagnes publicitaires.", + }, + { + type: "Analyse", + value: "analytics", // ATTENTION : NE PAS MODIFIER CETTE VALEUR + description: "Les cookies analytiques sont utilisés pour comprendre comment les utilisateurs interagissent avec le site web. Ces cookies aident à fournir des informations sur les mesures telles que le nombre de visiteurs, le taux de rebond, la source du trafic, etc.", + }, + ], + }; + /* + *-------------------------------------------------------------------------- + * CONFIG OR SETTINGS - Customize the popup banner END + *-------------------------------------------------------------------------- + */ + + const COOKIE_CONSENT = "cnp_consent"; // WARNING: DO NOT EDIT THIS VALUE + const COOKIE_CONSENT_PREFS = "cnp_prefs"; // WARNING: DO NOT EDIT THIS VALUE + const GOOGLE_CONSENT_MODE_AD_PREFS = "cnp_gconsent_ad_prefs" // WARNING: DO NOT EDIT THIS VALUE + const GOOGLE_CONSENT_MODE_ANALYTICS_STORAGE = "cnp_gconsent_analytics_storage" // WARNING: DO NOT EDIT THIS VALUE + + $.fn.cookieNoticePro = (event) => { + changeRootVariables(); + let cookieConsentExists = cookieExists(COOKIE_CONSENT); + let cookiePrefsValue = accessCookie(COOKIE_CONSENT_PREFS); + + if ( !cookieConsentExists) { + // add layer to the body below cookies to prevent click + $('body').append(''); + } + + // If consent is not accepted + if (!cookieConsentExists || event == "open") { + $("#cookieNoticePro").remove(); + $("#cookieMinimizeIcon").remove(); + + let cookieTypes='
  • "; + + const preferences = JSON.parse(cookiePrefsValue); + $.each(config.cookieTypes, (index, field) => { + if (field.type !== "" && field.value !== "") { + let cookieTypeDescription = ""; + if (field.description !== false) { + cookieTypeDescription = ' title="' + field.description + '"'; + } + cookieTypes+='
  • "; + } + }); + + let cookieNotice='
    '+ closeIcon +'
    '+cookieIcon+"

    "+config.title+'

    '+config.description+' '+config.moreInfoBtnLabel+'

    '+settingsIcon+config.settingsBtnLabel+'
    "; + + + setTimeout(() => { + $("body").append(cookieNotice); + $("#cookieNoticePro").hide().fadeIn("slow", () => { + if(event == "open") { + $("#cookieSettings").trigger("click"); + $.each(preferences, (index, field) => { + $("input#gdprPrefItem" + field).prop("checked", true); + }); + } + }); + if(!config.showSettingsBtn) { + $("#cookieNoticePro #cookieSettings").hide(); + } + if(!config.showDeclineBtn) { + $("#cookieNoticePro #cookieReject").hide(); + } + if(!config.showCookieIcon) { + $("#cookieNoticePro #cookieIcon").hide(); + } + if(!config.showCloseIcon) { + $("#cookieNoticePro #closeIcon").hide(); + } + }, event === "open" ? 0 : config.delay); + $("body").on("click", "#cookieAccept", () => { + hideCookieBanner(true, config.expires); + $('input[name="gdprPrefItem"][data-compulsory="on"]').prop("checked", true); + let prefs = []; + $.each($('input[name="gdprPrefItem"]').serializeArray(), (i, field) => { + prefs.push(field.value); + }); + createCookie(COOKIE_CONSENT_PREFS, encodeURIComponent(JSON.stringify(prefs)), { + expires: daysToUTC(365), + path: "/" + }); + config.onConsentAccept.call(this); + config.showSettingsBtn? injectScripts() : null; + if(config.enableGoogleConsentMode) { + googleConsentModeHandler(); + } + }); + $("body").on("click", "#cookieSettings", () => { + if(event === "open"){ + $('input[name="gdprPrefItem"]:not(:disabled)').attr("data-compulsory", "off").prop("checked", false); + $("#cookieTypes").slideDown("fast", function () { + $("#cookieSettings").prop("disabled", true); + }); + } else { + $('input[name="gdprPrefItem"]:not(:disabled)').attr("data-compulsory", "off").prop("checked", config.allCheckboxesChecked); + $("#cookieTypes").toggle("fast", function () { + $("#cookieSettings").prop("disabled", false); + }); + } + }); + $("body").on("click", "#closeIcon", () => { + $("#cookieNoticePro").remove(); + }); + $("body").on("click", "#cookieReject", () => { + hideCookieBanner(false, config.expires); + config.onConsentReject.call(this); + + // Delete prefs cookie from brower on reject + createCookie(COOKIE_CONSENT_PREFS, "", { + expires: daysToUTC(-365), + path: "/" + }); + }); + } + // If already consent is accepted, inject preferences + else { + if(config.showSettingsBtn) { + injectScripts(); + } + if(config.enableMinimize){ + minimizeCookieBanner(); + } + if(config.enableGoogleConsentMode) { + googleConsentModeHandler(); + } + } + + + }; + + /** + * Check if cookie exists + * @param {string} cookieName + */ + const cookieExists = (cookieName) => { + if(document.cookie.indexOf(cookieName) > -1){ + return true; + } + return false; + }; + + /** + * Create the cookie and hide the banner + * @param {string} value + * @param {string} expiryDays + */ + const hideCookieBanner = (value, expiryDays) => { + createCookie(COOKIE_CONSENT, value, { + expires: daysToUTC(expiryDays), + path: "/", + }); + $("#cookieNoticePro").fadeOut("fast", () => { + $('body').off('click', "#cookieSettings"); + $('body').off('click', "#cookieReject"); + $('body').off('click', "#closeIcon"); + $('body').off('click', "#cookieAccept"); + $(this).remove(); + }); + if(config.enableMinimize) { + minimizeCookieBanner(); + } + }; + + /** + * Minimize the cookie banner and show a minimized icon. + */ + const minimizeCookieBanner = () => { + $( '#cookie-layer' ).remove(); + // Remove any existing minimize icon before appending a new one. + $('#cookieMinimizeIcon').remove(); + + // Minimize the banner and show an icon instead. + let minimizeIcon = $('
    ' + cookieIcon + '
    '+ config.floatingIconTooltip +'
    '); + $('body').append(minimizeIcon); + + // Define the click behavior for the minimize icon. + $('#cookieMinimizeIcon').on('click', function() { + if ($(this).hasClass('zoomIn')) { + $(this).removeClass('zoomIn').addClass('zoomOut'); + setTimeout(() => { + $.fn.cookieNoticePro("open"); // Reopen the cookie notice + }, 200); // Match the timeout to the animation duration + } else { + $(this).removeClass('zoomOut').addClass('zoomIn'); + } + }); + }; + + + /** + * Set Cookie + * @param {string} name - Cookie Name + * @param {string} value - Cookie Value + * @param {string} expiryDays - Expiry Date of cookie + */ + const createCookie = (name, value, options={})=> { + document.cookie = `${name}=${value}${ + Object.keys(options) + .reduce((acc, key) => { + return acc + `;${key.replace(/([A-Z])/g, $1 => '-' + $1.toLowerCase())}=${ + options[key]}`; + }, '') + }`; + }; + + /** + * Converts Days Into UTC String + * @param {number} days - Name of the cookie + * @return {string} UTC date string + */ + const daysToUTC = (days) => { + const newDate = new Date(); + newDate.setTime(newDate.getTime() + days * 24 * 60 * 60 * 1000); + return newDate.toUTCString(); + }; + + /** + * Get Cookie By Name + * @param {string} name - Name of the cookie + * @return {string(number|Array)} Value of the cookie + */ + const accessCookie = (name) => { + const cookies = document.cookie.split(";").reduce((acc, cookieString) => { + const [key, value] = cookieString.split("=").map((s) => s.trim()); + if (key && value) { + acc[key] = decodeURIComponent(value); + } + return acc; + }, {}); + return name ? cookies[name] || false : cookies; + }; + + /** + * Updates Google Consent Mode based on user consent and preferences. + */ + const googleConsentModeHandler = () => { + if(!config.enableGoogleConsentMode) return; + const consent = JSON.parse(accessCookie(COOKIE_CONSENT)); + const preferences = JSON.parse(accessCookie(COOKIE_CONSENT_PREFS)); + const googleConsentAnalyticsStorage = JSON.parse(accessCookie(GOOGLE_CONSENT_MODE_ANALYTICS_STORAGE)); + const googleConsentAdPrefs = JSON.parse(accessCookie(GOOGLE_CONSENT_MODE_AD_PREFS)); + + try { + if(consent === true) { + // if analytics is accepted + if(preferences.indexOf("analytics") > -1) { + if(!googleConsentAnalyticsStorage) { + createCookie(GOOGLE_CONSENT_MODE_ANALYTICS_STORAGE, encodeURIComponent(true), { + expires: daysToUTC(365), + path: "/" + }); + gtag('consent', 'update', { + 'analytics_storage': 'granted' + }); + } + } else { + if(googleConsentAnalyticsStorage === true) { + gtag('consent', 'update', { + 'analytics_storage': 'denied' + }); + createCookie(GOOGLE_CONSENT_MODE_ANALYTICS_STORAGE, "", { + expires: daysToUTC(-365), + path: "/" + }); + } + } + // if marketing or advertising is accepted + if( preferences.indexOf("marketing") > -1) { + if(!googleConsentAdPrefs) { + createCookie(GOOGLE_CONSENT_MODE_AD_PREFS, encodeURIComponent(true), { + expires: daysToUTC(365), + path: "/" + }); + gtag('consent', 'update', { + 'ad_storage': 'granted', + 'ad_user_data': 'granted', + 'ad_personalization': 'granted' + }); + } + } else { + if(googleConsentAdPrefs === true) { + gtag('consent', 'update', { + 'ad_storage': 'denied', + 'ad_user_data': 'denied', + 'ad_personalization': 'denied' + }); + createCookie(GOOGLE_CONSENT_MODE_AD_PREFS, "", { + expires: daysToUTC(-365), + path: "/" + }); + } + + } + } + + } catch (error) { + console.warn("CookieNoticePro: Error initializing Google Consent Mode. Ensure gtag.js is correctly installed:", error); + } + } + + const changeRootVariables = () =>{ + $(':root').css('--cookieNoticeProLight', config.themeSettings.lightColor); + $(':root').css('--cookieNoticeProDark', config.themeSettings.darkColor); + } + + return window.cookieNoticePro = { + init:()=>{ + $.fn.cookieNoticePro(); + }, + /** + * Reopens the cookie notice banner + */ + reinit:()=>{ + $.fn.cookieNoticePro("open"); + }, + + /** + * Returns true if consent is given else false + */ + isAccepted: ()=>{ + let consent = accessCookie(COOKIE_CONSENT); + return JSON.parse(consent); + }, + + /** + * Returns the value of the cookieConsentPrefs cookie + */ + getPreferences: ()=>{ + let preferences = accessCookie(COOKIE_CONSENT_PREFS); + return JSON.parse(preferences); + }, + + /** + * Check if a particular preference is accepted + * @param {string} cookieName + */ + isPreferenceAccepted: (cookieTypeValue)=>{ + let consent = JSON.parse(accessCookie(COOKIE_CONSENT)); + let preferences = accessCookie(COOKIE_CONSENT_PREFS); + preferences = JSON.parse(preferences); + if (consent === false) { + return false; + } + if (preferences === false || preferences.indexOf(cookieTypeValue) === -1) { + return false; + } + return true; + }, + }; +})(jQuery); diff --git a/wp-content/themes/hello-elementor/libs/CookieNoticePro/cookienoticepro.style.css b/wp-content/themes/hello-elementor/libs/CookieNoticePro/cookienoticepro.style.css new file mode 100644 index 0000000..2caf083 --- /dev/null +++ b/wp-content/themes/hello-elementor/libs/CookieNoticePro/cookienoticepro.style.css @@ -0,0 +1,544 @@ +/* + * Copyright (c) 2024 Flerosoft (https://flerosoft.com) + * Software Name: Cookie Notice Pro - jQuery Plugin + * Product Page : https://cookienoticepro.flerosoft.com + * Documentation: https://cookienoticepro.flerosoft.com/docs + * Description: Cookie Notice Pro, a lightweight jQuery plugin, helps you to comply with GDPR. +Make your own cookie information popup in minutes. + */ + +/*********************** Cookie Dialog ***********************/ +@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap'); + +:root { + --cookieNoticeProLight: #ffffff; + --cookieNoticeProDark: #393d4d; +} + +@keyframes cookieNoticeProZoomIn { + from { + transform: scale(0); + opacity: 0; + } + + to { + transform: scale(1); + opacity: 1; + } +} + +@keyframes cookieNoticeProZoomOut { + from { + transform: scale(1); + opacity: 1; + } + + to { + transform: scale(0); + opacity: 0; + } +} + +#cookieNoticePro * { + margin: 0; + padding: 0; + text-decoration: none; + list-style: none; + font-family: 'Poppins', sans-serif; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +#cookieNoticePro button, +#cookieNoticePro a { + cursor: pointer; + color: inherit; + font-family: inherit; +} + +#cookieNoticePro button { + outline: none; + border: none; + -moz-appearance: none; + appearance: none; + -webkit-appearance: none; + appearance: none; +} + +#cookieNoticePro strong, +#cookieNoticePro em { + font-weight: bold; + font-family: inherit; +} + +#cookieNoticePro a:hover { + text-decoration: none; + cursor: pointer; +} + +#cookieNoticePro a:focus, +#cookieNoticePro input:focus { + outline: none; + list-style: none; +} + + +#cookieNoticePro.light { + background-color: #ffffff; + background-color: var(--cookieNoticeProLight); + color: #393d4d; + color: var(--cookieNoticeProDark); +} + +#cookieNoticePro.light p, +#cookieNoticePro.light ul { + color: #393d4d; + color: var(--cookieNoticeProDark); +} + +#cookieNoticePro.light h5 { + color: var(--cookieNoticeProDark); +} + +#cookieNoticePro.light button#cookieReject { + background: #ffffff; + background: var(--cookieNoticeProLight); + font-size: 13px; +} + +@media (max-width: 600px) { + #cookieNoticePro.light button#cookieReject { + order: 1; + } + + #cookieNoticePro.light button#cookieAccept { + order: 2; + } +} + +#cookieNoticePro.dark { + background-color: #393d4d; + background-color: var(--cookieNoticeProDark); + color: #ffffff; + color: var(--cookieNoticeProLight); +} + +#cookieNoticePro.dark p, +#cookieNoticePro.dark ul { + color: #ffffff; + color: var(--cookieNoticeProLight); +} + +#cookieNoticePro.dark h5 { + color: #ffffff; + color: var(--cookieNoticeProLight); +} + +#cookieNoticePro.dark button#cookieReject { + background: transparent; + color: #ffffff; + color: var(--cookieNoticeProLight); + border: 1px solid #ffffff; + border: 1px solid var(--cookieNoticeProLight); +} + +#cookieNoticePro { + -webkit-box-sizing: border-box; + box-sizing: border-box; + position: fixed; + padding: 20px; + border-radius: 10px; + -webkit-box-shadow: 0 6px 6px rgba(0, 0, 0, 0.25); + box-shadow: 0 6px 6px rgba(0, 0, 0, 0.25); + font-family: inherit; + z-index: 999997; +} + +#cookieNoticePro #closeIcon { + width: 20px; + height: 20px; + cursor: pointer; + color: #bfb9b9; + overflow: hidden; + opacity: 0.85; + z-index: 999999; + position: absolute; + top: 4px; + right: 4px; +} + +#cookieNoticePro svg { + display: block; +} + +#cookieNoticePro.display-left { + left: 30px; + bottom: 30px; + max-width: 395px; +} + +#cookieNoticePro.display-right { + right: 30px; + bottom: 30px; + max-width: 395px; +} + +#cookieNoticePro.display-top { + top: 30px; + width: 800px; + left: 50%; + margin-left: -400px; +} + +#cookieNoticePro.display-bottom { + bottom: 30px; + width: 800px; + left: 50%; + margin-left: -400px; +} + +#cookieNoticePro.display-top .content-wrap, +#cookieNoticePro.display-bottom .content-wrap { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +#cookieNoticePro.display-top .msg-wrap, +#cookieNoticePro.display-bottom .msg-wrap { + max-width: 65%; + width: 100%; +} + +#cookieNoticePro.display-top .msg-wrap, +#cookieNoticePro.display-bottom .msg-wrap { + margin-bottom: 0; +} + +#cookieNoticePro.display-top #cookieSettings, +#cookieNoticePro.display-bottom #cookieSettings { + margin-bottom: 0; +} + +#cookieNoticePro.display-top #cookieTypes, +#cookieNoticePro.display-bottom #cookieTypes { + margin-top: 20px; +} + +#cookieNoticePro .btn-wrap { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + font-weight: bold; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + margin: 0 -5px 0 -5px; + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} + +#cookieNoticePro .btn-wrap button { + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + padding: 0 7px; + margin: 0 5px 10px 5px; + border-radius: 20px; + cursor: pointer; + white-space: nowrap; + min-width: 130px; + line-height: 36px; + border: none; + font-family: inherit; + font-size: 16px; + -webkit-transition: -webkit-box-shadow .3s; + transition: -webkit-box-shadow .3s; + -o-transition: box-shadow .3s; + transition: box-shadow .3s; + transition: box-shadow .3s, -webkit-box-shadow .3s; +} + +#cookieNoticePro .btn-wrap button:hover { + -webkit-transition: -webkit-box-shadow .4s cubic-bezier(.25, .8, .25, 1), -webkit-transform .4s cubic-bezier(.25, .8, .25, 1); + transition: -webkit-box-shadow .4s cubic-bezier(.25, .8, .25, 1), -webkit-transform .4s cubic-bezier(.25, .8, .25, 1); + -o-transition: box-shadow .4s cubic-bezier(.25, .8, .25, 1), transform .4s cubic-bezier(.25, .8, .25, 1); + transition: box-shadow .4s cubic-bezier(.25, .8, .25, 1), transform .4s cubic-bezier(.25, .8, .25, 1); + transition: box-shadow .4s cubic-bezier(.25, .8, .25, 1), transform .4s cubic-bezier(.25, .8, .25, 1), -webkit-box-shadow .4s cubic-bezier(.25, .8, .25, 1), -webkit-transform .4s cubic-bezier(.25, .8, .25, 1); + -webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .3); + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .3); + -webkit-transform: translate3d(0, -1px, 0); + transform: translate3d(0, -1px, 0); +} + +#cookieNoticePro #cookieSettings { + font-size: 12px; + font-weight: bold; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + text-transform: uppercase; + cursor: pointer; + font-weight: normal; + margin-bottom: 20px; +} + +#cookieNoticePro #cookieSettings svg { + vertical-align: middle; + margin-right: 8px; +} + +#cookieNoticePro h4 { + font-family: inherit; + font-weight: bold; + font-size: 18px; +} + +#cookieNoticePro .title-wrap { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + margin-bottom: 10px; +} + +#cookieNoticePro .title-wrap svg { + margin-right: 10px; +} + +#cookieNoticePro h5 { + font-family: inherit; + font-weight: bold; + font-size: 12px; + margin-bottom: 10px; + text-transform: uppercase; +} + +#cookieNoticePro p, +#cookieNoticePro ul { + font-size: 12px; + margin-bottom: 10px; +} + +#cookieNoticePro p:last-child { + margin-bottom: 0; + text-align: left; +} + +#cookieNoticePro li { + width: 49%; + display: inline-block; +} + +#cookieNoticePro a { + text-decoration: none; + font-size: 14px; + padding-bottom: 2px; + border-bottom: 1px dotted rgba(255, 255, 255, 0.75); + -webkit-transition: all 0.3s ease-in; + -o-transition: all 0.3s ease-in; + transition: all 0.3s ease-in; +} + + +#cookieTypes label { + text-transform: uppercase; + font-size: 13px; +} + +#cookieNoticePro button:disabled { + opacity: 0.3; +} + +#cookieNoticePro input[type="checkbox"] { + -webkit-appearance: auto; + -moz-appearance: auto; + appearance: auto; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeSpeed; + width: 14px; + height: 14px; + margin: 4px 10px 0px 0px; + display: block; + float: left; + position: relative; + outline: none; + border: none; +} + +#cookieNoticePro input[type="checkbox"]:checked:after { + background: #d3d3d3; + content: "\2714"; + color: #808080; +} + +#cookieNoticePro input[type="checkbox"]:after { + content: ""; + vertical-align: middle; + text-align: center; + line-height: 13px; + position: absolute; + cursor: pointer; + height: 14px; + width: 14px; + left: 0; + top: 0; + font-size: 10px; + background: #d3d3d3; +} + +#cookieNoticePro.display-top.full-width-true, +#cookieNoticePro.display-bottom.full-width-true { + width: 100%; + max-width: 100%; + left: auto; + right: auto; + bottom: auto; + top: 0; + border-radius: 0; + margin: auto; +} + +#cookieNoticePro.display-bottom.full-width-true { + bottom: 0; + top: auto; + -webkit-box-shadow: 0 -3px 3px rgb(0 0 0 / 25%); + box-shadow: 0 -3px 3px rgb(0 0 0 / 25%); +} + +#cookieNoticePro.display-top.full-width-true .title-wrap, +#cookieNoticePro.display-bottom.full-width-true .title-wrap { + display: none; +} + +#cookieNoticePro.display-top.full-width-true .btn-wrap button, +#cookieNoticePro.display-bottom.full-width-true .btn-wrap button { + margin-bottom: 10px; +} + +#cookieMinimizeIcon { + position: fixed; + right: 20px; + bottom: 20px; + border-radius: 50%; + cursor: pointer; + box-shadow: 0 6px 6px rgba(0, 0, 0, 0.25); + cursor: pointer; + animation: cookieNoticeProZoomIn 0.2s forwards; + transition: box-shadow 0.1s ease-in-out; + z-index: 99999; +} + +#cookieMinimizeIcon svg { + display: block; +} + +#cookieMinimizeIcon.zoomIn { + animation: cookieNoticeProZoomIn 0.2s forwards; +} + +#cookieMinimizeIcon.zoomOut { + animation: cookieNoticeProZoomOut 0.2s forwards; +} + +#cookieMinimizeIcon .floating-text { + position: absolute; + top: 50%; + left: -10%; + transform: translate(-100%, -50%); + background: rgba(51, 51, 51, 0.5); + padding: 2px 4px; + color: #ffffff; + border-radius: 2px; + font-family: 'Poppins', sans-serif; + font-size: 12px; + text-wrap: nowrap; + display: none; +} + +#cookieMinimizeIcon:hover { + box-shadow: 0 12px 12px rgba(0, 0, 0, 0.25); +} + +#cookieMinimizeIcon:hover>.floating-text { + display: block; +} + + + +@media only screen and (max-width: 800px) { + + #cookieNoticePro.display-top, + #cookieNoticePro.display-bottom { + width: 100%; + max-width: 100%; + left: auto; + right: auto; + bottom: auto; + top: 0; + border-radius: 0; + margin: auto; + } + + #cookieNoticePro.display-bottom { + bottom: 0; + top: auto; + -webkit-box-shadow: 0 -3px 3px rgb(0 0 0 / 25%); + box-shadow: 0 -3px 3px rgb(0 0 0 / 25%); + } + + #cookieNoticePro.display-top .btn-wrap button, + #cookieNoticePro.display-bottom .btn-wrap button { + margin-bottom: 10px; + } + + #cookieNoticePro.display-top .msg-wrap, + #cookieNoticePro.display-bottom .msg-wrap { + margin-right: 20px; + } +} + +@media only screen and (max-width: 600px) { + + #cookieNoticePro.display-left, + #cookieNoticePro.display-right { + width: 100%; + max-width: 100%; + left: auto; + right: auto; + bottom: 0; + border-radius: 0; + -webkit-box-shadow: 0 -3px 3px rgb(0 0 0 / 25%); + box-shadow: 0 -3px 3px rgb(0 0 0 / 25%); + } + + #cookieNoticePro.display-top .content-wrap, + #cookieNoticePro.display-bottom .content-wrap { + display: block; + } + + #cookieNoticePro.display-top .msg-wrap, + #cookieNoticePro.display-bottom .msg-wrap { + max-width: 100%; + } + + #cookieNoticePro.display-top #cookieSettings, + #cookieNoticePro.display-bottom #cookieSettings { + margin-bottom: 20px; + } +} \ No newline at end of file diff --git a/wp-content/themes/hello-elementor/libs/CookieNoticePro/cookies.php b/wp-content/themes/hello-elementor/libs/CookieNoticePro/cookies.php new file mode 100644 index 0000000..7c4edec --- /dev/null +++ b/wp-content/themes/hello-elementor/libs/CookieNoticePro/cookies.php @@ -0,0 +1,45 @@ + + + + + \ No newline at end of file diff --git a/wp-content/themes/hello-elementor/libs/CookieNoticePro/index.html b/wp-content/themes/hello-elementor/libs/CookieNoticePro/index.html new file mode 100644 index 0000000..6d65b1f --- /dev/null +++ b/wp-content/themes/hello-elementor/libs/CookieNoticePro/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Cookie Notice Pro | Advanced jQuery Cookie Consent Plugin + + + + + + + + \ No newline at end of file