FEATURE Handling carhop-heading as innerblock
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a6045b8bbb
commit
92084f7826
|
|
@ -11,7 +11,7 @@
|
||||||
"supports": {
|
"supports": {
|
||||||
"html": false
|
"html": false
|
||||||
},
|
},
|
||||||
"textdomain": "deliblocks",
|
"textdomain": "carhop-blocks",
|
||||||
"editorScript": "file:./index.js",
|
"editorScript": "file:./index.js",
|
||||||
"editorStyle": "file:./index.css",
|
"editorStyle": "file:./index.css",
|
||||||
"style": "file:./style-index.css",
|
"style": "file:./style-index.css",
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '4d7a8310574bcf753578');
|
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '4148e87939fccf7f9ff3');
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ const trash = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx
|
||||||
\************************/
|
\************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/chapter-section","version":"0.1.0","title":" Section Chapitre","category":"carhop-blocks","icon":"smiley","description":"Example block scaffolded with Create Block tool.","example":{},"supports":{"html":false},"textdomain":"deliblocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php","attributes":{"align":{"type":"string","default":"full"},"coverUrl":{"type":"string"},"coverAlt":{"type":"string"},"coverId":{"type":"number"},"coverSize":{"type":"string","default":"large","enum":["small","medium","grande","large"]},"disposition":{"type":"string","default":"left","enum":["left","right"]},"hasBackgroundColor":{"type":"boolean","default":false},"backgroundColor":{"type":"string","default":"#ffffff"},"backgroundOrientation":{"type":"string","default":"left","enum":["left","right"]}},"usesContext":["postType","postId"]}');
|
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/chapter-section","version":"0.1.0","title":" Section Chapitre","category":"carhop-blocks","icon":"smiley","description":"Example block scaffolded with Create Block tool.","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php","attributes":{"align":{"type":"string","default":"full"},"coverUrl":{"type":"string"},"coverAlt":{"type":"string"},"coverId":{"type":"number"},"coverSize":{"type":"string","default":"large","enum":["small","medium","grande","large"]},"disposition":{"type":"string","default":"left","enum":["left","right"]},"hasBackgroundColor":{"type":"boolean","default":false},"backgroundColor":{"type":"string","default":"#ffffff"},"backgroundOrientation":{"type":"string","default":"left","enum":["left","right"]}},"usesContext":["postType","postId"]}');
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|
@ -238,16 +238,16 @@ function Edit({
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
||||||
className: "chapter-section__innerblocks",
|
className: "chapter-section__innerblocks",
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
||||||
template: [["core/heading", {
|
template: [["carhop-blocks/heading", {
|
||||||
className: "chapter-section__title",
|
innerBlocks: [["core/heading", {
|
||||||
placeholder: "Chapter Title",
|
|
||||||
content: "Un titre précis "
|
content: "Un titre précis "
|
||||||
|
}]]
|
||||||
}], ["core/paragraph", {
|
}], ["core/paragraph", {
|
||||||
className: "chapter-section__title",
|
className: "chapter-section__title",
|
||||||
placeholder: "Chapter Title",
|
placeholder: "Chapter Title",
|
||||||
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue augue, sagittis quis mauris in, consequat vehicula est. Aliquam quis nulla ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras bibendum eget lorem eget aliquet. Fusce vel consequat neque. "
|
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue augue, sagittis quis mauris in, consequat vehicula est. Aliquam quis nulla ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras bibendum eget lorem eget aliquet. Fusce vel consequat neque. "
|
||||||
}]],
|
}]],
|
||||||
allowedBlocks: ["core/heading", "core/paragraph", "core/list", "core/button", "core/buttons", "carhop-blocks/cta"]
|
allowedBlocks: ["core/heading", "core/paragraph", "core/list", "core/button", "core/buttons", "carhop-blocks/cta", "carhop-blocks/heading"]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
|
}), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -179,14 +179,19 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
<div className="chapter-section__innerblocks">
|
<div className="chapter-section__innerblocks">
|
||||||
<InnerBlocks
|
<InnerBlocks
|
||||||
template={[
|
template={[
|
||||||
|
[
|
||||||
|
"carhop-blocks/heading",
|
||||||
|
{
|
||||||
|
innerBlocks: [
|
||||||
[
|
[
|
||||||
"core/heading",
|
"core/heading",
|
||||||
{
|
{
|
||||||
className: "chapter-section__title",
|
|
||||||
placeholder: "Chapter Title",
|
|
||||||
content: "Un titre précis ",
|
content: "Un titre précis ",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
[
|
[
|
||||||
"core/paragraph",
|
"core/paragraph",
|
||||||
{
|
{
|
||||||
|
|
@ -204,6 +209,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
"core/button",
|
"core/button",
|
||||||
"core/buttons",
|
"core/buttons",
|
||||||
"carhop-blocks/cta",
|
"carhop-blocks/cta",
|
||||||
|
"carhop-blocks/heading",
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user