handling block heading level and removing unecessary steps container
This commit is contained in:
parent
5d8b790ac5
commit
561d77080b
|
|
@ -25,6 +25,10 @@
|
||||||
"blockSubtitle": {
|
"blockSubtitle": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"headingLevel": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "h3"
|
||||||
|
},
|
||||||
"hasLateralCover": {
|
"hasLateralCover": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false
|
"default": false
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'c6bad6c3aedf0b4c6ed2');
|
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '2333c23aa22426624bb5');
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,15 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__);
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__);
|
||||||
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/@wordpress/icons/build-module/library/trash.js");
|
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/@wordpress/icons/build-module/library/trash.js");
|
||||||
|
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/@wordpress/icons/build-module/library/heading-level-1.js");
|
||||||
|
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/@wordpress/icons/build-module/library/heading-level-2.js");
|
||||||
|
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/@wordpress/icons/build-module/library/heading-level-3.js");
|
||||||
|
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/@wordpress/icons/build-module/library/heading-level-4.js");
|
||||||
|
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/@wordpress/icons/build-module/library/heading-level-5.js");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// import "./steps-container";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -55,7 +59,8 @@ function Edit({
|
||||||
lateralCoverCaption,
|
lateralCoverCaption,
|
||||||
blockTitle,
|
blockTitle,
|
||||||
blockSubtitle,
|
blockSubtitle,
|
||||||
hasTitle
|
hasTitle,
|
||||||
|
headingLevel
|
||||||
} = attributes;
|
} = attributes;
|
||||||
let children = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_6__.useSelect)(select => select("core/block-editor").getBlocksByClientId(clientId)[0].innerBlocks);
|
let children = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_6__.useSelect)(select => select("core/block-editor").getBlocksByClientId(clientId)[0].innerBlocks);
|
||||||
function onChangeBlockTitle(blockTitle) {
|
function onChangeBlockTitle(blockTitle) {
|
||||||
|
|
@ -68,6 +73,11 @@ function Edit({
|
||||||
blockSubtitle
|
blockSubtitle
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function onChangeHeadingLevel(newHeadingLevel) {
|
||||||
|
setAttributes({
|
||||||
|
headingLevel: newHeadingLevel
|
||||||
|
});
|
||||||
|
}
|
||||||
function onChangeImagesDispositionType(disposition) {
|
function onChangeImagesDispositionType(disposition) {
|
||||||
if (disposition === "hasStepPictures") {
|
if (disposition === "hasStepPictures") {
|
||||||
setAttributes({
|
setAttributes({
|
||||||
|
|
@ -205,7 +215,37 @@ function Edit({
|
||||||
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__["default"],
|
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__["default"],
|
||||||
label: "Supprimer",
|
label: "Supprimer",
|
||||||
onClick: removeLateralCoverAttributes
|
onClick: removeLateralCoverAttributes
|
||||||
}))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
}))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.BlockControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToolbarGroup, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToolbarButton, {
|
||||||
|
isActive: headingLevel === "h1",
|
||||||
|
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"],
|
||||||
|
onClick: () => {
|
||||||
|
onChangeHeadingLevel("h1");
|
||||||
|
}
|
||||||
|
}), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToolbarButton, {
|
||||||
|
isActive: headingLevel === "h2",
|
||||||
|
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"],
|
||||||
|
onClick: () => {
|
||||||
|
onChangeHeadingLevel("h2");
|
||||||
|
}
|
||||||
|
}), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToolbarButton, {
|
||||||
|
isActive: headingLevel === "h3",
|
||||||
|
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__["default"],
|
||||||
|
onClick: () => {
|
||||||
|
onChangeHeadingLevel("h3");
|
||||||
|
}
|
||||||
|
}), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToolbarButton, {
|
||||||
|
isActive: headingLevel === "h4",
|
||||||
|
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_12__["default"],
|
||||||
|
onClick: () => {
|
||||||
|
onChangeHeadingLevel("h4");
|
||||||
|
}
|
||||||
|
}), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToolbarButton, {
|
||||||
|
isActive: headingLevel === "h5",
|
||||||
|
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_13__["default"],
|
||||||
|
onClick: () => {
|
||||||
|
onChangeHeadingLevel("h5");
|
||||||
|
}
|
||||||
|
}))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)({
|
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)({
|
||||||
className: `homegrade-blocks-timeline ${hasStepIcons ? "homegrade-blocks-timeline--has-step-icons" : ""}
|
className: `homegrade-blocks-timeline ${hasStepIcons ? "homegrade-blocks-timeline--has-step-icons" : ""}
|
||||||
${hasLateralCover ? "homegrade-blocks-timeline--has-lateral-cover" : ""}`
|
${hasLateralCover ? "homegrade-blocks-timeline--has-lateral-cover" : ""}`
|
||||||
|
|
@ -214,13 +254,13 @@ function Edit({
|
||||||
className: "section_titling section_titling--center"
|
className: "section_titling section_titling--center"
|
||||||
}, hasTitle && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.RichText, {
|
}, hasTitle && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.RichText, {
|
||||||
value: blockTitle,
|
value: blockTitle,
|
||||||
tagName: "h3",
|
tagName: headingLevel,
|
||||||
className: "section_titling__title",
|
className: "section_titling__title",
|
||||||
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter ici le Titre de la liste de membres", "homegrade"),
|
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter ici le Titre de la liste de membres", "homegrade"),
|
||||||
onChange: onChangeBlockTitle
|
onChange: onChangeBlockTitle
|
||||||
}), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.RichText, {
|
}), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.RichText, {
|
||||||
value: blockSubtitle,
|
value: blockSubtitle,
|
||||||
tagName: "h4",
|
tagName: "p",
|
||||||
className: "section_titling__subtitle",
|
className: "section_titling__subtitle",
|
||||||
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter ici le Sous-titre de la liste de membres", "homegrade"),
|
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter ici le Sous-titre de la liste de membres", "homegrade"),
|
||||||
onChange: onChangeBlockSubtitle
|
onChange: onChangeBlockSubtitle
|
||||||
|
|
@ -334,7 +374,8 @@ function save({
|
||||||
lateralCoverUrl,
|
lateralCoverUrl,
|
||||||
lateralCoverAlt,
|
lateralCoverAlt,
|
||||||
lateralCoverCaption,
|
lateralCoverCaption,
|
||||||
lateralCoverDescription
|
lateralCoverDescription,
|
||||||
|
headingLevel
|
||||||
} = attributes;
|
} = attributes;
|
||||||
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
|
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
|
||||||
|
|
@ -345,11 +386,11 @@ function save({
|
||||||
className: "section_titling section_titling--center"
|
className: "section_titling section_titling--center"
|
||||||
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, {
|
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, {
|
||||||
value: blockTitle,
|
value: blockTitle,
|
||||||
tagName: "h3",
|
tagName: headingLevel,
|
||||||
className: "section_titling__title"
|
className: "section_titling__title"
|
||||||
}), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, {
|
}), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, {
|
||||||
value: blockSubtitle,
|
value: blockSubtitle,
|
||||||
tagName: "h4",
|
tagName: "p",
|
||||||
className: "section_titling__subtitle"
|
className: "section_titling__subtitle"
|
||||||
})), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
})), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||||
className: "homegrade-blocks-timeline__container"
|
className: "homegrade-blocks-timeline__container"
|
||||||
|
|
@ -742,6 +783,161 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
// extracted by mini-css-extract-plugin
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "../../node_modules/@wordpress/icons/build-module/library/heading-level-1.js":
|
||||||
|
/*!***********************************************************************************!*\
|
||||||
|
!*** ../../node_modules/@wordpress/icons/build-module/library/heading-level-1.js ***!
|
||||||
|
\***********************************************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||||
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
|
||||||
|
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress dependencies
|
||||||
|
*/
|
||||||
|
|
||||||
|
const headingLevel1 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
|
||||||
|
xmlns: "http://www.w3.org/2000/svg",
|
||||||
|
viewBox: "0 0 24 24"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
|
||||||
|
d: "M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"
|
||||||
|
}));
|
||||||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (headingLevel1);
|
||||||
|
//# sourceMappingURL=heading-level-1.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "../../node_modules/@wordpress/icons/build-module/library/heading-level-2.js":
|
||||||
|
/*!***********************************************************************************!*\
|
||||||
|
!*** ../../node_modules/@wordpress/icons/build-module/library/heading-level-2.js ***!
|
||||||
|
\***********************************************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||||
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
|
||||||
|
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress dependencies
|
||||||
|
*/
|
||||||
|
|
||||||
|
const headingLevel2 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
|
||||||
|
xmlns: "http://www.w3.org/2000/svg",
|
||||||
|
viewBox: "0 0 24 24"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
|
||||||
|
d: "M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"
|
||||||
|
}));
|
||||||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (headingLevel2);
|
||||||
|
//# sourceMappingURL=heading-level-2.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "../../node_modules/@wordpress/icons/build-module/library/heading-level-3.js":
|
||||||
|
/*!***********************************************************************************!*\
|
||||||
|
!*** ../../node_modules/@wordpress/icons/build-module/library/heading-level-3.js ***!
|
||||||
|
\***********************************************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||||
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
|
||||||
|
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress dependencies
|
||||||
|
*/
|
||||||
|
|
||||||
|
const headingLevel3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
|
||||||
|
xmlns: "http://www.w3.org/2000/svg",
|
||||||
|
viewBox: "0 0 24 24"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
|
||||||
|
d: "M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"
|
||||||
|
}));
|
||||||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (headingLevel3);
|
||||||
|
//# sourceMappingURL=heading-level-3.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "../../node_modules/@wordpress/icons/build-module/library/heading-level-4.js":
|
||||||
|
/*!***********************************************************************************!*\
|
||||||
|
!*** ../../node_modules/@wordpress/icons/build-module/library/heading-level-4.js ***!
|
||||||
|
\***********************************************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||||
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
|
||||||
|
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress dependencies
|
||||||
|
*/
|
||||||
|
|
||||||
|
const headingLevel4 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
|
||||||
|
xmlns: "http://www.w3.org/2000/svg",
|
||||||
|
viewBox: "0 0 24 24"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
|
||||||
|
d: "M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"
|
||||||
|
}));
|
||||||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (headingLevel4);
|
||||||
|
//# sourceMappingURL=heading-level-4.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "../../node_modules/@wordpress/icons/build-module/library/heading-level-5.js":
|
||||||
|
/*!***********************************************************************************!*\
|
||||||
|
!*** ../../node_modules/@wordpress/icons/build-module/library/heading-level-5.js ***!
|
||||||
|
\***********************************************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||||
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
|
||||||
|
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress dependencies
|
||||||
|
*/
|
||||||
|
|
||||||
|
const headingLevel5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
|
||||||
|
xmlns: "http://www.w3.org/2000/svg",
|
||||||
|
viewBox: "0 0 24 24"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
|
||||||
|
d: "M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"
|
||||||
|
}));
|
||||||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (headingLevel5);
|
||||||
|
//# sourceMappingURL=heading-level-5.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "../../node_modules/@wordpress/icons/build-module/library/trash.js":
|
/***/ "../../node_modules/@wordpress/icons/build-module/library/trash.js":
|
||||||
|
|
@ -861,7 +1057,7 @@ module.exports = window["wp"]["primitives"];
|
||||||
\************************/
|
\************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/timeline","version":"0.1.0","title":"Timeline","category":"homegrade-blocks","description":"Pour la création de timeline","supports":{"html":false,"anchor":true},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"hasTitle":{"type":"boolean","default":true},"blockTitle":{"type":"string"},"blockSubtitle":{"type":"string"},"hasLateralCover":{"type":"boolean","default":false},"lateralCoverId":{"type":"number"},"lateralCoverUrl":{"type":"string"},"lateralCoverAlt":{"type":"string"},"lateralCoverCaption":{"type":"string"},"lateralCoverDescription":{"type":"string"},"hasStepPictures":{"type":"boolean","default":true},"hasStepIcons":{"type":"boolean","default":true},"lateralPicturesFormat":{"type":"string","default":"md"}}}');
|
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/timeline","version":"0.1.0","title":"Timeline","category":"homegrade-blocks","description":"Pour la création de timeline","supports":{"html":false,"anchor":true},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"hasTitle":{"type":"boolean","default":true},"blockTitle":{"type":"string"},"blockSubtitle":{"type":"string"},"headingLevel":{"type":"string","default":"h3"},"hasLateralCover":{"type":"boolean","default":false},"lateralCoverId":{"type":"number"},"lateralCoverUrl":{"type":"string"},"lateralCoverAlt":{"type":"string"},"lateralCoverCaption":{"type":"string"},"lateralCoverDescription":{"type":"string"},"hasStepPictures":{"type":"boolean","default":true},"hasStepIcons":{"type":"boolean","default":true},"lateralPicturesFormat":{"type":"string","default":"md"}}}');
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
||||||
"apiVersion": 2,
|
|
||||||
"name": "homegrade-content-blocks/timeline-steps-container",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"title": "Étapes",
|
|
||||||
"category": "homegrade-blocks",
|
|
||||||
"description": "steps container",
|
|
||||||
"supports": {
|
|
||||||
"html": false
|
|
||||||
},
|
|
||||||
"editorScript": "file:./index.js",
|
|
||||||
"editorStyle": "file:./index.css",
|
|
||||||
"style": "file:./style-index.css"
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'af247c1823c8cce54eca');
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
||||||
!*** css ./node_modules/.pnpm/css-loader@6.10.0_webpack@5.90.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.4.35_webpack@5.90.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@12.6.0_sass@1.71.1_webpack@5.90.3/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/steps-container/editor.scss ***!
|
|
||||||
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
||||||
|
|
||||||
|
|
@ -1,357 +0,0 @@
|
||||||
/******/ (() => { // webpackBootstrap
|
|
||||||
/******/ "use strict";
|
|
||||||
/******/ var __webpack_modules__ = ({
|
|
||||||
|
|
||||||
/***/ "./src/steps-container/edit.js":
|
|
||||||
/*!*************************************!*\
|
|
||||||
!*** ./src/steps-container/edit.js ***!
|
|
||||||
\*************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
|
||||||
/* harmony export */ });
|
|
||||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
||||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
||||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
|
||||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
|
|
||||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/steps-container/editor.scss");
|
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function Edit() {
|
|
||||||
let {
|
|
||||||
hasStepIcons,
|
|
||||||
hasLateralCover
|
|
||||||
} = attributes;
|
|
||||||
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
|
||||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({
|
|
||||||
className: `homegrade-blocks-timeline__steps-container`
|
|
||||||
})
|
|
||||||
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
|
|
||||||
allowedBlocks: ["homegrade-content-blocks/timeline-step"],
|
|
||||||
template: [["homegrade-content-blocks/timeline-step", {
|
|
||||||
tipTitle: "Astuce 1"
|
|
||||||
}], ["homegrade-content-blocks/timeline-step", {
|
|
||||||
tipTitle: "Astuce 2"
|
|
||||||
}]],
|
|
||||||
templateLock: false
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "./src/steps-container/index.js":
|
|
||||||
/*!**************************************!*\
|
|
||||||
!*** ./src/steps-container/index.js ***!
|
|
||||||
\**************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
||||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
||||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
|
||||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
|
|
||||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ "./src/steps-container/style.scss");
|
|
||||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/steps-container/block.json");
|
|
||||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./edit */ "./src/steps-container/edit.js");
|
|
||||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./save */ "./src/steps-container/save.js");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_3__.name, {
|
|
||||||
title: _block_json__WEBPACK_IMPORTED_MODULE_3__.title,
|
|
||||||
icon: {
|
|
||||||
foreground: "#DF1E1E",
|
|
||||||
src: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
|
|
||||||
viewBox: "0 0 73.9 90"
|
|
||||||
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
|
|
||||||
id: "Calque_1-2",
|
|
||||||
"data-name": "Calque 1"
|
|
||||||
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
|
||||||
class: "cls-1",
|
|
||||||
d: "m4.1,19.22v17.13c.64-.23,1.33-.35,2.05-.35s1.41.13,2.05.35v-17.12c-.64.23-1.33.35-2.05.35s-1.41-.12-2.05-.35Zm0-2.6c.64.23,1.33.35,2.05.35s1.41-.12,2.05-.35c2.39-.85,4.1-3.12,4.1-5.81s-1.71-4.96-4.1-5.81c-.64-.23-1.33-.35-2.05-.35s-1.41.12-2.05.35C1.71,5.85,0,8.13,0,10.81s1.71,4.96,4.1,5.81ZM8.21,2.41V0h-4.11v2.41c.64-.23,1.33-.35,2.05-.35.72,0,1.41.12,2.05.35Zm17.24,17.44c.82.82,1.85,1.23,2.87,1.23h29.15c1.23,0,2.05-.82,2.05-2.05V2.6c0-1.23-.82-2.05-2.05-2.05h-29.15c-1.02,0-2.05.41-2.87,1.23l-7.59,7.6c-.82.82-.82,2.05,0,2.87l7.59,7.6ZM4.11,87.6v2.4h4.11v-2.4c-.64.23-1.33.35-2.05.35-.72,0-1.41-.12-2.05-.35Zm4.11-14.21c-.64-.23-1.33-.35-2.05-.35s-1.41.12-2.05.35C1.71,74.23,0,76.51,0,79.19s1.71,4.96,4.1,5.81c.64.23,1.33.35,2.05.35s1.41-.12,2.05-.35c2.39-.85,4.1-3.13,4.1-5.81s-1.71-4.96-4.1-5.81Zm47.21-4.46h-27.1c-1.02,0-2.05.41-2.87,1.23l-7.59,7.6c-.82.82-.82,2.05,0,2.87l7.59,7.6c.82.82,1.85,1.23,2.87,1.23h27.1c1.23,0,2.05-.82,2.05-2.05v-16.42c0-1.23-.82-2.05-2.05-2.05Zm16.42-34.44H28.33c-1.02,0-2.05.41-2.87,1.23l-7.59,7.59c-.82.82-.82,2.05,0,2.87l7.59,7.6c.82.82,1.85,1.23,2.87,1.23h43.52c1.23,0,2.05-.82,2.05-2.05v-16.42c0-1.23-.82-2.05-2.05-2.05Zm-63.63,4.46c-.64-.23-1.33-.35-2.05-.35-.72,0-1.41.13-2.05.35C1.71,39.79,0,42.07,0,44.75s1.71,4.96,4.1,5.81c.64.23,1.33.35,2.05.35s1.41-.13,2.05-.35c2.39-.85,4.1-3.12,4.1-5.81s-1.71-4.96-4.1-5.81Zm0,31.84v-17.12c-.64.23-1.33.35-2.05.35s-1.41-.13-2.05-.35v17.12c.64-.23,1.33-.35,2.05-.35s1.41.12,2.05.35Z"
|
|
||||||
})))
|
|
||||||
},
|
|
||||||
supports: _block_json__WEBPACK_IMPORTED_MODULE_3__.supports,
|
|
||||||
attributes: _block_json__WEBPACK_IMPORTED_MODULE_3__.attributes,
|
|
||||||
edit: _edit__WEBPACK_IMPORTED_MODULE_4__["default"],
|
|
||||||
save: _save__WEBPACK_IMPORTED_MODULE_5__["default"]
|
|
||||||
});
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "./src/steps-container/save.js":
|
|
||||||
/*!*************************************!*\
|
|
||||||
!*** ./src/steps-container/save.js ***!
|
|
||||||
\*************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "default": () => (/* binding */ save)
|
|
||||||
/* harmony export */ });
|
|
||||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
||||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
|
||||||
|
|
||||||
|
|
||||||
function save() {
|
|
||||||
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
|
||||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
|
|
||||||
className: `homegrade-blocks-timeline__steps-container`
|
|
||||||
})
|
|
||||||
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null));
|
|
||||||
}
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "./src/steps-container/editor.scss":
|
|
||||||
/*!*****************************************!*\
|
|
||||||
!*** ./src/steps-container/editor.scss ***!
|
|
||||||
\*****************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
// extracted by mini-css-extract-plugin
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "./src/steps-container/style.scss":
|
|
||||||
/*!****************************************!*\
|
|
||||||
!*** ./src/steps-container/style.scss ***!
|
|
||||||
\****************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
// extracted by mini-css-extract-plugin
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "react":
|
|
||||||
/*!************************!*\
|
|
||||||
!*** external "React" ***!
|
|
||||||
\************************/
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
module.exports = window["React"];
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "@wordpress/block-editor":
|
|
||||||
/*!*************************************!*\
|
|
||||||
!*** external ["wp","blockEditor"] ***!
|
|
||||||
\*************************************/
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
module.exports = window["wp"]["blockEditor"];
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "@wordpress/blocks":
|
|
||||||
/*!********************************!*\
|
|
||||||
!*** external ["wp","blocks"] ***!
|
|
||||||
\********************************/
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
module.exports = window["wp"]["blocks"];
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "@wordpress/i18n":
|
|
||||||
/*!******************************!*\
|
|
||||||
!*** external ["wp","i18n"] ***!
|
|
||||||
\******************************/
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
module.exports = window["wp"]["i18n"];
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "./src/steps-container/block.json":
|
|
||||||
/*!****************************************!*\
|
|
||||||
!*** ./src/steps-container/block.json ***!
|
|
||||||
\****************************************/
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/timeline-steps-container","version":"0.1.0","title":"Étapes","category":"homegrade-blocks","description":"steps container","supports":{"html":false},"editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
/******/ });
|
|
||||||
/************************************************************************/
|
|
||||||
/******/ // The module cache
|
|
||||||
/******/ var __webpack_module_cache__ = {};
|
|
||||||
/******/
|
|
||||||
/******/ // The require function
|
|
||||||
/******/ function __webpack_require__(moduleId) {
|
|
||||||
/******/ // Check if module is in cache
|
|
||||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
||||||
/******/ if (cachedModule !== undefined) {
|
|
||||||
/******/ return cachedModule.exports;
|
|
||||||
/******/ }
|
|
||||||
/******/ // Create a new module (and put it into the cache)
|
|
||||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
||||||
/******/ // no module.id needed
|
|
||||||
/******/ // no module.loaded needed
|
|
||||||
/******/ exports: {}
|
|
||||||
/******/ };
|
|
||||||
/******/
|
|
||||||
/******/ // Execute the module function
|
|
||||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
||||||
/******/
|
|
||||||
/******/ // Return the exports of the module
|
|
||||||
/******/ return module.exports;
|
|
||||||
/******/ }
|
|
||||||
/******/
|
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
|
||||||
/******/ __webpack_require__.m = __webpack_modules__;
|
|
||||||
/******/
|
|
||||||
/************************************************************************/
|
|
||||||
/******/ /* webpack/runtime/chunk loaded */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ var deferred = [];
|
|
||||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
|
||||||
/******/ if(chunkIds) {
|
|
||||||
/******/ priority = priority || 0;
|
|
||||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
|
||||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
|
||||||
/******/ return;
|
|
||||||
/******/ }
|
|
||||||
/******/ var notFulfilled = Infinity;
|
|
||||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
|
||||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
|
||||||
/******/ var fulfilled = true;
|
|
||||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
|
||||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
|
||||||
/******/ chunkIds.splice(j--, 1);
|
|
||||||
/******/ } else {
|
|
||||||
/******/ fulfilled = false;
|
|
||||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
|
||||||
/******/ }
|
|
||||||
/******/ }
|
|
||||||
/******/ if(fulfilled) {
|
|
||||||
/******/ deferred.splice(i--, 1)
|
|
||||||
/******/ var r = fn();
|
|
||||||
/******/ if (r !== undefined) result = r;
|
|
||||||
/******/ }
|
|
||||||
/******/ }
|
|
||||||
/******/ return result;
|
|
||||||
/******/ };
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/compat get default export */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
||||||
/******/ __webpack_require__.n = (module) => {
|
|
||||||
/******/ var getter = module && module.__esModule ?
|
|
||||||
/******/ () => (module['default']) :
|
|
||||||
/******/ () => (module);
|
|
||||||
/******/ __webpack_require__.d(getter, { a: getter });
|
|
||||||
/******/ return getter;
|
|
||||||
/******/ };
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/define property getters */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ // define getter functions for harmony exports
|
|
||||||
/******/ __webpack_require__.d = (exports, definition) => {
|
|
||||||
/******/ for(var key in definition) {
|
|
||||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
||||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
||||||
/******/ }
|
|
||||||
/******/ }
|
|
||||||
/******/ };
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/make namespace object */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ // define __esModule on exports
|
|
||||||
/******/ __webpack_require__.r = (exports) => {
|
|
||||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
||||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
||||||
/******/ }
|
|
||||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
||||||
/******/ };
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ // no baseURI
|
|
||||||
/******/
|
|
||||||
/******/ // object to store loaded and loading chunks
|
|
||||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
||||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
||||||
/******/ var installedChunks = {
|
|
||||||
/******/ "steps-container/index": 0,
|
|
||||||
/******/ "steps-container/style-index": 0
|
|
||||||
/******/ };
|
|
||||||
/******/
|
|
||||||
/******/ // no chunk on demand loading
|
|
||||||
/******/
|
|
||||||
/******/ // no prefetching
|
|
||||||
/******/
|
|
||||||
/******/ // no preloaded
|
|
||||||
/******/
|
|
||||||
/******/ // no HMR
|
|
||||||
/******/
|
|
||||||
/******/ // no HMR manifest
|
|
||||||
/******/
|
|
||||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
|
||||||
/******/
|
|
||||||
/******/ // install a JSONP callback for chunk loading
|
|
||||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
||||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
|
||||||
/******/ // add "moreModules" to the modules object,
|
|
||||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
||||||
/******/ var moduleId, chunkId, i = 0;
|
|
||||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
|
||||||
/******/ for(moduleId in moreModules) {
|
|
||||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
||||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
||||||
/******/ }
|
|
||||||
/******/ }
|
|
||||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
|
||||||
/******/ }
|
|
||||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
||||||
/******/ for(;i < chunkIds.length; i++) {
|
|
||||||
/******/ chunkId = chunkIds[i];
|
|
||||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
||||||
/******/ installedChunks[chunkId][0]();
|
|
||||||
/******/ }
|
|
||||||
/******/ installedChunks[chunkId] = 0;
|
|
||||||
/******/ }
|
|
||||||
/******/ return __webpack_require__.O(result);
|
|
||||||
/******/ }
|
|
||||||
/******/
|
|
||||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkmultiblocks"] = globalThis["webpackChunkmultiblocks"] || [];
|
|
||||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
||||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/************************************************************************/
|
|
||||||
/******/
|
|
||||||
/******/ // startup
|
|
||||||
/******/ // Load entry module and return exports
|
|
||||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
|
||||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["steps-container/style-index"], () => (__webpack_require__("./src/steps-container/index.js")))
|
|
||||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
|
||||||
/******/
|
|
||||||
/******/ })()
|
|
||||||
;
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +0,0 @@
|
||||||
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
||||||
!*** css ./node_modules/.pnpm/css-loader@6.10.0_webpack@5.90.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.4.35_webpack@5.90.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@12.6.0_sass@1.71.1_webpack@5.90.3/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/steps-container/style.scss ***!
|
|
||||||
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
||||||
|
|
||||||
|
|
@ -25,6 +25,10 @@
|
||||||
"blockSubtitle": {
|
"blockSubtitle": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"headingLevel": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "h3"
|
||||||
|
},
|
||||||
"hasLateralCover": {
|
"hasLateralCover": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false
|
"default": false
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import { __ } from "@wordpress/i18n";
|
import { __ } from "@wordpress/i18n";
|
||||||
import "./editor.scss";
|
import "./editor.scss";
|
||||||
import "./timeline-step";
|
import "./timeline-step";
|
||||||
// import "./steps-container";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
useBlockProps,
|
useBlockProps,
|
||||||
|
|
@ -10,6 +9,7 @@ import {
|
||||||
InspectorControls,
|
InspectorControls,
|
||||||
MediaReplaceFlow,
|
MediaReplaceFlow,
|
||||||
MediaPlaceholder,
|
MediaPlaceholder,
|
||||||
|
BlockControls,
|
||||||
} from "@wordpress/block-editor";
|
} from "@wordpress/block-editor";
|
||||||
|
|
||||||
import { useEffect } from "@wordpress/element";
|
import { useEffect } from "@wordpress/element";
|
||||||
|
|
@ -20,10 +20,19 @@ import {
|
||||||
Button,
|
Button,
|
||||||
RadioControl,
|
RadioControl,
|
||||||
ToggleControl,
|
ToggleControl,
|
||||||
|
ToolbarGroup,
|
||||||
|
ToolbarButton,
|
||||||
__experimentalToggleGroupControl as ToggleGroupControl,
|
__experimentalToggleGroupControl as ToggleGroupControl,
|
||||||
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
|
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
|
||||||
} from "@wordpress/components";
|
} from "@wordpress/components";
|
||||||
import { trash } from "@wordpress/icons";
|
import { trash } from "@wordpress/icons";
|
||||||
|
import {
|
||||||
|
headingLevel1,
|
||||||
|
headingLevel2,
|
||||||
|
headingLevel3,
|
||||||
|
headingLevel4,
|
||||||
|
headingLevel5,
|
||||||
|
} from "@wordpress/icons";
|
||||||
|
|
||||||
export default function Edit({ attributes, setAttributes, clientId }) {
|
export default function Edit({ attributes, setAttributes, clientId }) {
|
||||||
let {
|
let {
|
||||||
|
|
@ -39,11 +48,12 @@ export default function Edit({ attributes, setAttributes, clientId }) {
|
||||||
blockTitle,
|
blockTitle,
|
||||||
blockSubtitle,
|
blockSubtitle,
|
||||||
hasTitle,
|
hasTitle,
|
||||||
|
headingLevel,
|
||||||
} = attributes;
|
} = attributes;
|
||||||
|
|
||||||
let children = useSelect(
|
let children = useSelect(
|
||||||
(select) =>
|
(select) =>
|
||||||
select("core/block-editor").getBlocksByClientId(clientId)[0].innerBlocks
|
select("core/block-editor").getBlocksByClientId(clientId)[0].innerBlocks,
|
||||||
);
|
);
|
||||||
|
|
||||||
function onChangeBlockTitle(blockTitle) {
|
function onChangeBlockTitle(blockTitle) {
|
||||||
|
|
@ -52,6 +62,9 @@ export default function Edit({ attributes, setAttributes, clientId }) {
|
||||||
function onChangeBlockSubtitle(blockSubtitle) {
|
function onChangeBlockSubtitle(blockSubtitle) {
|
||||||
setAttributes({ blockSubtitle });
|
setAttributes({ blockSubtitle });
|
||||||
}
|
}
|
||||||
|
function onChangeHeadingLevel(newHeadingLevel) {
|
||||||
|
setAttributes({ headingLevel: newHeadingLevel });
|
||||||
|
}
|
||||||
|
|
||||||
function onChangeImagesDispositionType(disposition) {
|
function onChangeImagesDispositionType(disposition) {
|
||||||
if (disposition === "hasStepPictures") {
|
if (disposition === "hasStepPictures") {
|
||||||
|
|
@ -227,6 +240,45 @@ export default function Edit({ attributes, setAttributes, clientId }) {
|
||||||
)}
|
)}
|
||||||
</PanelBody>
|
</PanelBody>
|
||||||
</InspectorControls>
|
</InspectorControls>
|
||||||
|
<BlockControls>
|
||||||
|
<ToolbarGroup>
|
||||||
|
<ToolbarButton
|
||||||
|
isActive={headingLevel === "h1"}
|
||||||
|
icon={headingLevel1}
|
||||||
|
onClick={() => {
|
||||||
|
onChangeHeadingLevel("h1");
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ToolbarButton
|
||||||
|
isActive={headingLevel === "h2"}
|
||||||
|
icon={headingLevel2}
|
||||||
|
onClick={() => {
|
||||||
|
onChangeHeadingLevel("h2");
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ToolbarButton
|
||||||
|
isActive={headingLevel === "h3"}
|
||||||
|
icon={headingLevel3}
|
||||||
|
onClick={() => {
|
||||||
|
onChangeHeadingLevel("h3");
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ToolbarButton
|
||||||
|
isActive={headingLevel === "h4"}
|
||||||
|
icon={headingLevel4}
|
||||||
|
onClick={() => {
|
||||||
|
onChangeHeadingLevel("h4");
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ToolbarButton
|
||||||
|
isActive={headingLevel === "h5"}
|
||||||
|
icon={headingLevel5}
|
||||||
|
onClick={() => {
|
||||||
|
onChangeHeadingLevel("h5");
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</ToolbarGroup>
|
||||||
|
</BlockControls>
|
||||||
<section
|
<section
|
||||||
{...useBlockProps({
|
{...useBlockProps({
|
||||||
className: `homegrade-blocks-timeline ${
|
className: `homegrade-blocks-timeline ${
|
||||||
|
|
@ -240,21 +292,21 @@ export default function Edit({ attributes, setAttributes, clientId }) {
|
||||||
<>
|
<>
|
||||||
<RichText
|
<RichText
|
||||||
value={blockTitle}
|
value={blockTitle}
|
||||||
tagName="h3"
|
tagName={headingLevel}
|
||||||
className="section_titling__title"
|
className="section_titling__title"
|
||||||
placeholder={__(
|
placeholder={__(
|
||||||
"Ajouter ici le Titre de la liste de membres",
|
"Ajouter ici le Titre de la liste de membres",
|
||||||
"homegrade"
|
"homegrade",
|
||||||
)}
|
)}
|
||||||
onChange={onChangeBlockTitle}
|
onChange={onChangeBlockTitle}
|
||||||
/>
|
/>
|
||||||
<RichText
|
<RichText
|
||||||
value={blockSubtitle}
|
value={blockSubtitle}
|
||||||
tagName="h4"
|
tagName="p"
|
||||||
className="section_titling__subtitle"
|
className="section_titling__subtitle"
|
||||||
placeholder={__(
|
placeholder={__(
|
||||||
"Ajouter ici le Sous-titre de la liste de membres",
|
"Ajouter ici le Sous-titre de la liste de membres",
|
||||||
"homegrade"
|
"homegrade",
|
||||||
)}
|
)}
|
||||||
onChange={onChangeBlockSubtitle}
|
onChange={onChangeBlockSubtitle}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ export default function save({ attributes }) {
|
||||||
lateralCoverAlt,
|
lateralCoverAlt,
|
||||||
lateralCoverCaption,
|
lateralCoverCaption,
|
||||||
lateralCoverDescription,
|
lateralCoverDescription,
|
||||||
|
headingLevel,
|
||||||
} = attributes;
|
} = attributes;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -32,12 +33,12 @@ export default function save({ attributes }) {
|
||||||
<div className="section_titling section_titling--center">
|
<div className="section_titling section_titling--center">
|
||||||
<RichText.Content
|
<RichText.Content
|
||||||
value={blockTitle}
|
value={blockTitle}
|
||||||
tagName="h3"
|
tagName={headingLevel}
|
||||||
className="section_titling__title"
|
className="section_titling__title"
|
||||||
/>
|
/>
|
||||||
<RichText.Content
|
<RichText.Content
|
||||||
value={blockSubtitle}
|
value={blockSubtitle}
|
||||||
tagName="h4"
|
tagName="p"
|
||||||
className="section_titling__subtitle"
|
className="section_titling__subtitle"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
||||||
"apiVersion": 2,
|
|
||||||
"name": "homegrade-content-blocks/timeline-steps-container",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"title": "Étapes",
|
|
||||||
"category": "homegrade-blocks",
|
|
||||||
"description": "steps container",
|
|
||||||
"supports": {
|
|
||||||
"html": false
|
|
||||||
},
|
|
||||||
"editorScript": "file:./index.js",
|
|
||||||
"editorStyle": "file:./index.css",
|
|
||||||
"style": "file:./style-index.css"
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
import { __ } from "@wordpress/i18n";
|
|
||||||
import "./editor.scss";
|
|
||||||
|
|
||||||
import { useBlockProps, InnerBlocks } from "@wordpress/block-editor";
|
|
||||||
export default function Edit() {
|
|
||||||
let { hasStepIcons, hasLateralCover } = attributes;
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
{...useBlockProps({
|
|
||||||
className: `homegrade-blocks-timeline__steps-container`,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
<InnerBlocks
|
|
||||||
allowedBlocks={["homegrade-content-blocks/timeline-step"]}
|
|
||||||
template={[
|
|
||||||
["homegrade-content-blocks/timeline-step", { tipTitle: "Astuce 1" }],
|
|
||||||
["homegrade-content-blocks/timeline-step", { tipTitle: "Astuce 2" }],
|
|
||||||
]}
|
|
||||||
templateLock={false}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
// HANDLED BY PARENT BLOCK
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
import { registerBlockType } from "@wordpress/blocks";
|
|
||||||
import "./style.scss";
|
|
||||||
import metadata from "./block.json";
|
|
||||||
|
|
||||||
import Edit from "./edit";
|
|
||||||
import Save from "./save";
|
|
||||||
|
|
||||||
registerBlockType(metadata.name, {
|
|
||||||
title: metadata.title,
|
|
||||||
icon: {
|
|
||||||
foreground: "#DF1E1E",
|
|
||||||
src: (
|
|
||||||
<svg viewBox="0 0 73.9 90">
|
|
||||||
<g id="Calque_1-2" data-name="Calque 1">
|
|
||||||
<path
|
|
||||||
class="cls-1"
|
|
||||||
d="m4.1,19.22v17.13c.64-.23,1.33-.35,2.05-.35s1.41.13,2.05.35v-17.12c-.64.23-1.33.35-2.05.35s-1.41-.12-2.05-.35Zm0-2.6c.64.23,1.33.35,2.05.35s1.41-.12,2.05-.35c2.39-.85,4.1-3.12,4.1-5.81s-1.71-4.96-4.1-5.81c-.64-.23-1.33-.35-2.05-.35s-1.41.12-2.05.35C1.71,5.85,0,8.13,0,10.81s1.71,4.96,4.1,5.81ZM8.21,2.41V0h-4.11v2.41c.64-.23,1.33-.35,2.05-.35.72,0,1.41.12,2.05.35Zm17.24,17.44c.82.82,1.85,1.23,2.87,1.23h29.15c1.23,0,2.05-.82,2.05-2.05V2.6c0-1.23-.82-2.05-2.05-2.05h-29.15c-1.02,0-2.05.41-2.87,1.23l-7.59,7.6c-.82.82-.82,2.05,0,2.87l7.59,7.6ZM4.11,87.6v2.4h4.11v-2.4c-.64.23-1.33.35-2.05.35-.72,0-1.41-.12-2.05-.35Zm4.11-14.21c-.64-.23-1.33-.35-2.05-.35s-1.41.12-2.05.35C1.71,74.23,0,76.51,0,79.19s1.71,4.96,4.1,5.81c.64.23,1.33.35,2.05.35s1.41-.12,2.05-.35c2.39-.85,4.1-3.13,4.1-5.81s-1.71-4.96-4.1-5.81Zm47.21-4.46h-27.1c-1.02,0-2.05.41-2.87,1.23l-7.59,7.6c-.82.82-.82,2.05,0,2.87l7.59,7.6c.82.82,1.85,1.23,2.87,1.23h27.1c1.23,0,2.05-.82,2.05-2.05v-16.42c0-1.23-.82-2.05-2.05-2.05Zm16.42-34.44H28.33c-1.02,0-2.05.41-2.87,1.23l-7.59,7.59c-.82.82-.82,2.05,0,2.87l7.59,7.6c.82.82,1.85,1.23,2.87,1.23h43.52c1.23,0,2.05-.82,2.05-2.05v-16.42c0-1.23-.82-2.05-2.05-2.05Zm-63.63,4.46c-.64-.23-1.33-.35-2.05-.35-.72,0-1.41.13-2.05.35C1.71,39.79,0,42.07,0,44.75s1.71,4.96,4.1,5.81c.64.23,1.33.35,2.05.35s1.41-.13,2.05-.35c2.39-.85,4.1-3.12,4.1-5.81s-1.71-4.96-4.1-5.81Zm0,31.84v-17.12c-.64.23-1.33.35-2.05.35s-1.41-.13-2.05-.35v17.12c.64-.23,1.33-.35,2.05-.35s1.41.12,2.05.35Z"
|
|
||||||
/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
|
|
||||||
supports: metadata.supports,
|
|
||||||
attributes: metadata.attributes,
|
|
||||||
edit: Edit,
|
|
||||||
save: Save,
|
|
||||||
});
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
|
|
||||||
|
|
||||||
export default function save() {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
{...useBlockProps.save({
|
|
||||||
className: `homegrade-blocks-timeline__steps-container`,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
<InnerBlocks.Content />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
// HANDLED BY PARENT BLOCK
|
|
||||||
Loading…
Reference in New Issue
Block a user