init
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "jetpack/recipe",
|
||||
"title": "Recipe (Beta)",
|
||||
"description": "Add images, ingredients and cooking steps to display an easy to read recipe.",
|
||||
"keywords": [],
|
||||
"version": "12.5.0",
|
||||
"textdomain": "jetpack",
|
||||
"category": "widgets",
|
||||
"icon": "<svg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path d='M21,5c-1.11-0.35-2.33-0.5-3.5-0.5c-1.95,0-4.05,0.4-5.5,1.5c-1.45-1.1-3.55-1.5-5.5-1.5S2.45,4.9,1,6v14.65 c0,0.25,0.25,0.5,0.5,0.5c0.1,0,0.15-0.05,0.25-0.05C3.1,20.45,5.05,20,6.5,20c1.95,0,4.05,0.4,5.5,1.5c1.35-0.85,3.8-1.5,5.5-1.5 c1.65,0,3.35,0.3,4.75,1.05c0.1,0.05,0.15,0.05,0.25,0.05c0.25,0,0.5-0.25,0.5-0.5V6C22.4,5.55,21.75,5.25,21,5z M21,18.5 c-1.1-0.35-2.3-0.5-3.5-0.5c-1.7,0-4.15,0.65-5.5,1.5V8c1.35-0.85,3.8-1.5,5.5-1.5c1.2,0,2.4,0.15,3.5,0.5V18.5z' /><path d='M17.5,10.5c0.88,0,1.73,0.09,2.5,0.26V9.24C19.21,9.09,18.36,9,17.5,9c-1.7,0-3.24,0.29-4.5,0.83v1.66 C14.13,10.85,15.7,10.5,17.5,10.5z' /><path d='M13,12.49v1.66c1.13-0.64,2.7-0.99,4.5-0.99c0.88,0,1.73,0.09,2.5,0.26V11.9c-0.79-0.15-1.64-0.24-2.5-0.24 C15.8,11.66,14.26,11.96,13,12.49z' /><path d='M17.5,14.33c-1.7,0-3.24,0.29-4.5,0.83v1.66c1.13-0.64,2.7-0.99,4.5-0.99c0.88,0,1.73,0.09,2.5,0.26v-1.52 C19.21,14.41,18.36,14.33,17.5,14.33z' /></svg>",
|
||||
"supports": {
|
||||
"align": [
|
||||
"full",
|
||||
"wide"
|
||||
],
|
||||
"alignWide": true,
|
||||
"anchor": false,
|
||||
"customClassName": true,
|
||||
"className": true,
|
||||
"html": false,
|
||||
"multiple": true,
|
||||
"reusable": true
|
||||
},
|
||||
"attributes": {
|
||||
"ingredients": {
|
||||
"type": "array",
|
||||
"default": []
|
||||
},
|
||||
"steps": {
|
||||
"type": "array",
|
||||
"default": []
|
||||
}
|
||||
},
|
||||
"editorScript": "jetpack-blocks-editor"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('wp-dom-ready', 'wp-polyfill'), 'version' => 'c8230bb7c29b8fc20084');
|
||||
@@ -0,0 +1 @@
|
||||
.wp-block-jetpack-recipe-title.has-background{margin:0}.wp-block-jetpack-recipe-details{align-items:center;display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(max-content,150px));margin-bottom:3rem;margin-top:1.75rem}@media(min-width:782px){.wp-block-jetpack-recipe-details{margin-bottom:6rem}}.wp-block-jetpack-recipe-details.alignright{justify-content:right}.wp-block-jetpack-recipe-details.aligncenter{justify-content:center}.wp-block-jetpack-recipe-details__detail{font-size:.875rem;margin-inline-end:1rem;padding-inline-end:1rem;text-align:center}.wp-block-jetpack-recipe-details__detail:not(:last-child){border-inline-end:1px solid currentColor}.wp-block-jetpack-recipe-details__detail p{margin:0;text-transform:uppercase}.wp-block-jetpack-recipe-details__detail p:first-child{color:#555;font-size:.75rem}.wp-block-jetpack-recipe-step{counter-increment:list;list-style-type:none;padding-bottom:1rem;position:relative}.wp-block-jetpack-recipe-step:before{align-items:center;background-color:var(--step-highlight-color);border-radius:50%;color:var(--step-text-color);content:counter(list);display:flex;font-size:.875rem;height:28px;inset-inline-start:-2.5rem;justify-content:center;line-height:1;position:absolute;text-align:center;width:28px}
|
||||
@@ -0,0 +1 @@
|
||||
(()=>{var e={79366:(e,t,n)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(n.p=window.Jetpack_Block_Assets_Base_Url)},98490:e=>{"use strict";e.exports=window.wp.domReady}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e+"../"})(),(()=>{"use strict";n(79366)})(),(()=>{"use strict";var e=n(98490),t=n.n(e);class r{constructor(e){this.block=e,this.style=document.createElement("style"),this.initRecipePrint()}getPrintBtns(){return this.block.querySelectorAll(".wp-block-jetpack-recipe-details__detail--print .wp-block-button__link")}removeStyles(){window.onfocus=()=>{document.head.contains(this.style)&&document.head.removeChild(this.style)}}initRecipePrint(){this.getPrintBtns().forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.style.id="jetpack-recipe-block-print-style",this.style.innerHTML="\n @media print {\n .wp-site-blocks > header,\n .wp-site-blocks > footer,\n .wp-site-blocks > main > *:not(.wp-block-post-content),\n .wp-site-blocks > main > .wp-block-post-content > *:not(.wp-block-jetpack-recipe),\n .wp-block-jetpack-recipe-details__detail--print {\n display: none;\n }\n \n .wp-block-jetpack-recipe-details {\n display: grid;\n gap: 1rem;\n margin-bottom: 6rem;\n margin-top: 1.75rem;\n grid-template-columns: repeat(auto-fit, minmax(100px, 150px));\n }\n \n .wp-block-jetpack-recipe-details__detail {\n font-size: 0.875rem;\n margin-inline-end: 1rem;\n padding-right: 1rem;\n text-align: center;\n }\n \n .wp-block-jetpack-recipe-details__detail:not(:last-child) {\n border-right: 1px solid currentColor;\n }\n \n .wp-block-jetpack-recipe-details__detail p {\n margin: 0;\n text-transform: uppercase;\n }\n \n .wp-block-jetpack-recipe-details__detail p:first-child {\n font-size: 0.75rem;\n color: #555;\n }\n \n .wp-block-jetpack-recipe-step {\n counter-increment: list;\n list-style-type: none;\n position: relative;\n padding-bottom: 1rem;\n }\n \n .wp-block-jetpack-recipe-step::before {\n align-items: center;\n background-color: var(--step-highlight-color);\n border-radius: 50%;\n color: var(--step-text-color);\n content: counter(list);\n display: flex;\n font-size: 0.875rem;\n height: 28px;\n justify-content: center;\n left: -2.5rem;\n line-height: 1;\n position: absolute;\n text-align: center;\n width: 28px;\n }\n \n .wp-block-jetpack-recipe-step p {\n margin: 0;\n }\n }\n ",document.head.appendChild(this.style),window.print()}))})),this.removeStyles()}}t()((()=>{document.querySelectorAll(".wp-block-jetpack-recipe").forEach((e=>new r(e)))}))})()})();
|
||||
@@ -0,0 +1 @@
|
||||
.wp-block-jetpack-recipe-title.has-background{margin:0}.wp-block-jetpack-recipe-details{align-items:center;display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(max-content,150px));margin-bottom:3rem;margin-top:1.75rem}@media(min-width:782px){.wp-block-jetpack-recipe-details{margin-bottom:6rem}}.wp-block-jetpack-recipe-details.alignright{justify-content:right}.wp-block-jetpack-recipe-details.aligncenter{justify-content:center}.wp-block-jetpack-recipe-details__detail{font-size:.875rem;margin-inline-end:1rem;padding-inline-end:1rem;text-align:center}.wp-block-jetpack-recipe-details__detail:not(:last-child){border-inline-end:1px solid currentColor}.wp-block-jetpack-recipe-details__detail p{margin:0;text-transform:uppercase}.wp-block-jetpack-recipe-details__detail p:first-child{color:#555;font-size:.75rem}.wp-block-jetpack-recipe-step{counter-increment:list;list-style-type:none;padding-bottom:1rem;position:relative}.wp-block-jetpack-recipe-step:before{align-items:center;background-color:var(--step-highlight-color);border-radius:50%;color:var(--step-text-color);content:counter(list);display:flex;font-size:.875rem;height:28px;inset-inline-start:-2.5rem;justify-content:center;line-height:1;position:absolute;text-align:center;width:28px}
|
||||
Reference in New Issue
Block a user