init
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "jetpack/cookie-consent",
|
||||
"title": "Cookie Consent",
|
||||
"description": "Display a customizable cookie consent banner. To display this block on all pages of your site, please add it inside a Template Part that is present on all your templates, like a Header or a Footer.",
|
||||
"keywords": [
|
||||
"cookie",
|
||||
"consent",
|
||||
"privacy",
|
||||
"GDPR",
|
||||
"EU"
|
||||
],
|
||||
"version": "12.5.0",
|
||||
"textdomain": "jetpack",
|
||||
"category": "grow",
|
||||
"icon": "<svg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path d='m20.27,11.03c-.02-.31-.05-.62-.11-.92h-3.88v-2.91h-2.87v-3.79c-.32-.06-.64-.1-.97-.12-.15,0-.29,0-.44,0C7.42,3.28,3.71,7,3.71,11.57s3.71,8.3,8.29,8.3,8.29-3.72,8.29-8.3c0-.18,0-.36-.02-.54Zm-8.23,7.79c-4,0-7.24-3.25-7.24-7.25s3.24-7.24,7.24-7.24c.14,0,.27,0,.4.02v3.81h2.9v2.87h3.91c.02.18.03.36.03.54,0,4-3.24,7.25-7.24,7.25Z'/><path d='M 8, 8 a 1,1 0 1,1 2,0 a 1,1 0 1,1 -2,0'/><path d='M 12, 11.5 a 1,1 0 1,1 2,0 a 1,1 0 1,1 -2,0'/><path d='M 13, 16 a 1,1 0 1,1 2,0 a 1,1 0 1,1 -2,0'/><path d='M 8, 14 a 1,1 0 1,1 2,0 a 1,1 0 1,1 -2,0'/></svg>",
|
||||
"supports": {
|
||||
"align": [
|
||||
"left",
|
||||
"right",
|
||||
"wide",
|
||||
"full"
|
||||
],
|
||||
"alignWide": true,
|
||||
"anchor": false,
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true,
|
||||
"background": true
|
||||
},
|
||||
"spacing": {
|
||||
"padding": true
|
||||
},
|
||||
"customClassName": true,
|
||||
"className": true,
|
||||
"html": false,
|
||||
"lock": false,
|
||||
"multiple": false,
|
||||
"reusable": false
|
||||
},
|
||||
"attributes": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"selector": "p"
|
||||
},
|
||||
"style": {
|
||||
"type": "object",
|
||||
"default": {
|
||||
"color": {
|
||||
"text": "var(--wp--preset--color--contrast)",
|
||||
"background": "var(--wp--preset--color--tertiary)",
|
||||
"link": "var(--wp--preset--color--contrast)"
|
||||
},
|
||||
"spacing": {
|
||||
"padding": {
|
||||
"top": "1em",
|
||||
"right": "1em",
|
||||
"bottom": "1em",
|
||||
"left": "1em"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"default": "wide"
|
||||
},
|
||||
"consentExpiryDays": {
|
||||
"type": "integer",
|
||||
"default": 365
|
||||
},
|
||||
"showOverlay": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"viewScript": "file:./view.js",
|
||||
"editorScript": "jetpack-blocks-editor"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('wp-dom-ready'), 'version' => '62af1bb0e3146219a513');
|
||||
@@ -0,0 +1 @@
|
||||
.wp-block-jetpack-cookie-consent{align-items:center;box-sizing:border-box;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between}.wp-block-jetpack-cookie-consent .wp-block-button__link{white-space:nowrap!important}.wp-block-jetpack-cookie-consent:not([role=document]){animation:cookie-consent-slide-in .2s ease-in-out;bottom:50px;position:fixed;transition:opacity .2s ease-in-out;z-index:50001}.wp-block-jetpack-cookie-consent:not([role=document]) span{display:none}.wp-block-jetpack-cookie-consent:not([role=document]) .wp-block-button{white-space:nowrap}@keyframes cookie-consent-slide-in{0%{opacity:0}to{opacity:1}}.wp-block-jetpack-cookie-consent:not([role=document]).is-dismissed{opacity:0;pointer-events:none}.wp-block-jetpack-cookie-consent:not([role=document]).alignleft,.wp-block-jetpack-cookie-consent:not([role=document]).alignright{flex-wrap:nowrap;max-width:50%}.wp-block-jetpack-cookie-consent:not([role=document]).alignright{margin-left:auto!important;right:10px}.wp-block-jetpack-cookie-consent:not([role=document]).alignleft{left:10px}.wp-block-jetpack-cookie-consent:not([role=document]).alignwide{left:5%!important;max-width:90%!important;width:100vw!important}.wp-block-jetpack-cookie-consent:not([role=document]).alignfull{width:100%}@media screen and (max-width:768px){.wp-block-jetpack-cookie-consent:not([role=document]).alignleft,.wp-block-jetpack-cookie-consent:not([role=document]).alignright{flex-wrap:wrap;left:5%;margin-left:0!important;max-width:unset;max-width:90%;width:100vw}}
|
||||
@@ -0,0 +1 @@
|
||||
(()=>{var e={79366:(e,t,r)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(r.p=window.Jetpack_Block_Assets_Base_Url)},98490:e=>{"use strict";e.exports=window.wp.domReady}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var c=t[o]={exports:{}};return e[o](c,c.exports,r),c.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e+"../"})(),(()=>{"use strict";r(79366)})(),(()=>{"use strict";var e=r(98490);r.n(e)()((function(){const e=document.querySelector(".wp-block-jetpack-cookie-consent"),t=e.querySelector("span"),r=parseInt(t.textContent),o=new Date(Date.now()+864e5*r),n=e.querySelector(".wp-block-button a");n.setAttribute("role","button"),n.setAttribute("href","#"),n.addEventListener("click",(e=>{n.closest(".wp-block-jetpack-cookie-consent")&&e.preventDefault()})),n.addEventListener("click",(function(){try{document.cookie=`eucookielaw=${o.getTime()};path=/;expires=${o.toGMTString()}`,e.classList.add("is-dismissed"),e.addEventListener("transitionend",(()=>e.remove()));const t=new Event("eucookielaw-dismissed");document.dispatchEvent(t)}catch{}}))}))})()})();
|
||||
@@ -0,0 +1 @@
|
||||
.wp-block-jetpack-cookie-consent{align-items:center;box-sizing:border-box;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between}.wp-block-jetpack-cookie-consent .wp-block-button__link{white-space:nowrap!important}.wp-block-jetpack-cookie-consent:not([role=document]){animation:cookie-consent-slide-in .2s ease-in-out;bottom:50px;position:fixed;transition:opacity .2s ease-in-out;z-index:50001}.wp-block-jetpack-cookie-consent:not([role=document]) span{display:none}.wp-block-jetpack-cookie-consent:not([role=document]) .wp-block-button{white-space:nowrap}@keyframes cookie-consent-slide-in{0%{opacity:0}to{opacity:1}}.wp-block-jetpack-cookie-consent:not([role=document]).is-dismissed{opacity:0;pointer-events:none}.wp-block-jetpack-cookie-consent:not([role=document]).alignleft,.wp-block-jetpack-cookie-consent:not([role=document]).alignright{flex-wrap:nowrap;max-width:50%}.wp-block-jetpack-cookie-consent:not([role=document]).alignright{left:10px;margin-right:auto!important}.wp-block-jetpack-cookie-consent:not([role=document]).alignleft{right:10px}.wp-block-jetpack-cookie-consent:not([role=document]).alignwide{max-width:90%!important;right:5%!important;width:100vw!important}.wp-block-jetpack-cookie-consent:not([role=document]).alignfull{width:100%}@media screen and (max-width:768px){.wp-block-jetpack-cookie-consent:not([role=document]).alignleft,.wp-block-jetpack-cookie-consent:not([role=document]).alignright{flex-wrap:wrap;margin-right:0!important;max-width:unset;max-width:90%;right:5%;width:100vw}}
|
||||
Reference in New Issue
Block a user