FEATURE Refining template and allowedblocks
This commit is contained in:
parent
4a234c2e99
commit
f65e1f2088
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => 'dd9698d546fc2950f9df');
|
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '5e9d2c0b3f418fe8c996');
|
||||||
|
|
|
||||||
|
|
@ -203,9 +203,9 @@ function Edit({
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
||||||
allowedBlocks: ["core/paragraph", "core/heading", "core/image"],
|
allowedBlocks: ["core/paragraph", "core/heading", "core/image"],
|
||||||
template: [["core/heading", {
|
template: [["core/heading", {
|
||||||
content: "lorem"
|
content: "Lorem ipsum"
|
||||||
}], ["core/paragraph", {
|
}], ["core/paragraph", {
|
||||||
content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Quia et, impedit asperiores saepe odio, quisquam vero veritatis sint totam dolore sit officia voluptatibus deserunt unde debitis quae consequatur, voluptatem facere exercitationem quaerat error non. ."
|
content: "Lorem ipsum dolor sit amet consectetur adipisicing elit."
|
||||||
}]]
|
}]]
|
||||||
})
|
})
|
||||||
}), shouldShowCoverRight && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_Cover__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
}), shouldShowCoverRight && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_Cover__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
||||||
|
|
@ -254,31 +254,14 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||||
icon: {
|
icon: {
|
||||||
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("svg", {
|
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
|
||||||
width: "32",
|
xmlns: "http://www.w3.org/2000/svg",
|
||||||
height: "32",
|
viewBox: "0 0 24 24",
|
||||||
viewBox: "0 0 32 32",
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("g", {
|
d: "M8,7h8a1,1,0,0,1,1,1v8a1,1,0,0,1-1,1H8a1,1,0,0,1-1-1V8A1,1,0,0,1,8,7Zm3-5V4h2V2Zm7,0H16V4h2ZM6,4H8V2H6ZM2,2V4L4,2ZM22,4V2H20ZM13,22V20H11v2Zm3,0h2V20H16ZM6,22H8V20H6Zm14-9h2V11H20Zm0,5h2V16H20ZM20,8h2V6H20ZM4,11H2v2H4Zm0,5H2v2H4ZM4,6H2V8H4ZM2,20v2H4Zm20,2V20l-2,2Z"
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
})
|
||||||
d: "M21.15,10.59l-9.38,10.02",
|
}),
|
||||||
stroke: "#136f63",
|
foreground: "#136f63"
|
||||||
fill: "none",
|
|
||||||
strokeWidth: "3"
|
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
|
||||||
d: "M21.15,21.4v-10.81h-10.32",
|
|
||||||
stroke: "#136f63",
|
|
||||||
fill: "none",
|
|
||||||
strokeWidth: "3"
|
|
||||||
})]
|
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("circle", {
|
|
||||||
cx: "16",
|
|
||||||
cy: "16",
|
|
||||||
r: "15",
|
|
||||||
stroke: "#136f63",
|
|
||||||
fill: "none",
|
|
||||||
strokeWidth: "3"
|
|
||||||
})]
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||||
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -118,12 +118,12 @@ export default function Edit({ attributes, setAttributes }) {
|
||||||
<InnerBlocks
|
<InnerBlocks
|
||||||
allowedBlocks={["core/paragraph", "core/heading", "core/image"]}
|
allowedBlocks={["core/paragraph", "core/heading", "core/image"]}
|
||||||
template={[
|
template={[
|
||||||
["core/heading", { content: "lorem" }],
|
["core/heading", { content: "Lorem ipsum" }],
|
||||||
[
|
[
|
||||||
"core/paragraph",
|
"core/paragraph",
|
||||||
{
|
{
|
||||||
content:
|
content:
|
||||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Quia et, impedit asperiores saepe odio, quisquam vero veritatis sint totam dolore sit officia voluptatibus deserunt unde debitis quae consequatur, voluptatem facere exercitationem quaerat error non. .",
|
"Lorem ipsum dolor sit amet consectetur adipisicing elit.",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
]}
|
]}
|
||||||
|
|
|
||||||
|
|
@ -8,31 +8,11 @@ import metadata from "./block.json";
|
||||||
registerBlockType(metadata.name, {
|
registerBlockType(metadata.name, {
|
||||||
icon: {
|
icon: {
|
||||||
src: (
|
src: (
|
||||||
<svg width="32" height="32" viewBox="0 0 32 32">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
<g>
|
<path d="M8,7h8a1,1,0,0,1,1,1v8a1,1,0,0,1-1,1H8a1,1,0,0,1-1-1V8A1,1,0,0,1,8,7Zm3-5V4h2V2Zm7,0H16V4h2ZM6,4H8V2H6ZM2,2V4L4,2ZM22,4V2H20ZM13,22V20H11v2Zm3,0h2V20H16ZM6,22H8V20H6Zm14-9h2V11H20Zm0,5h2V16H20ZM20,8h2V6H20ZM4,11H2v2H4Zm0,5H2v2H4ZM4,6H2V8H4ZM2,20v2H4Zm20,2V20l-2,2Z" />
|
||||||
<path
|
|
||||||
d="M21.15,10.59l-9.38,10.02"
|
|
||||||
stroke="#136f63"
|
|
||||||
fill="none"
|
|
||||||
strokeWidth="3"
|
|
||||||
/>
|
|
||||||
<path
|
|
||||||
d="M21.15,21.4v-10.81h-10.32"
|
|
||||||
stroke="#136f63"
|
|
||||||
fill="none"
|
|
||||||
strokeWidth="3"
|
|
||||||
/>
|
|
||||||
</g>
|
|
||||||
<circle
|
|
||||||
cx="16"
|
|
||||||
cy="16"
|
|
||||||
r="15"
|
|
||||||
stroke="#136f63"
|
|
||||||
fill="none"
|
|
||||||
strokeWidth="3"
|
|
||||||
/>
|
|
||||||
</svg>
|
</svg>
|
||||||
),
|
),
|
||||||
|
foreground: "#136f63",
|
||||||
},
|
},
|
||||||
edit: Edit,
|
edit: Edit,
|
||||||
save,
|
save,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user