Handling title block
This commit is contained in:
parent
53c62ba8e6
commit
9a341f50bc
1
build/__blocka/index.asset.php
Normal file
1
build/__blocka/index.asset.php
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'fed41a0ebfd9c9a91a82');
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*!***********************************************************************************************************************************************************************************************************************************************!*\
|
/*!*************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/blocka/editor.scss ***!
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__blocka/editor.scss ***!
|
||||||
\***********************************************************************************************************************************************************************************************************************************************/
|
\*************************************************************************************************************************************************************************************************************************************************/
|
||||||
/**
|
/**
|
||||||
* The following styles get applied inside the editor only.
|
* The following styles get applied inside the editor only.
|
||||||
*
|
*
|
||||||
1
build/__blocka/index.css.map
Normal file
1
build/__blocka/index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"__blocka/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/__blocka/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
/******/ "use strict";
|
/******/ "use strict";
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ "./src/blocka/edit.js":
|
/***/ "./src/__blocka/edit.js":
|
||||||
/*!****************************!*\
|
/*!******************************!*\
|
||||||
!*** ./src/blocka/edit.js ***!
|
!*** ./src/__blocka/edit.js ***!
|
||||||
\****************************/
|
\******************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -19,7 +19,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
/* 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__ = __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__);
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
|
||||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/blocka/editor.scss");
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/__blocka/editor.scss");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -46,19 +46,19 @@ function Edit({
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/blocka/index.js":
|
/***/ "./src/__blocka/index.js":
|
||||||
/*!*****************************!*\
|
/*!*******************************!*\
|
||||||
!*** ./src/blocka/index.js ***!
|
!*** ./src/__blocka/index.js ***!
|
||||||
\*****************************/
|
\*******************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/blocka/style.scss");
|
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/__blocka/style.scss");
|
||||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/blocka/edit.js");
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/__blocka/edit.js");
|
||||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/blocka/save.js");
|
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/__blocka/save.js");
|
||||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/blocka/block.json");
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/__blocka/block.json");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -71,10 +71,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/blocka/save.js":
|
/***/ "./src/__blocka/save.js":
|
||||||
/*!****************************!*\
|
/*!******************************!*\
|
||||||
!*** ./src/blocka/save.js ***!
|
!*** ./src/__blocka/save.js ***!
|
||||||
\****************************/
|
\******************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -104,10 +104,10 @@ function save({
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/blocka/editor.scss":
|
/***/ "./src/__blocka/editor.scss":
|
||||||
/*!********************************!*\
|
/*!**********************************!*\
|
||||||
!*** ./src/blocka/editor.scss ***!
|
!*** ./src/__blocka/editor.scss ***!
|
||||||
\********************************/
|
\**********************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -116,10 +116,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/blocka/style.scss":
|
/***/ "./src/__blocka/style.scss":
|
||||||
/*!*******************************!*\
|
/*!*********************************!*\
|
||||||
!*** ./src/blocka/style.scss ***!
|
!*** ./src/__blocka/style.scss ***!
|
||||||
\*******************************/
|
\*********************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -195,10 +195,10 @@ function _extends() {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/blocka/block.json":
|
/***/ "./src/__blocka/block.json":
|
||||||
/*!*******************************!*\
|
/*!*********************************!*\
|
||||||
!*** ./src/blocka/block.json ***!
|
!*** ./src/__blocka/block.json ***!
|
||||||
\*******************************/
|
\*********************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/blocka","version":"0.1.0","title":"Multiple Block A","category":"wpblock-blocks","description":"Nouvel exemple de block Multiple","supports":{"html":false},"textdomain":"blocka","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"montexte":{"type":"string","source":"html","selector":"h2"}}}');
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/blocka","version":"0.1.0","title":"Multiple Block A","category":"wpblock-blocks","description":"Nouvel exemple de block Multiple","supports":{"html":false},"textdomain":"blocka","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"montexte":{"type":"string","source":"html","selector":"h2"}}}');
|
||||||
|
|
@ -315,8 +315,8 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
|
||||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||||
/******/ var installedChunks = {
|
/******/ var installedChunks = {
|
||||||
/******/ "blocka/index": 0,
|
/******/ "__blocka/index": 0,
|
||||||
/******/ "blocka/style-index": 0
|
/******/ "__blocka/style-index": 0
|
||||||
/******/ };
|
/******/ };
|
||||||
/******/
|
/******/
|
||||||
/******/ // no chunk on demand loading
|
/******/ // no chunk on demand loading
|
||||||
|
|
@ -366,7 +366,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
|
||||||
/******/ // startup
|
/******/ // startup
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["blocka/style-index"], () => (__webpack_require__("./src/blocka/index.js")))
|
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["__blocka/style-index"], () => (__webpack_require__("./src/__blocka/index.js")))
|
||||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||||
/******/
|
/******/
|
||||||
/******/ })()
|
/******/ })()
|
||||||
1
build/__blocka/index.js.map
Normal file
1
build/__blocka/index.js.map
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
/*!**********************************************************************************************************************************************************************************************************************************************!*\
|
/*!************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/blocka/style.scss ***!
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__blocka/style.scss ***!
|
||||||
\**********************************************************************************************************************************************************************************************************************************************/
|
\************************************************************************************************************************************************************************************************************************************************/
|
||||||
/**
|
/**
|
||||||
* The following styles get applied both on the front of your site
|
* The following styles get applied both on the front of your site
|
||||||
* and in the editor.
|
* and in the editor.
|
||||||
1
build/__blocka/style-index.css.map
Normal file
1
build/__blocka/style-index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"__blocka/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/__blocka/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""}
|
||||||
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'db81f0cab2f94cc04e80');
|
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'b8f7b1f6cd36b8327cf4');
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*!******************************************************************************************************************************************************************************************************************************************************!*\
|
/*!********************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/dynamic-posts/editor.scss ***!
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__dynamic-posts/editor.scss ***!
|
||||||
\******************************************************************************************************************************************************************************************************************************************************/
|
\********************************************************************************************************************************************************************************************************************************************************/
|
||||||
/**
|
/**
|
||||||
* The following styles get applied inside the editor only.
|
* The following styles get applied inside the editor only.
|
||||||
*
|
*
|
||||||
1
build/__dynamic-posts/index.css.map
Normal file
1
build/__dynamic-posts/index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"__dynamic-posts/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/__dynamic-posts/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
/******/ "use strict";
|
/******/ "use strict";
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ "./src/dynamic-posts/edit.js":
|
/***/ "./src/__dynamic-posts/edit.js":
|
||||||
/*!***********************************!*\
|
/*!*************************************!*\
|
||||||
!*** ./src/dynamic-posts/edit.js ***!
|
!*** ./src/__dynamic-posts/edit.js ***!
|
||||||
\***********************************/
|
\*************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -22,7 +22,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
|
||||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
|
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
|
||||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./editor.scss */ "./src/dynamic-posts/editor.scss");
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./editor.scss */ "./src/__dynamic-posts/editor.scss");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -38,18 +38,18 @@ function Edit({
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/dynamic-posts/index.js":
|
/***/ "./src/__dynamic-posts/index.js":
|
||||||
/*!************************************!*\
|
/*!**************************************!*\
|
||||||
!*** ./src/dynamic-posts/index.js ***!
|
!*** ./src/__dynamic-posts/index.js ***!
|
||||||
\************************************/
|
\**************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/dynamic-posts/style.scss");
|
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/__dynamic-posts/style.scss");
|
||||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/dynamic-posts/edit.js");
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/__dynamic-posts/edit.js");
|
||||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/dynamic-posts/block.json");
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/__dynamic-posts/block.json");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -60,10 +60,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/dynamic-posts/editor.scss":
|
/***/ "./src/__dynamic-posts/editor.scss":
|
||||||
/*!***************************************!*\
|
/*!*****************************************!*\
|
||||||
!*** ./src/dynamic-posts/editor.scss ***!
|
!*** ./src/__dynamic-posts/editor.scss ***!
|
||||||
\***************************************/
|
\*****************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -72,10 +72,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/dynamic-posts/style.scss":
|
/***/ "./src/__dynamic-posts/style.scss":
|
||||||
/*!**************************************!*\
|
/*!****************************************!*\
|
||||||
!*** ./src/dynamic-posts/style.scss ***!
|
!*** ./src/__dynamic-posts/style.scss ***!
|
||||||
\**************************************/
|
\****************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -144,10 +144,10 @@ module.exports = window["wp"]["i18n"];
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/dynamic-posts/block.json":
|
/***/ "./src/__dynamic-posts/block.json":
|
||||||
/*!**************************************!*\
|
/*!****************************************!*\
|
||||||
!*** ./src/dynamic-posts/block.json ***!
|
!*** ./src/__dynamic-posts/block.json ***!
|
||||||
\**************************************/
|
\****************************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/wpblock-latest-posts","version":"0.1.0","title":"Wpblock Latest Posts","category":"wpblock-blocks","description":"Un bloc dynamique qu affiche les derniers posts. #BlockStylesVariation #Dynamic #ToggleControl #DropDown","supports":{"html":false},"styles":[{"name":"post_grid","isDefault":true,"label":"Grille de post"},{"name":"post_list","label":"Liste de post"}],"example":{"attributes":{"numberOfPosts":4,"postType":"post","displayFeaturedImage":true,"showDescription":true,"blocktitle":"Latest Posts","blockDescriptionText":"Ma description"}},"textdomain":"wpblock-latest-posts","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"numberOfPosts":{"type":"number","default":4},"postType":{"type":"string","default":"post"},"displayFeaturedImage":{"type":"boolean","default":true},"showDescription":{"type":"boolean","default":true},"blocktitle":{"type":"string","default":"Latest Posts"},"blockDescriptionText":{"type":"string","default":"Ma description"}}}');
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/wpblock-latest-posts","version":"0.1.0","title":"Wpblock Latest Posts","category":"wpblock-blocks","description":"Un bloc dynamique qu affiche les derniers posts. #BlockStylesVariation #Dynamic #ToggleControl #DropDown","supports":{"html":false},"styles":[{"name":"post_grid","isDefault":true,"label":"Grille de post"},{"name":"post_list","label":"Liste de post"}],"example":{"attributes":{"numberOfPosts":4,"postType":"post","displayFeaturedImage":true,"showDescription":true,"blocktitle":"Latest Posts","blockDescriptionText":"Ma description"}},"textdomain":"wpblock-latest-posts","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"numberOfPosts":{"type":"number","default":4},"postType":{"type":"string","default":"post"},"displayFeaturedImage":{"type":"boolean","default":true},"showDescription":{"type":"boolean","default":true},"blocktitle":{"type":"string","default":"Latest Posts"},"blockDescriptionText":{"type":"string","default":"Ma description"}}}');
|
||||||
|
|
@ -264,8 +264,8 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
|
||||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||||
/******/ var installedChunks = {
|
/******/ var installedChunks = {
|
||||||
/******/ "dynamic-posts/index": 0,
|
/******/ "__dynamic-posts/index": 0,
|
||||||
/******/ "dynamic-posts/style-index": 0
|
/******/ "__dynamic-posts/style-index": 0
|
||||||
/******/ };
|
/******/ };
|
||||||
/******/
|
/******/
|
||||||
/******/ // no chunk on demand loading
|
/******/ // no chunk on demand loading
|
||||||
|
|
@ -315,7 +315,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
|
||||||
/******/ // startup
|
/******/ // startup
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["dynamic-posts/style-index"], () => (__webpack_require__("./src/dynamic-posts/index.js")))
|
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["__dynamic-posts/style-index"], () => (__webpack_require__("./src/__dynamic-posts/index.js")))
|
||||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||||
/******/
|
/******/
|
||||||
/******/ })()
|
/******/ })()
|
||||||
1
build/__dynamic-posts/index.js.map
Normal file
1
build/__dynamic-posts/index.js.map
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
/*!*****************************************************************************************************************************************************************************************************************************************************!*\
|
/*!*******************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/dynamic-posts/style.scss ***!
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__dynamic-posts/style.scss ***!
|
||||||
\*****************************************************************************************************************************************************************************************************************************************************/
|
\*******************************************************************************************************************************************************************************************************************************************************/
|
||||||
/**
|
/**
|
||||||
* The following styles get applied both on the front of your site
|
* The following styles get applied both on the front of your site
|
||||||
* and in the editor.
|
* and in the editor.
|
||||||
1
build/__dynamic-posts/style-index.css.map
Normal file
1
build/__dynamic-posts/style-index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"__dynamic-posts/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/__dynamic-posts/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""}
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||||
"apiVersion": 2,
|
"apiVersion": 2,
|
||||||
"name": "homegrade-content-blocks//nested-parent",
|
"name": "homegrade-content-blocks/nested-parent",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"title": "Wpblock Nested Parent",
|
"title": "Wpblock Nested Parent",
|
||||||
"category": "wpblock-blocks",
|
"category": "homegrade-blocks",
|
||||||
"description": "Parent Nested. #Nested",
|
"description": "Parent Nested. #Nested",
|
||||||
"supports": {
|
"supports": {
|
||||||
"html": false
|
"html": false
|
||||||
},
|
},
|
||||||
"textdomain": "nested-parent",
|
"textdomain": "homegrade-theme__bloks-texte-fonctionnel",
|
||||||
"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
build/__nested-parent/index.asset.php
Normal file
1
build/__nested-parent/index.asset.php
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => '19243facfafb4ab0327f');
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*!**********************************************************************************************************************************************************************************************************************************************************************!*\
|
/*!************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/nested-parent/nested-children/editor.scss ***!
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__nested-parent/nested-children/editor.scss ***!
|
||||||
\**********************************************************************************************************************************************************************************************************************************************************************/
|
\************************************************************************************************************************************************************************************************************************************************************************/
|
||||||
/**
|
/**
|
||||||
* The following styles get applied inside the editor only.
|
* The following styles get applied inside the editor only.
|
||||||
*
|
*
|
||||||
|
|
@ -9,9 +9,9 @@
|
||||||
.wp-block-create-block-blocka {
|
.wp-block-create-block-blocka {
|
||||||
border: 1px dotted #f00;
|
border: 1px dotted #f00;
|
||||||
}
|
}
|
||||||
/*!******************************************************************************************************************************************************************************************************************************************************!*\
|
/*!********************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/nested-parent/editor.scss ***!
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__nested-parent/editor.scss ***!
|
||||||
\******************************************************************************************************************************************************************************************************************************************************/
|
\********************************************************************************************************************************************************************************************************************************************************/
|
||||||
/**
|
/**
|
||||||
* The following styles get applied inside the editor only.
|
* The following styles get applied inside the editor only.
|
||||||
*
|
*
|
||||||
1
build/__nested-parent/index.css.map
Normal file
1
build/__nested-parent/index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"__nested-parent/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C;;;;ACPA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/__nested-parent/nested-children/editor.scss","webpack://test-de-block/./src/__nested-parent/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n","/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
/******/ "use strict";
|
/******/ "use strict";
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ "./src/nested-parent/edit.js":
|
/***/ "./src/__nested-parent/edit.js":
|
||||||
/*!***********************************!*\
|
/*!*************************************!*\
|
||||||
!*** ./src/nested-parent/edit.js ***!
|
!*** ./src/__nested-parent/edit.js ***!
|
||||||
\***********************************/
|
\*************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -19,7 +19,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
/* 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__ = __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__);
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
|
||||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/nested-parent/editor.scss");
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/__nested-parent/editor.scss");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -56,10 +56,10 @@ function Edit({
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/index.js":
|
/***/ "./src/__nested-parent/index.js":
|
||||||
/*!************************************!*\
|
/*!**************************************!*\
|
||||||
!*** ./src/nested-parent/index.js ***!
|
!*** ./src/__nested-parent/index.js ***!
|
||||||
\************************************/
|
\**************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -69,11 +69,11 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ "./src/nested-parent/style.scss");
|
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ "./src/__nested-parent/style.scss");
|
||||||
/* harmony import */ var _nested_children__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./nested-children */ "./src/nested-parent/nested-children/index.js");
|
/* harmony import */ var _nested_children__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./nested-children */ "./src/__nested-parent/nested-children/index.js");
|
||||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./edit */ "./src/nested-parent/edit.js");
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./edit */ "./src/__nested-parent/edit.js");
|
||||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./save */ "./src/nested-parent/save.js");
|
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./save */ "./src/__nested-parent/save.js");
|
||||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./block.json */ "./src/nested-parent/block.json");
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./block.json */ "./src/__nested-parent/block.json");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -109,10 +109,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/edit.js":
|
/***/ "./src/__nested-parent/nested-children/edit.js":
|
||||||
/*!***************************************************!*\
|
/*!*****************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/edit.js ***!
|
!*** ./src/__nested-parent/nested-children/edit.js ***!
|
||||||
\***************************************************/
|
\*****************************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -125,7 +125,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/nested-parent/nested-children/editor.scss");
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/__nested-parent/nested-children/editor.scss");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -152,19 +152,19 @@ function Edit({
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/index.js":
|
/***/ "./src/__nested-parent/nested-children/index.js":
|
||||||
/*!****************************************************!*\
|
/*!******************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/index.js ***!
|
!*** ./src/__nested-parent/nested-children/index.js ***!
|
||||||
\****************************************************/
|
\******************************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/nested-parent/nested-children/style.scss");
|
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/__nested-parent/nested-children/style.scss");
|
||||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/nested-parent/nested-children/block.json");
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/__nested-parent/nested-children/block.json");
|
||||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/nested-parent/nested-children/edit.js");
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/__nested-parent/nested-children/edit.js");
|
||||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/nested-parent/nested-children/save.js");
|
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/__nested-parent/nested-children/save.js");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -183,10 +183,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/save.js":
|
/***/ "./src/__nested-parent/nested-children/save.js":
|
||||||
/*!***************************************************!*\
|
/*!*****************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/save.js ***!
|
!*** ./src/__nested-parent/nested-children/save.js ***!
|
||||||
\***************************************************/
|
\*****************************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -215,10 +215,10 @@ function save({
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/save.js":
|
/***/ "./src/__nested-parent/save.js":
|
||||||
/*!***********************************!*\
|
/*!*************************************!*\
|
||||||
!*** ./src/nested-parent/save.js ***!
|
!*** ./src/__nested-parent/save.js ***!
|
||||||
\***********************************/
|
\*************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -248,10 +248,10 @@ function save({
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/editor.scss":
|
/***/ "./src/__nested-parent/editor.scss":
|
||||||
/*!***************************************!*\
|
/*!*****************************************!*\
|
||||||
!*** ./src/nested-parent/editor.scss ***!
|
!*** ./src/__nested-parent/editor.scss ***!
|
||||||
\***************************************/
|
\*****************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -260,10 +260,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/editor.scss":
|
/***/ "./src/__nested-parent/nested-children/editor.scss":
|
||||||
/*!*******************************************************!*\
|
/*!*********************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/editor.scss ***!
|
!*** ./src/__nested-parent/nested-children/editor.scss ***!
|
||||||
\*******************************************************/
|
\*********************************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -272,10 +272,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/style.scss":
|
/***/ "./src/__nested-parent/nested-children/style.scss":
|
||||||
/*!******************************************************!*\
|
/*!********************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/style.scss ***!
|
!*** ./src/__nested-parent/nested-children/style.scss ***!
|
||||||
\******************************************************/
|
\********************************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -284,10 +284,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/style.scss":
|
/***/ "./src/__nested-parent/style.scss":
|
||||||
/*!**************************************!*\
|
/*!****************************************!*\
|
||||||
!*** ./src/nested-parent/style.scss ***!
|
!*** ./src/__nested-parent/style.scss ***!
|
||||||
\**************************************/
|
\****************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -363,23 +363,23 @@ function _extends() {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/block.json":
|
/***/ "./src/__nested-parent/block.json":
|
||||||
/*!**************************************!*\
|
/*!****************************************!*\
|
||||||
!*** ./src/nested-parent/block.json ***!
|
!*** ./src/__nested-parent/block.json ***!
|
||||||
\**************************************/
|
\****************************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks//nested-parent","version":"0.1.0","title":"Wpblock Nested Parent","category":"wpblock-blocks","description":"Parent Nested. #Nested","supports":{"html":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"montexte":{"type":"string","source":"html","selector":"h2"}}}');
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/nested-parent","version":"0.1.0","title":"Wpblock Nested Parent","category":"homegrade-blocks","description":"Parent Nested. #Nested","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"montexte":{"type":"string","source":"html","selector":"h2"}}}');
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/block.json":
|
/***/ "./src/__nested-parent/nested-children/block.json":
|
||||||
/*!******************************************************!*\
|
/*!********************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/block.json ***!
|
!*** ./src/__nested-parent/nested-children/block.json ***!
|
||||||
\******************************************************/
|
\********************************************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/nested-children","version":"0.1.0","title":"Nested Childrenes","category":"wpblock-blocks","icon":{"background":"#0414eb","foreground":"#fff","src":"admin-plugins"},"description":"Children Nested. #ChildrenNested","supports":{"html":false,"reusable":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"userName":{"type":"string"},"userPosition":{"type":"string"}}}');
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/nested-children","version":"0.1.0","title":"Nested Childrenes","category":"homegrade-blocks","icon":{"background":"#0414eb","foreground":"#fff","src":"admin-plugins"},"description":"Children Nested. #ChildrenNested","supports":{"html":false,"reusable":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"userName":{"type":"string"},"userPosition":{"type":"string"}}}');
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
|
|
@ -493,8 +493,8 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
|
||||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||||
/******/ var installedChunks = {
|
/******/ var installedChunks = {
|
||||||
/******/ "nested-parent/index": 0,
|
/******/ "__nested-parent/index": 0,
|
||||||
/******/ "nested-parent/style-index": 0
|
/******/ "__nested-parent/style-index": 0
|
||||||
/******/ };
|
/******/ };
|
||||||
/******/
|
/******/
|
||||||
/******/ // no chunk on demand loading
|
/******/ // no chunk on demand loading
|
||||||
|
|
@ -544,7 +544,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
|
||||||
/******/ // startup
|
/******/ // startup
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["nested-parent/style-index"], () => (__webpack_require__("./src/nested-parent/index.js")))
|
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["__nested-parent/style-index"], () => (__webpack_require__("./src/__nested-parent/index.js")))
|
||||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||||
/******/
|
/******/
|
||||||
/******/ })()
|
/******/ })()
|
||||||
1
build/__nested-parent/index.js.map
Normal file
1
build/__nested-parent/index.js.map
Normal file
File diff suppressed because one or more lines are too long
30
build/__nested-parent/nested-children/block.json
Normal file
30
build/__nested-parent/nested-children/block.json
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||||
|
"apiVersion": 2,
|
||||||
|
"name": "wpblocks-multiple/nested-children",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"title": "Nested Childrenes",
|
||||||
|
"category": "homegrade-blocks",
|
||||||
|
"icon": {
|
||||||
|
"background": "#0414eb",
|
||||||
|
"foreground": "#fff",
|
||||||
|
"src": "admin-plugins"
|
||||||
|
},
|
||||||
|
"description": "Children Nested. #ChildrenNested",
|
||||||
|
"supports": {
|
||||||
|
"html": false,
|
||||||
|
"reusable": false
|
||||||
|
},
|
||||||
|
"textdomain": "nested-parent",
|
||||||
|
"editorScript": "file:./index.js",
|
||||||
|
"editorStyle": "file:./index.css",
|
||||||
|
"style": "file:./style-index.css",
|
||||||
|
"attributes": {
|
||||||
|
"userName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"userPosition": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
build/__nested-parent/nested-children/index.asset.php
Normal file
1
build/__nested-parent/nested-children/index.asset.php
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'b01f4ced5024082a868b');
|
||||||
13
build/__nested-parent/nested-children/index.css
Normal file
13
build/__nested-parent/nested-children/index.css
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
/*!************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__nested-parent/nested-children/editor.scss ***!
|
||||||
|
\************************************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
/**
|
||||||
|
* The following styles get applied inside the editor only.
|
||||||
|
*
|
||||||
|
* Replace them with your own styles or remove the file completely.
|
||||||
|
*/
|
||||||
|
.wp-block-create-block-blocka {
|
||||||
|
border: 1px dotted #f00;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=index.css.map*/
|
||||||
1
build/__nested-parent/nested-children/index.css.map
Normal file
1
build/__nested-parent/nested-children/index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"__nested-parent/nested-children/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/__nested-parent/nested-children/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
|
||||||
351
build/__nested-parent/nested-children/index.js
Normal file
351
build/__nested-parent/nested-children/index.js
Normal file
|
|
@ -0,0 +1,351 @@
|
||||||
|
/******/ (() => { // webpackBootstrap
|
||||||
|
/******/ "use strict";
|
||||||
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
|
/***/ "./src/__nested-parent/nested-children/edit.js":
|
||||||
|
/*!*****************************************************!*\
|
||||||
|
!*** ./src/__nested-parent/nested-children/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 _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_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 _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/__nested-parent/nested-children/editor.scss");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function Edit({
|
||||||
|
attributes,
|
||||||
|
setAttributes
|
||||||
|
}) {
|
||||||
|
const {
|
||||||
|
userName,
|
||||||
|
userPosition
|
||||||
|
} = attributes;
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, {
|
||||||
|
className: "user-name",
|
||||||
|
onChange: value => setAttributes({
|
||||||
|
userName: value
|
||||||
|
}),
|
||||||
|
value: userName,
|
||||||
|
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("UserName Here", "text-box"),
|
||||||
|
tagName: "p",
|
||||||
|
allowedFormats: []
|
||||||
|
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, userPosition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/__nested-parent/nested-children/index.js":
|
||||||
|
/*!******************************************************!*\
|
||||||
|
!*** ./src/__nested-parent/nested-children/index.js ***!
|
||||||
|
\******************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||||
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/__nested-parent/nested-children/style.scss");
|
||||||
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/__nested-parent/nested-children/block.json");
|
||||||
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/__nested-parent/nested-children/edit.js");
|
||||||
|
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/__nested-parent/nested-children/save.js");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_2__.name, {
|
||||||
|
title: _block_json__WEBPACK_IMPORTED_MODULE_2__.title,
|
||||||
|
icon: "smiley",
|
||||||
|
category: "wpblock-blocks",
|
||||||
|
parent: ["wpblocks-multiple/nested-parent"],
|
||||||
|
supports: _block_json__WEBPACK_IMPORTED_MODULE_2__.supports,
|
||||||
|
attributes: _block_json__WEBPACK_IMPORTED_MODULE_2__.attributes,
|
||||||
|
edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"],
|
||||||
|
save: _save__WEBPACK_IMPORTED_MODULE_4__["default"]
|
||||||
|
});
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/__nested-parent/nested-children/save.js":
|
||||||
|
/*!*****************************************************!*\
|
||||||
|
!*** ./src/__nested-parent/nested-children/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 _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_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({
|
||||||
|
attributes
|
||||||
|
}) {
|
||||||
|
const {
|
||||||
|
userName,
|
||||||
|
userPosition
|
||||||
|
} = attributes;
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, {
|
||||||
|
tagName: "h2",
|
||||||
|
value: userName,
|
||||||
|
className: "mydummytext"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/__nested-parent/nested-children/editor.scss":
|
||||||
|
/*!*********************************************************!*\
|
||||||
|
!*** ./src/__nested-parent/nested-children/editor.scss ***!
|
||||||
|
\*********************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/__nested-parent/nested-children/style.scss":
|
||||||
|
/*!********************************************************!*\
|
||||||
|
!*** ./src/__nested-parent/nested-children/style.scss ***!
|
||||||
|
\********************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/block-editor":
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** external ["wp","blockEditor"] ***!
|
||||||
|
\*************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["blockEditor"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/blocks":
|
||||||
|
/*!********************************!*\
|
||||||
|
!*** external ["wp","blocks"] ***!
|
||||||
|
\********************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["blocks"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/element":
|
||||||
|
/*!*********************************!*\
|
||||||
|
!*** external ["wp","element"] ***!
|
||||||
|
\*********************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["element"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/i18n":
|
||||||
|
/*!******************************!*\
|
||||||
|
!*** external ["wp","i18n"] ***!
|
||||||
|
\******************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["i18n"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/__nested-parent/nested-children/block.json":
|
||||||
|
/*!********************************************************!*\
|
||||||
|
!*** ./src/__nested-parent/nested-children/block.json ***!
|
||||||
|
\********************************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/nested-children","version":"0.1.0","title":"Nested Childrenes","category":"homegrade-blocks","icon":{"background":"#0414eb","foreground":"#fff","src":"admin-plugins"},"description":"Children Nested. #ChildrenNested","supports":{"html":false,"reusable":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"userName":{"type":"string"},"userPosition":{"type":"string"}}}');
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
|
||||||
|
/******/ });
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ // 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 = {
|
||||||
|
/******/ "__nested-parent/nested-children/index": 0,
|
||||||
|
/******/ "__nested-parent/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["webpackChunktest_de_block"] = globalThis["webpackChunktest_de_block"] || [];
|
||||||
|
/******/ 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, ["__nested-parent/style-index"], () => (__webpack_require__("./src/__nested-parent/nested-children/index.js")))
|
||||||
|
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||||
|
/******/
|
||||||
|
/******/ })()
|
||||||
|
;
|
||||||
|
//# sourceMappingURL=index.js.map
|
||||||
1
build/__nested-parent/nested-children/index.js.map
Normal file
1
build/__nested-parent/nested-children/index.js.map
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
/*!*****************************************************************************************************************************************************************************************************************************************************!*\
|
/*!*******************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/nested-parent/style.scss ***!
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__nested-parent/style.scss ***!
|
||||||
\*****************************************************************************************************************************************************************************************************************************************************/
|
\*******************************************************************************************************************************************************************************************************************************************************/
|
||||||
/**
|
/**
|
||||||
* The following styles get applied both on the front of your site
|
* The following styles get applied both on the front of your site
|
||||||
* and in the editor.
|
* and in the editor.
|
||||||
|
|
@ -12,9 +12,9 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
/*!*********************************************************************************************************************************************************************************************************************************************************************!*\
|
/*!***********************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/nested-parent/nested-children/style.scss ***!
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__nested-parent/nested-children/style.scss ***!
|
||||||
\*********************************************************************************************************************************************************************************************************************************************************************/
|
\***********************************************************************************************************************************************************************************************************************************************************************/
|
||||||
/**
|
/**
|
||||||
* The following styles get applied both on the front of your site
|
* The following styles get applied both on the front of your site
|
||||||
* and in the editor.
|
* and in the editor.
|
||||||
1
build/__nested-parent/style-index.css.map
Normal file
1
build/__nested-parent/style-index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"__nested-parent/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C;;;;ACVA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/__nested-parent/style.scss","webpack://test-de-block/./src/__nested-parent/nested-children/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n","/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""}
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'b7e686b40ba1e85010f1');
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"blocka/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/blocka/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"blocka/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/blocka/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""}
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||||
"apiVersion": 2,
|
"apiVersion": 2,
|
||||||
"name": "homegrade-multiple/chapter-header",
|
"name": "homegrade-content-blocks/chapter-header",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"title": "Chapter Header",
|
"title": "Chapter Header",
|
||||||
"category": "wpblock-blocks",
|
"category": "homegrade-blocks",
|
||||||
"icon": {
|
"icon": {
|
||||||
"background": "#fff",
|
"background": "#fff",
|
||||||
"foreground": "#DF1E1E",
|
"foreground": "#DF1E1E",
|
||||||
"src": "feedback"
|
"src": "feedback"
|
||||||
},
|
},
|
||||||
"description": "Un bloc dynamique qui affiche le titres de chapitre",
|
"description": "Un bloc automatique pour afficher le bandeau de titrage de la page conseil courante",
|
||||||
"supports": {
|
"supports": {
|
||||||
"html": false
|
"html": false
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '2a0380f0b253e7769922');
|
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '032dbd5efb7ebb659f42');
|
||||||
|
|
|
||||||
|
|
@ -60,26 +60,26 @@ function Edit({
|
||||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "Chargement des donn\xE9es..."));
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "Chargement des donn\xE9es..."));
|
||||||
}
|
}
|
||||||
if (postMainTaxonomy && postTitle && currentGeneralThematique) {
|
if (postMainTaxonomy && postTitle && currentGeneralThematique) {
|
||||||
console.log(postMainTaxonomy);
|
|
||||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||||
className: `chapter-header-block bg-${currentGeneralThematiqueSlug}-light`
|
className: `chapter-header-block bg-${currentGeneralThematiqueSlug}-light`
|
||||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||||
className: "chapter-header-block__infos"
|
className: "chapter-header-block__infos"
|
||||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||||
class: `chapter-header-block__page-thematic-title text-${currentGeneralThematiqueSlug}`
|
className: `chapter-header-block__page-thematic-title text-${currentGeneralThematiqueSlug}`
|
||||||
}, postMainTaxonomy.name), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, {
|
}, currentGeneralThematique.name), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, {
|
||||||
onChange: value => {
|
onChange: value => {
|
||||||
editPost({
|
editPost({
|
||||||
title: value
|
title: value
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
value: postTitle,
|
value: postTitle,
|
||||||
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Titre du Bloc", "text-box"),
|
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Text de placeholrder du bloc chapter-header", "homegrade-theme__bloks-texte-fonctionnel"),
|
||||||
tagName: "h2",
|
tagName: "h2",
|
||||||
allowedFormats: []
|
allowedFormats: []
|
||||||
}), postParentTaxonomy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
|
}), postParentTaxonomy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||||
href: ""
|
href: "",
|
||||||
}, "T\xE9l\xE9charger la brochure ")), currentGeneralThematiqueCover && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
|
className: "cta cta--primary cta--buton"
|
||||||
|
}, "T\xE9l\xE9charger la brochure", " ")), currentGeneralThematiqueCover && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
|
||||||
className: "chapter-header-block__page-thematic-cover page-thematic-cover",
|
className: "chapter-header-block__page-thematic-cover page-thematic-cover",
|
||||||
src: `${currentGeneralThematiqueCover.source_url}`,
|
src: `${currentGeneralThematiqueCover.source_url}`,
|
||||||
alt: ""
|
alt: ""
|
||||||
|
|
@ -239,7 +239,7 @@ module.exports = window["wp"]["i18n"];
|
||||||
\***************************************/
|
\***************************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-multiple/chapter-header","version":"0.1.0","title":"Chapter Header","category":"wpblock-blocks","icon":{"background":"#fff","foreground":"#DF1E1E","src":"feedback"},"description":"Un bloc dynamique qui affiche le titres de chapitre","supports":{"html":false},"textdomain":"wpblock-latest-posts","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"blockTitle":{"type":"string","source":"html","selector":"h2"}}}');
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/chapter-header","version":"0.1.0","title":"Chapter Header","category":"homegrade-blocks","icon":{"background":"#fff","foreground":"#DF1E1E","src":"feedback"},"description":"Un bloc automatique pour afficher le bandeau de titrage de la page conseil courante","supports":{"html":false},"textdomain":"wpblock-latest-posts","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"blockTitle":{"type":"string","source":"html","selector":"h2"}}}');
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -4,28 +4,60 @@
|
||||||
// print_r($block);
|
// print_r($block);
|
||||||
// echo '</pre>';
|
// echo '</pre>';
|
||||||
|
|
||||||
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null;
|
||||||
$thematique_generale = $thematique->parent ? get_term($thematique->parent, 'thematiques') : $thematique;
|
$thematique_generale = $thematique->parent ? get_term($thematique->parent, 'thematiques') : $thematique;
|
||||||
$thematique_picture = get_field('taxonomy_pictures', "thematiques_" . $thematique_generale->term_id)['illustration_s'];
|
$thematique_picture = get_field('taxonomy_pictures', "thematiques_" . $thematique_generale->term_id)['illustration_s'];
|
||||||
|
|
||||||
|
$lastUpdate = get_the_modified_date('', get_the_ID());
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
// 'fields' => 'ids',
|
||||||
|
'post_type' => 'brochures',
|
||||||
|
'posts_per_page' => 1,
|
||||||
|
'tax_query' => array(
|
||||||
|
array(
|
||||||
|
'taxonomy' => 'thematiques',
|
||||||
|
'field' => 'term_id',
|
||||||
|
'terms' => $thematique->term_id
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$relatedBrochuresPosts = get_posts($args);
|
||||||
|
$relatedBrochure = get_field('brochures', $relatedBrochuresPosts[0]->ID);
|
||||||
|
$hasBrochure = $relatedBrochure['file_fr']['url'] ? true : false;
|
||||||
|
|
||||||
echo '<pre>';
|
// echo '<pre>';
|
||||||
// print_r(getThematiqueFamilySlug($thematique->slug));
|
// // print_r($relatedBrochures[0]);
|
||||||
// print_r(getThematiqueFamilySlug("acoustique"));
|
// // print_r($relatedBrochure['file_fr']['url'] ? "yes" : "no");
|
||||||
// print_r("salut");
|
// // print_r(getThematiqueFamilySlug("acoustique"));
|
||||||
// print_r($thematique);
|
// // print_r("salut");
|
||||||
// print_r($thematique_generale);
|
// // print_r($thematique);
|
||||||
// print_r($thematique_picture);
|
// // print_r($thematique_generale);
|
||||||
echo '</pre>';
|
// // print_r($thematique_picture);
|
||||||
|
// echo '</pre>';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<section class="chapter-header-block <?php echo "bg-" . getThematiqueFamilySlug($thematique_generale->slug) . "-light" ?>">
|
<section class="chapter-header-block <?php echo "bg-" . getThematiqueFamilySlug($thematique_generale->slug) . "-light" ?>">
|
||||||
<div class="chapter-header-block__infos">
|
<div class="chapter-header-block__infos">
|
||||||
<p class="chapter-header-block__page-thematic-title <?php echo "text-" . getThematiqueFamilySlug($thematique_generale->slug) ?>"><?php echo $thematique_generale->name ?></p>
|
<?php if ($thematique->parent == 0) : ?>
|
||||||
|
|
||||||
|
<p class="chapter-header-block__page-thematic-title <?php echo "text-" . getThematiqueFamilySlug($thematique_generale->slug) ?>"><?php echo __("Les conseillers Homegrade vous guident", "homegrade-theme__bloks-texte-fonctionnel") ?></p>
|
||||||
|
<?php else : ?>
|
||||||
|
<p class="chapter-header-block__page-thematic-title <?php echo "text-" . getThematiqueFamilySlug($thematique_generale->slug) ?>"><?php echo $thematique_generale->name ?></p>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
<h1 class="chapter-header-block__page-title"><?php echo get_the_title() ?></h1>
|
<h1 class="chapter-header-block__page-title"><?php echo get_the_title() ?></h1>
|
||||||
<a href="">Télécharger la brochure</a>
|
|
||||||
|
<?php if ($hasBrochure) : ?>
|
||||||
|
<a class="cta cta--primary cta--button" href="<?php echo $relatedBrochure['file_fr']['url'] ?>" target="_blank">Télécharger la brochure <?php echo $relatedBrochures[0]->post_title ?></a>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($lastUpdate) : ?>
|
||||||
|
<time>Dernière mise à jour : <?php echo $lastUpdate ?></time>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<img class="chapter-header-block__page-thematic-cover " src="<?php echo $thematique_picture['url'] ?>" alt="">
|
<img class="chapter-header-block__page-thematic-cover " src="<?php echo $thematique_picture['url'] ?>" alt="">
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
.chapter-header-block__page-thematic-cover {
|
.chapter-header-block__page-thematic-cover {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"chapter-header/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD;AAEC;EACC;AAAF,C","sources":["webpack://test-de-block/./src/chapter-header/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.chapter-header-block {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\n\t&__page-thematic-cover {\n\t\tmax-width: 400px;\n\t}\n\n}\n"],"names":[],"sourceRoot":""}
|
{"version":3,"file":"chapter-header/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;EACA;AAAD;AAEC;EACC;AAAF,C","sources":["webpack://test-de-block/./src/chapter-header/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.chapter-header-block {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tmargin-bottom: 20px;\n\t\n\t&__page-thematic-cover {\n\t\tmax-width: 400px;\n\t}\n}\n"],"names":[],"sourceRoot":""}
|
||||||
24
build/content-heading/block.json
Normal file
24
build/content-heading/block.json
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||||
|
"apiVersion": 2,
|
||||||
|
"name": "homegrade-content-blocks/content-heading",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"title": "Titre",
|
||||||
|
"category": "homegrade-blocks",
|
||||||
|
"icon": "smiley",
|
||||||
|
"description": "Bloc de titrage",
|
||||||
|
"supports": {
|
||||||
|
"html": false
|
||||||
|
},
|
||||||
|
"textdomain": "homegrade-theme__bloks-texte-fonctionnel",
|
||||||
|
"editorScript": "file:./index.js",
|
||||||
|
"editorStyle": "file:./index.css",
|
||||||
|
"style": "file:./style-index.css",
|
||||||
|
"attributes": {
|
||||||
|
"title": {
|
||||||
|
"type": "string",
|
||||||
|
"source": "html",
|
||||||
|
"selector": "h3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
build/content-heading/index.asset.php
Normal file
1
build/content-heading/index.asset.php
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'e705b01d84e7792bd413');
|
||||||
10
build/content-heading/index.css
Normal file
10
build/content-heading/index.css
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*!********************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/content-heading/editor.scss ***!
|
||||||
|
\********************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
/**
|
||||||
|
* The following styles get applied inside the editor only.
|
||||||
|
*
|
||||||
|
* Replace them with your own styles or remove the file completely.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*# sourceMappingURL=index.css.map*/
|
||||||
1
build/content-heading/index.css.map
Normal file
1
build/content-heading/index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"content-heading/index.css","mappings":";;;AAAA;;;;EAAA,C","sources":["webpack://test-de-block/./src/content-heading/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n// .block-editor-image-size-control {\n// \tdisplay: none;\n// }\n"],"names":[],"sourceRoot":""}
|
||||||
380
build/content-heading/index.js
Normal file
380
build/content-heading/index.js
Normal file
|
|
@ -0,0 +1,380 @@
|
||||||
|
/******/ (() => { // webpackBootstrap
|
||||||
|
/******/ "use strict";
|
||||||
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
|
/***/ "./src/content-heading/edit.js":
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** ./src/content-heading/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 _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_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 _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||||
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
|
||||||
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/content-heading/editor.scss");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function Edit({
|
||||||
|
attributes,
|
||||||
|
setAttributes
|
||||||
|
}) {
|
||||||
|
const {
|
||||||
|
title
|
||||||
|
} = attributes;
|
||||||
|
const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps)();
|
||||||
|
function onChangeCitation(newCitation) {
|
||||||
|
setAttributes({
|
||||||
|
citation: newCitation
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.BlockControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.AlignmentToolbar, {
|
||||||
|
align: "right",
|
||||||
|
onChange: onChangeCitation
|
||||||
|
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, {
|
||||||
|
className: "wp-block-homegrade-content-blocks-content-heading",
|
||||||
|
onChange: value => setAttributes({
|
||||||
|
title: value
|
||||||
|
}),
|
||||||
|
value: title,
|
||||||
|
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Insérez votre titre ici", "homegrade-theme__bloks-texte-fonctionnel"),
|
||||||
|
tagName: "h3"
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/content-heading/index.js":
|
||||||
|
/*!**************************************!*\
|
||||||
|
!*** ./src/content-heading/index.js ***!
|
||||||
|
\**************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* 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_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/content-heading/style.scss");
|
||||||
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/content-heading/edit.js");
|
||||||
|
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/content-heading/save.js");
|
||||||
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./block.json */ "./src/content-heading/block.json");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_5__.name, {
|
||||||
|
icon: {
|
||||||
|
src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
|
||||||
|
xmlns: "http://www.w3.org/2000/svg",
|
||||||
|
viewBox: "0 0 24 24",
|
||||||
|
width: "24",
|
||||||
|
height: "24",
|
||||||
|
"aria-hidden": "true",
|
||||||
|
focusable: "false"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
||||||
|
d: "M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z"
|
||||||
|
})),
|
||||||
|
foreground: "#DF1E1E"
|
||||||
|
},
|
||||||
|
edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"],
|
||||||
|
save: _save__WEBPACK_IMPORTED_MODULE_4__["default"]
|
||||||
|
});
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/content-heading/save.js":
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** ./src/content-heading/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 _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_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({
|
||||||
|
attributes
|
||||||
|
}) {
|
||||||
|
const {
|
||||||
|
title
|
||||||
|
} = attributes;
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, {
|
||||||
|
tagName: "h3",
|
||||||
|
value: title,
|
||||||
|
className: "wp-block-homegrade-content-blocks-content-heading"
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/content-heading/editor.scss":
|
||||||
|
/*!*****************************************!*\
|
||||||
|
!*** ./src/content-heading/editor.scss ***!
|
||||||
|
\*****************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/content-heading/style.scss":
|
||||||
|
/*!****************************************!*\
|
||||||
|
!*** ./src/content-heading/style.scss ***!
|
||||||
|
\****************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/block-editor":
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** external ["wp","blockEditor"] ***!
|
||||||
|
\*************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["blockEditor"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/blocks":
|
||||||
|
/*!********************************!*\
|
||||||
|
!*** external ["wp","blocks"] ***!
|
||||||
|
\********************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["blocks"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/components":
|
||||||
|
/*!************************************!*\
|
||||||
|
!*** external ["wp","components"] ***!
|
||||||
|
\************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["components"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/element":
|
||||||
|
/*!*********************************!*\
|
||||||
|
!*** external ["wp","element"] ***!
|
||||||
|
\*********************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["element"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/i18n":
|
||||||
|
/*!******************************!*\
|
||||||
|
!*** external ["wp","i18n"] ***!
|
||||||
|
\******************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["i18n"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/content-heading/block.json":
|
||||||
|
/*!****************************************!*\
|
||||||
|
!*** ./src/content-heading/block.json ***!
|
||||||
|
\****************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/content-heading","version":"0.1.0","title":"Titre","category":"homegrade-blocks","icon":"smiley","description":"Bloc de titrage","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"title":{"type":"string","source":"html","selector":"h3"}}}');
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
|
||||||
|
/******/ });
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ // 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 = {
|
||||||
|
/******/ "content-heading/index": 0,
|
||||||
|
/******/ "content-heading/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["webpackChunktest_de_block"] = globalThis["webpackChunktest_de_block"] || [];
|
||||||
|
/******/ 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, ["content-heading/style-index"], () => (__webpack_require__("./src/content-heading/index.js")))
|
||||||
|
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||||
|
/******/
|
||||||
|
/******/ })()
|
||||||
|
;
|
||||||
|
//# sourceMappingURL=index.js.map
|
||||||
1
build/content-heading/index.js.map
Normal file
1
build/content-heading/index.js.map
Normal file
File diff suppressed because one or more lines are too long
61
build/content-heading/style-index.css
Normal file
61
build/content-heading/style-index.css
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
/*!*******************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/content-heading/style.scss ***!
|
||||||
|
\*******************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
/**
|
||||||
|
* The following styles get applied both on the front of your site
|
||||||
|
* and in the editor.
|
||||||
|
*
|
||||||
|
* Replace them with your own styles or remove the file completely.
|
||||||
|
*/
|
||||||
|
.wpblock-citation-block {
|
||||||
|
position: relative;
|
||||||
|
padding: 80px 20px;
|
||||||
|
margin-top: 50px !important;
|
||||||
|
margin-bottom: 50px !important;
|
||||||
|
}
|
||||||
|
.wpblock-citation-block .wpblock-citation-citation {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 50px;
|
||||||
|
line-height: 1.2;
|
||||||
|
text-transform: unset;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
}
|
||||||
|
.wpblock-citation-block .wpblock-citation-author {
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
.wpblock-citation-block .wpblock-citation-citation,
|
||||||
|
.wpblock-citation-block .wpblock-citation-author {
|
||||||
|
max-width: 1040px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.wpblock-citation-block.text-align-right {
|
||||||
|
padding-right: 50px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.wpblock-citation-block.text-align-right .wpblock-citation-citation,
|
||||||
|
.wpblock-citation-block.text-align-right .wpblock-citation-author {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
.wpblock-citation-block.text-align-left {
|
||||||
|
padding-left: 50px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.wpblock-citation-block.text-align-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.wpblock-citation-block.text-align-center .wpblock-citation-citation,
|
||||||
|
.wpblock-citation-block.text-align-center .wpblock-citation-author {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.wpblock-citation-block figure,
|
||||||
|
.wpblock-citation-block img {
|
||||||
|
width: 100%;
|
||||||
|
height: 250px;
|
||||||
|
}
|
||||||
|
.wpblock-citation-block img {
|
||||||
|
-o-object-fit: cover;
|
||||||
|
object-fit: cover;
|
||||||
|
filter: brightness(0.3) grayscale(100%) sepia(100%) hue-rotate(200deg) opacity(0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=style-index.css.map*/
|
||||||
1
build/content-heading/style-index.css.map
Normal file
1
build/content-heading/style-index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"content-heading/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;EACA;AAAD;AAEC;EACC;EACA;EACA;EACA;EACA;AAAF;AAEC;EACC;AAAF;AAGC;;EAEC;EACA;AADF;AAIC;EACC;EACA;AAFF;AAGE;;EAEC;AADH;AAIC;EACC;EACA;AAFF;AAIC;EACC;AAFF;AAIE;;EAEC;AAFH;AAMC;;EAEC;EACA;AAJF;AAMC;EACC;KAAA;EACA;AAJF,C","sources":["webpack://test-de-block/./src/content-heading/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wpblock-citation-block {\n\tposition: relative;\n\tpadding: 80px 20px;\n\tmargin-top: 50px !important;\n\tmargin-bottom: 50px !important;\n\n\t.wpblock-citation-citation {\n\t\tfont-weight: 600;\n\t\tfont-size: 50px;\n\t\tline-height: 1.2;\n\t\ttext-transform: unset;\n\t\tpadding-bottom: 50px;\n\t}\n\t.wpblock-citation-author {\n\t\tpadding-top: 20px;\n\t}\n\n\t.wpblock-citation-citation,\n\t.wpblock-citation-author {\n\t\tmax-width: 1040px;\n\t\tmargin: 0;\n\t}\n\n\t&.text-align-right {\n\t\tpadding-right: 50px;\n\t\ttext-align: right;\n\t\t.wpblock-citation-citation,\n\t\t.wpblock-citation-author {\n\t\t\tmargin-left: auto;\n\t\t}\n\t}\n\t&.text-align-left {\n\t\tpadding-left: 50px;\n\t\ttext-align: left;\n\t}\n\t&.text-align-center {\n\t\ttext-align: center;\n\n\t\t.wpblock-citation-citation,\n\t\t.wpblock-citation-author {\n\t\t\tmargin: 0 auto;\n\t\t}\n\t}\n\n\tfigure,\n\timg {\n\t\twidth: 100%;\n\t\theight: 250px;\n\t}\n\timg {\n\t\tobject-fit: cover;\n\t\tfilter: brightness(0.3) grayscale(100%) sepia(100%) hue-rotate(200deg)\n\t\t\topacity(0.5);\n\t}\n}\n"],"names":[],"sourceRoot":""}
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"dynamic-posts/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/dynamic-posts/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"dynamic-posts/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/dynamic-posts/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""}
|
|
||||||
BIN
build/images/icon_feather_key.26c1f367.png
Normal file
BIN
build/images/icon_feather_key.26c1f367.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.2 KiB |
|
|
@ -1 +0,0 @@
|
||||||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => '69f74138a4f35373ed87');
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"nested-parent/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C;;;;ACPA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/nested-parent/nested-children/editor.scss","webpack://test-de-block/./src/nested-parent/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n","/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
||||||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'c7951a21a6ac6bb8b92d');
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"nested-parent/nested-children/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/nested-parent/nested-children/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"nested-parent/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C;;;;ACVA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/nested-parent/style.scss","webpack://test-de-block/./src/nested-parent/nested-children/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n","/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""}
|
|
||||||
27
build/points-cles/block.json
Normal file
27
build/points-cles/block.json
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||||
|
"apiVersion": 2,
|
||||||
|
"name": "homegrade-content-blocks/points-cles",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"title": "Points clés",
|
||||||
|
"category": "homegrade-blocks",
|
||||||
|
"description": "Bloc de points-cles",
|
||||||
|
"supports": {
|
||||||
|
"html": false
|
||||||
|
},
|
||||||
|
"textdomain": "homegrade-theme__bloks-texte-fonctionnel",
|
||||||
|
"editorScript": "file:./index.js",
|
||||||
|
"editorStyle": "file:./index.css",
|
||||||
|
"style": "file:./style-index.css",
|
||||||
|
"render": "file:./render.php",
|
||||||
|
"attributes": {
|
||||||
|
"currentGeneralThematiqueSlug": {
|
||||||
|
"type": "string",
|
||||||
|
"default": ""
|
||||||
|
},
|
||||||
|
"postTaxonomy": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "isolation"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
build/points-cles/index.asset.php
Normal file
1
build/points-cles/index.asset.php
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '05d6955f1f1abaca6f02');
|
||||||
37
build/points-cles/index.css
Normal file
37
build/points-cles/index.css
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*!********************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/points-cles/nested-children/editor.scss ***!
|
||||||
|
\********************************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
/**
|
||||||
|
* The following styles get applied inside the editor only.
|
||||||
|
*
|
||||||
|
* Replace them with your own styles or remove the file completely.
|
||||||
|
*/
|
||||||
|
.wp-block-create-block-blocka {
|
||||||
|
border: 1px dotted #f00;
|
||||||
|
}
|
||||||
|
/*!****************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/points-cles/editor.scss ***!
|
||||||
|
\****************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
/**
|
||||||
|
* The following styles get applied inside the editor only.
|
||||||
|
*
|
||||||
|
* Replace them with your own styles or remove the file completely.
|
||||||
|
*/
|
||||||
|
.wp-block-homegrade-content-blocks-points-cles ul li {
|
||||||
|
list-style: none !important;
|
||||||
|
display: flex;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
.wp-block-homegrade-content-blocks-points-cles ul li:before {
|
||||||
|
transform: translateY(6px);
|
||||||
|
flex-shrink: 0;
|
||||||
|
border-radius: 50%;
|
||||||
|
content: "";
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: red;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=index.css.map*/
|
||||||
1
build/points-cles/index.css.map
Normal file
1
build/points-cles/index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"points-cles/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C;;;;ACPA;;;;EAAA;AAQE;EACC;EACA;EACA;AAFH;AAIE;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAFH,C","sources":["webpack://test-de-block/./src/points-cles/nested-children/editor.scss","webpack://test-de-block/./src/points-cles/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n","/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-homegrade-content-blocks-points-cles {\n\tul {\n\t\tli {\n\t\t\tlist-style: none !important;\n\t\t\tdisplay: flex;\n\t\t\tpadding: 10px 0;\n\t\t}\n\t\tli:before {\n\t\t\ttransform: translateY(6px);\n\t\t\tflex-shrink: 0;\n\t\t\tborder-radius: 50%;\n\t\t\tcontent: \"\";\n\t\t\twidth: 10px;\n\t\t\theight: 10px;\n\t\t\tdisplay: inline-block;\n\t\t\tbackground-color: red;\n\t\t\tmargin-right: 10px;\n\t\t}\n\t}\n}\n"],"names":[],"sourceRoot":""}
|
||||||
610
build/points-cles/index.js
Normal file
610
build/points-cles/index.js
Normal file
|
|
@ -0,0 +1,610 @@
|
||||||
|
/******/ (() => { // webpackBootstrap
|
||||||
|
/******/ "use strict";
|
||||||
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/edit.js":
|
||||||
|
/*!*********************************!*\
|
||||||
|
!*** ./src/points-cles/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 _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_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 _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/points-cles/editor.scss");
|
||||||
|
/* harmony import */ var _img_icon_feather_key_png__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./img/icon_feather_key.png */ "./src/points-cles/img/icon_feather_key.png");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function Edit({
|
||||||
|
attributes,
|
||||||
|
setAttributes
|
||||||
|
}) {
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||||
|
className: "wp-block-homegrade-content-blocks-points-cles"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||||
|
className: "wp-block-homegrade-content-blocks-points-cles__titling"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||||
|
className: "icon"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
|
||||||
|
src: _img_icon_feather_key_png__WEBPACK_IMPORTED_MODULE_4__
|
||||||
|
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Les points clés", "homegrade-theme__bloks-texte-fonctionnel"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InnerBlocks, {
|
||||||
|
allowedBlocks: ["core/list", "core/paragraph", "core/heading", "wpblocks-multiple/nested-children"],
|
||||||
|
template: [["core/paragraph"], ["core/list"]]
|
||||||
|
})));
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/index.js":
|
||||||
|
/*!**********************************!*\
|
||||||
|
!*** ./src/points-cles/index.js ***!
|
||||||
|
\**********************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* 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_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 _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||||
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
|
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ "./src/points-cles/style.scss");
|
||||||
|
/* harmony import */ var _nested_children__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./nested-children */ "./src/points-cles/nested-children/index.js");
|
||||||
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./edit */ "./src/points-cles/edit.js");
|
||||||
|
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./save */ "./src/points-cles/save.js");
|
||||||
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./block.json */ "./src/points-cles/block.json");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_7__.name, {
|
||||||
|
icon: {
|
||||||
|
src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
|
||||||
|
id: "Calque_2",
|
||||||
|
xmlns: "http://www.w3.org/2000/svg",
|
||||||
|
viewBox: "0 0 80 77.4"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
|
||||||
|
id: "Layer_1"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
||||||
|
d: "m80,66.17v-16.1c0-2.3-2.5-3.8-4.5-2.6l-14,8.1c-.9.5-1.5,1.5-1.5,2.6v16.2c0,2.3,2.5,3.8,4.5,2.6l14-8.1c.9-.6,1.5-1.6,1.5-2.7Z"
|
||||||
|
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
||||||
|
d: "m55.7,13.78l-14.2,8.2c-.9.5-2.1.5-3,0l-14.2-8.2c-2-1.2-2-4,0-5.2L38.5.38c.9-.5,2.1-.5,3,0l14.2,8.2c2,1.1,2,4,0,5.2Z"
|
||||||
|
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
||||||
|
d: "m58.7,19.68l-.7.4c-2,1.2-2,4,0,5.2l7.1,4.1c.9.5,1.5,1.5,1.5,2.6v7.6c0,2.3,2.5,3.8,4.5,2.6l.7-.4c.9-.5,1.5-1.5,1.5-2.6v-11c0-1.1-.6-2.1-1.5-2.6l-10.1-5.8c-.9-.6-2.1-.6-3-.1Z"
|
||||||
|
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
||||||
|
d: "m0,66.17v-16.1c0-2.3,2.5-3.8,4.5-2.6l14,8.1c.9.5,1.5,1.5,1.5,2.6v16.2c0,2.3-2.5,3.8-4.5,2.6l-14-8.1c-.9-.6-1.5-1.6-1.5-2.7Z"
|
||||||
|
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
||||||
|
d: "m21.3,19.68l.7.4c2,1.2,2,4,0,5.2l-7.1,4.1c-.9.5-1.5,1.5-1.5,2.6v7.6c0,2.3-2.5,3.8-4.5,2.6l-.7-.4c-.9-.5-1.5-1.5-1.5-2.6v-11.1c0-1.1.6-2.1,1.5-2.6l10.1-5.8c.9-.5,2.1-.5,3,0Z"
|
||||||
|
}))),
|
||||||
|
foreground: "#DF1E1E"
|
||||||
|
},
|
||||||
|
edit: _edit__WEBPACK_IMPORTED_MODULE_5__["default"],
|
||||||
|
save: _save__WEBPACK_IMPORTED_MODULE_6__["default"]
|
||||||
|
});
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/nested-children/edit.js":
|
||||||
|
/*!*************************************************!*\
|
||||||
|
!*** ./src/points-cles/nested-children/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 _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_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 _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/points-cles/nested-children/editor.scss");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function Edit({
|
||||||
|
attributes,
|
||||||
|
setAttributes
|
||||||
|
}) {
|
||||||
|
const {
|
||||||
|
userName,
|
||||||
|
userPosition
|
||||||
|
} = attributes;
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, {
|
||||||
|
className: "user-name",
|
||||||
|
onChange: value => setAttributes({
|
||||||
|
userName: value
|
||||||
|
}),
|
||||||
|
value: userName,
|
||||||
|
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("UserName Here", "text-box"),
|
||||||
|
tagName: "p",
|
||||||
|
allowedFormats: []
|
||||||
|
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, userPosition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/nested-children/index.js":
|
||||||
|
/*!**************************************************!*\
|
||||||
|
!*** ./src/points-cles/nested-children/index.js ***!
|
||||||
|
\**************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||||
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/points-cles/nested-children/style.scss");
|
||||||
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/points-cles/nested-children/block.json");
|
||||||
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/points-cles/nested-children/edit.js");
|
||||||
|
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/points-cles/nested-children/save.js");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_2__.name, {
|
||||||
|
title: _block_json__WEBPACK_IMPORTED_MODULE_2__.title,
|
||||||
|
icon: "smiley",
|
||||||
|
category: "wpblock-blocks",
|
||||||
|
parent: ["wpblocks-multiple/nested-parent"],
|
||||||
|
supports: _block_json__WEBPACK_IMPORTED_MODULE_2__.supports,
|
||||||
|
attributes: _block_json__WEBPACK_IMPORTED_MODULE_2__.attributes,
|
||||||
|
edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"],
|
||||||
|
save: _save__WEBPACK_IMPORTED_MODULE_4__["default"]
|
||||||
|
});
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/nested-children/save.js":
|
||||||
|
/*!*************************************************!*\
|
||||||
|
!*** ./src/points-cles/nested-children/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 _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_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({
|
||||||
|
attributes
|
||||||
|
}) {
|
||||||
|
const {
|
||||||
|
userName,
|
||||||
|
userPosition
|
||||||
|
} = attributes;
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, {
|
||||||
|
tagName: "h2",
|
||||||
|
value: userName,
|
||||||
|
className: "mydummytext"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/save.js":
|
||||||
|
/*!*********************************!*\
|
||||||
|
!*** ./src/points-cles/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 _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_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__);
|
||||||
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||||
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
|
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||||
|
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
|
||||||
|
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utilities.js */ "./utilities.js");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// pour les querry
|
||||||
|
|
||||||
|
function save({
|
||||||
|
attributes,
|
||||||
|
setAttributes
|
||||||
|
}) {
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||||
|
className: "wp-block-homegrade-content-blocks-points-cles"
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Les points clés", "homegrade-theme__bloks-texte-fonctionnel")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./utilities.js":
|
||||||
|
/*!**********************!*\
|
||||||
|
!*** ./utilities.js ***!
|
||||||
|
\**********************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ getThematiqueFamilySlug: () => (/* binding */ getThematiqueFamilySlug),
|
||||||
|
/* harmony export */ lol: () => (/* binding */ lol)
|
||||||
|
/* harmony export */ });
|
||||||
|
function lol(params) {
|
||||||
|
console.log("lol" + params);
|
||||||
|
}
|
||||||
|
function getThematiqueFamilySlug(thematique_slug) {
|
||||||
|
switch (thematique_slug) {
|
||||||
|
case "energie":
|
||||||
|
case "urbanisme":
|
||||||
|
return "energies-urbanisme";
|
||||||
|
case "acoustique":
|
||||||
|
case "petites-coproprietes":
|
||||||
|
return "acoustique-coproprietes";
|
||||||
|
case "isolation":
|
||||||
|
case "au-quotidien":
|
||||||
|
return "isolation-quotidien";
|
||||||
|
case "energies":
|
||||||
|
case "urbanisme":
|
||||||
|
return "energies-urbanisme";
|
||||||
|
case "patrimoine":
|
||||||
|
case "renovation":
|
||||||
|
return "patrimoine-renovation";
|
||||||
|
case "location":
|
||||||
|
return "location";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/editor.scss":
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** ./src/points-cles/editor.scss ***!
|
||||||
|
\*************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/nested-children/editor.scss":
|
||||||
|
/*!*****************************************************!*\
|
||||||
|
!*** ./src/points-cles/nested-children/editor.scss ***!
|
||||||
|
\*****************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/nested-children/style.scss":
|
||||||
|
/*!****************************************************!*\
|
||||||
|
!*** ./src/points-cles/nested-children/style.scss ***!
|
||||||
|
\****************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/style.scss":
|
||||||
|
/*!************************************!*\
|
||||||
|
!*** ./src/points-cles/style.scss ***!
|
||||||
|
\************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/img/icon_feather_key.png":
|
||||||
|
/*!**************************************************!*\
|
||||||
|
!*** ./src/points-cles/img/icon_feather_key.png ***!
|
||||||
|
\**************************************************/
|
||||||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
module.exports = __webpack_require__.p + "images/icon_feather_key.26c1f367.png";
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/block-editor":
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** external ["wp","blockEditor"] ***!
|
||||||
|
\*************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["blockEditor"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/blocks":
|
||||||
|
/*!********************************!*\
|
||||||
|
!*** external ["wp","blocks"] ***!
|
||||||
|
\********************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["blocks"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/data":
|
||||||
|
/*!******************************!*\
|
||||||
|
!*** external ["wp","data"] ***!
|
||||||
|
\******************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["data"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/element":
|
||||||
|
/*!*********************************!*\
|
||||||
|
!*** external ["wp","element"] ***!
|
||||||
|
\*********************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["element"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/i18n":
|
||||||
|
/*!******************************!*\
|
||||||
|
!*** external ["wp","i18n"] ***!
|
||||||
|
\******************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["i18n"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/block.json":
|
||||||
|
/*!************************************!*\
|
||||||
|
!*** ./src/points-cles/block.json ***!
|
||||||
|
\************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/points-cles","version":"0.1.0","title":"Points clés","category":"homegrade-blocks","description":"Bloc de points-cles","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"currentGeneralThematiqueSlug":{"type":"string","default":""},"postTaxonomy":{"type":"string","default":"isolation"}}}');
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/points-cles/nested-children/block.json":
|
||||||
|
/*!****************************************************!*\
|
||||||
|
!*** ./src/points-cles/nested-children/block.json ***!
|
||||||
|
\****************************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/nested-children","version":"0.1.0","title":"Nested Childrenes","category":"wpblock-blocks","icon":{"background":"#0414eb","foreground":"#fff","src":"admin-plugins"},"description":"Children Nested. #ChildrenNested","supports":{"html":false,"reusable":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"userName":{"type":"string"},"userPosition":{"type":"string"}}}');
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
|
||||||
|
/******/ });
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ // 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/global */
|
||||||
|
/******/ (() => {
|
||||||
|
/******/ __webpack_require__.g = (function() {
|
||||||
|
/******/ if (typeof globalThis === 'object') return globalThis;
|
||||||
|
/******/ try {
|
||||||
|
/******/ return this || new Function('return this')();
|
||||||
|
/******/ } catch (e) {
|
||||||
|
/******/ if (typeof window === 'object') return window;
|
||||||
|
/******/ }
|
||||||
|
/******/ })();
|
||||||
|
/******/ })();
|
||||||
|
/******/
|
||||||
|
/******/ /* 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/publicPath */
|
||||||
|
/******/ (() => {
|
||||||
|
/******/ var scriptUrl;
|
||||||
|
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
||||||
|
/******/ var document = __webpack_require__.g.document;
|
||||||
|
/******/ if (!scriptUrl && document) {
|
||||||
|
/******/ if (document.currentScript)
|
||||||
|
/******/ scriptUrl = document.currentScript.src;
|
||||||
|
/******/ if (!scriptUrl) {
|
||||||
|
/******/ var scripts = document.getElementsByTagName("script");
|
||||||
|
/******/ if(scripts.length) {
|
||||||
|
/******/ var i = scripts.length - 1;
|
||||||
|
/******/ while (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;
|
||||||
|
/******/ }
|
||||||
|
/******/ }
|
||||||
|
/******/ }
|
||||||
|
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
|
||||||
|
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
|
||||||
|
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
||||||
|
/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
||||||
|
/******/ __webpack_require__.p = scriptUrl + "../";
|
||||||
|
/******/ })();
|
||||||
|
/******/
|
||||||
|
/******/ /* 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 = {
|
||||||
|
/******/ "points-cles/index": 0,
|
||||||
|
/******/ "points-cles/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["webpackChunktest_de_block"] = globalThis["webpackChunktest_de_block"] || [];
|
||||||
|
/******/ 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, ["points-cles/style-index"], () => (__webpack_require__("./src/points-cles/index.js")))
|
||||||
|
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||||
|
/******/
|
||||||
|
/******/ })()
|
||||||
|
;
|
||||||
|
//# sourceMappingURL=index.js.map
|
||||||
1
build/points-cles/index.js.map
Normal file
1
build/points-cles/index.js.map
Normal file
File diff suppressed because one or more lines are too long
1
build/points-cles/nested-children/index.asset.php
Normal file
1
build/points-cles/nested-children/index.asset.php
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'bbbb6eac35093e2148e5');
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*!**********************************************************************************************************************************************************************************************************************************************************************!*\
|
/*!********************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/nested-parent/nested-children/editor.scss ***!
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/points-cles/nested-children/editor.scss ***!
|
||||||
\**********************************************************************************************************************************************************************************************************************************************************************/
|
\********************************************************************************************************************************************************************************************************************************************************************/
|
||||||
/**
|
/**
|
||||||
* The following styles get applied inside the editor only.
|
* The following styles get applied inside the editor only.
|
||||||
*
|
*
|
||||||
1
build/points-cles/nested-children/index.css.map
Normal file
1
build/points-cles/nested-children/index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"points-cles/nested-children/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/points-cles/nested-children/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
/******/ "use strict";
|
/******/ "use strict";
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/edit.js":
|
/***/ "./src/points-cles/nested-children/edit.js":
|
||||||
/*!***************************************************!*\
|
/*!*************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/edit.js ***!
|
!*** ./src/points-cles/nested-children/edit.js ***!
|
||||||
\***************************************************/
|
\*************************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -18,7 +18,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/nested-parent/nested-children/editor.scss");
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/points-cles/nested-children/editor.scss");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -45,19 +45,19 @@ function Edit({
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/index.js":
|
/***/ "./src/points-cles/nested-children/index.js":
|
||||||
/*!****************************************************!*\
|
/*!**************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/index.js ***!
|
!*** ./src/points-cles/nested-children/index.js ***!
|
||||||
\****************************************************/
|
\**************************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/nested-parent/nested-children/style.scss");
|
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/points-cles/nested-children/style.scss");
|
||||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/nested-parent/nested-children/block.json");
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/points-cles/nested-children/block.json");
|
||||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/nested-parent/nested-children/edit.js");
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/points-cles/nested-children/edit.js");
|
||||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/nested-parent/nested-children/save.js");
|
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/points-cles/nested-children/save.js");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -76,10 +76,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/save.js":
|
/***/ "./src/points-cles/nested-children/save.js":
|
||||||
/*!***************************************************!*\
|
/*!*************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/save.js ***!
|
!*** ./src/points-cles/nested-children/save.js ***!
|
||||||
\***************************************************/
|
\*************************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -108,10 +108,10 @@ function save({
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/editor.scss":
|
/***/ "./src/points-cles/nested-children/editor.scss":
|
||||||
/*!*******************************************************!*\
|
/*!*****************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/editor.scss ***!
|
!*** ./src/points-cles/nested-children/editor.scss ***!
|
||||||
\*******************************************************/
|
\*****************************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -120,10 +120,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/style.scss":
|
/***/ "./src/points-cles/nested-children/style.scss":
|
||||||
/*!******************************************************!*\
|
/*!****************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/style.scss ***!
|
!*** ./src/points-cles/nested-children/style.scss ***!
|
||||||
\******************************************************/
|
\****************************************************/
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
|
@ -172,10 +172,10 @@ module.exports = window["wp"]["i18n"];
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/nested-parent/nested-children/block.json":
|
/***/ "./src/points-cles/nested-children/block.json":
|
||||||
/*!******************************************************!*\
|
/*!****************************************************!*\
|
||||||
!*** ./src/nested-parent/nested-children/block.json ***!
|
!*** ./src/points-cles/nested-children/block.json ***!
|
||||||
\******************************************************/
|
\****************************************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/nested-children","version":"0.1.0","title":"Nested Childrenes","category":"wpblock-blocks","icon":{"background":"#0414eb","foreground":"#fff","src":"admin-plugins"},"description":"Children Nested. #ChildrenNested","supports":{"html":false,"reusable":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"userName":{"type":"string"},"userPosition":{"type":"string"}}}');
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/nested-children","version":"0.1.0","title":"Nested Childrenes","category":"wpblock-blocks","icon":{"background":"#0414eb","foreground":"#fff","src":"admin-plugins"},"description":"Children Nested. #ChildrenNested","supports":{"html":false,"reusable":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"userName":{"type":"string"},"userPosition":{"type":"string"}}}');
|
||||||
|
|
@ -292,8 +292,8 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
|
||||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||||
/******/ var installedChunks = {
|
/******/ var installedChunks = {
|
||||||
/******/ "nested-parent/nested-children/index": 0,
|
/******/ "points-cles/nested-children/index": 0,
|
||||||
/******/ "nested-parent/style-index": 0
|
/******/ "points-cles/style-index": 0
|
||||||
/******/ };
|
/******/ };
|
||||||
/******/
|
/******/
|
||||||
/******/ // no chunk on demand loading
|
/******/ // no chunk on demand loading
|
||||||
|
|
@ -343,7 +343,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
|
||||||
/******/ // startup
|
/******/ // startup
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["nested-parent/style-index"], () => (__webpack_require__("./src/nested-parent/nested-children/index.js")))
|
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["points-cles/style-index"], () => (__webpack_require__("./src/points-cles/nested-children/index.js")))
|
||||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||||
/******/
|
/******/
|
||||||
/******/ })()
|
/******/ })()
|
||||||
1
build/points-cles/nested-children/index.js.map
Normal file
1
build/points-cles/nested-children/index.js.map
Normal file
File diff suppressed because one or more lines are too long
22
build/points-cles/render.php
Normal file
22
build/points-cles/render.php
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
// $attributes = get_block_attributes();
|
||||||
|
// echo '<pre>';
|
||||||
|
// print_r($block);
|
||||||
|
// echo '</pre>';
|
||||||
|
|
||||||
|
$inner_blocks_html = '';
|
||||||
|
foreach ($block->inner_blocks as $inner_block) {
|
||||||
|
$inner_blocks_html .= $inner_block->render();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<section class="wp-block-homegrade-content-blocks-points-cles">
|
||||||
|
<div class="wp-block-homegrade-content-blocks-points-cles__titling">
|
||||||
|
<div class="icon">
|
||||||
|
<img src="<?php echo plugin_dir_url(dirname(__DIR__)) ?>src/points-cles/img/icon_feather_key.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<h3 class=""><?php echo __("Les points clés", "homegrade-theme__blocks-texte-fonctionnel") ?></h3>
|
||||||
|
</div>
|
||||||
|
<?php echo $inner_blocks_html ?>
|
||||||
|
|
||||||
|
|
||||||
|
</section>
|
||||||
59
build/points-cles/style-index.css
Normal file
59
build/points-cles/style-index.css
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
/*!***************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/points-cles/style.scss ***!
|
||||||
|
\***************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
/**
|
||||||
|
* The following styles get applied both on the front of your site
|
||||||
|
* and in the editor.
|
||||||
|
*
|
||||||
|
* Replace them with your own styles or remove the file completely.
|
||||||
|
*/
|
||||||
|
.wp-block-homegrade-content-blocks-points-cles {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
.wp-block-homegrade-content-blocks-points-cles__titling {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.wp-block-homegrade-content-blocks-points-cles__titling .icon {
|
||||||
|
background-color: black;
|
||||||
|
border-radius: 50%;
|
||||||
|
aspect-ratio: 1/1;
|
||||||
|
width: 40px;
|
||||||
|
padding: 10px;
|
||||||
|
height: -moz-fit-content;
|
||||||
|
height: fit-content;
|
||||||
|
}
|
||||||
|
.wp-block-homegrade-content-blocks-points-cles__titling .icon img {
|
||||||
|
width: 30px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.wp-block-homegrade-content-blocks-points-cles__titling h3 {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
.wp-block-homegrade-content-blocks-points-cles ul li {
|
||||||
|
list-style-type: disc;
|
||||||
|
list-style-position: inside;
|
||||||
|
margin-left: 1.5em;
|
||||||
|
}
|
||||||
|
.wp-block-homegrade-content-blocks-points-cles p + ul {
|
||||||
|
padding-top: 16px;
|
||||||
|
}
|
||||||
|
.wp-block-homegrade-content-blocks-points-cles ul + p {
|
||||||
|
padding-top: 16px;
|
||||||
|
}
|
||||||
|
/*!*******************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/points-cles/nested-children/style.scss ***!
|
||||||
|
\*******************************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
/**
|
||||||
|
* The following styles get applied both on the front of your site
|
||||||
|
* and in the editor.
|
||||||
|
*
|
||||||
|
* Replace them with your own styles or remove the file completely.
|
||||||
|
*/
|
||||||
|
.wp-block-create-block-blocka {
|
||||||
|
background-color: #21759b;
|
||||||
|
color: #fff;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=style-index.css.map*/
|
||||||
1
build/points-cles/style-index.css.map
Normal file
1
build/points-cles/style-index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"points-cles/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;AAAD;AACC;EACC;EACA;AACF;AAAE;EACC;EACA;EACA;EACA;EACA;EACA;EAAA;AAEH;AAAG;EACC;EACA;AAEJ;AACE;EACC;AACH;AAGC;EACC;EACA;EAEA;AAFF;AAKC;EACC;AAHF;AAKC;EACC;AAHF,C;;;;ACtCA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/points-cles/style.scss","webpack://test-de-block/./src/points-cles/nested-children/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-homegrade-content-blocks-points-cles {\n\tmargin-bottom: 2rem;\n\t&__titling {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t.icon {\n\t\t\tbackground-color: black;\n\t\t\tborder-radius: 50%;\n\t\t\taspect-ratio: 1/1;\n\t\t\twidth: 40px;\n\t\t\tpadding: 10px;\n\t\t\theight: fit-content;\n\n\t\t\timg {\n\t\t\t\twidth: 30px;\n\t\t\t\theight: auto;\n\t\t\t}\n\t\t}\n\t\th3 {\n\t\t\tpadding-left: 10px;\n\t\t}\n\t}\n\n\tul li {\n\t\tlist-style-type: disc;\n\t\tlist-style-position: inside;\n\t\t// display: flex;\n\t\tmargin-left: 1.5em;\n\t}\n\n\tp + ul {\n\t\tpadding-top: 16px;\n\t}\n\tul + p {\n\t\tpadding-top: 16px;\n\t}\n}\n","/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""}
|
||||||
31
build/questions-container-auto/block.json
Normal file
31
build/questions-container-auto/block.json
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||||
|
"apiVersion": 2,
|
||||||
|
"name": "homegrade-content-blocks/questions-container-auto",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"title": "Bloc Questions Auto",
|
||||||
|
"category": "homegrade-blocks",
|
||||||
|
"icon": {
|
||||||
|
"background": "#fff",
|
||||||
|
"foreground": "#DF1E1E",
|
||||||
|
"src": "feedback"
|
||||||
|
},
|
||||||
|
"description": "Pour intégrer le contenu d'une fiche de questions dans une page conseils",
|
||||||
|
"supports": {
|
||||||
|
"html": false
|
||||||
|
},
|
||||||
|
"textdomain": "homegrade-theme__bloks-texte-fonctionnel",
|
||||||
|
"editorScript": "file:./index.js",
|
||||||
|
"editorStyle": "file:./index.css",
|
||||||
|
"style": "file:./style-index.css",
|
||||||
|
"render": "file:./render.php",
|
||||||
|
"attributes": {
|
||||||
|
"relatedPostId": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"montexte": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "truc"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
build/questions-container-auto/index.asset.php
Normal file
1
build/questions-container-auto/index.asset.php
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'b018718de6d4a0e7b9ad');
|
||||||
13
build/questions-container-auto/index.css
Normal file
13
build/questions-container-auto/index.css
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/questions-container-auto/editor.scss ***!
|
||||||
|
\*****************************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
/**
|
||||||
|
* The following styles get applied inside the editor only.
|
||||||
|
*
|
||||||
|
* Replace them with your own styles or remove the file completely.
|
||||||
|
*/
|
||||||
|
.wp-block-create-block-wpblock-latest-posts {
|
||||||
|
border: 1px dotted #f00;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=index.css.map*/
|
||||||
1
build/questions-container-auto/index.css.map
Normal file
1
build/questions-container-auto/index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"questions-container-auto/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/questions-container-auto/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
|
||||||
402
build/questions-container-auto/index.js
Normal file
402
build/questions-container-auto/index.js
Normal file
|
|
@ -0,0 +1,402 @@
|
||||||
|
/******/ (() => { // webpackBootstrap
|
||||||
|
/******/ "use strict";
|
||||||
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
|
/***/ "./src/questions-container-auto/edit.js":
|
||||||
|
/*!**********************************************!*\
|
||||||
|
!*** ./src/questions-container-auto/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 _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_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 _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||||
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
|
||||||
|
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||||
|
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
|
||||||
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./editor.scss */ "./src/questions-container-auto/editor.scss");
|
||||||
|
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch");
|
||||||
|
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// pour les querry
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function Edit({
|
||||||
|
attributes,
|
||||||
|
setAttributes
|
||||||
|
}) {
|
||||||
|
const {
|
||||||
|
relatedPostId,
|
||||||
|
montexte
|
||||||
|
} = attributes;
|
||||||
|
// console.log(montexte);
|
||||||
|
|
||||||
|
function handleRelatedPostChange(postId) {
|
||||||
|
setAttributes({
|
||||||
|
relatedPostId: Number(postId),
|
||||||
|
montexte: "test"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
let [taxonomiesOptions, setTaxonomiesOptions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
||||||
|
let postTaxonomies = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select("core/editor").getCurrentPostAttribute("thematiques"));
|
||||||
|
let postMainTaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select("core").getEntityRecord("taxonomy", "thematiques", postTaxonomies[0]), [postTaxonomies]);
|
||||||
|
let postParentTaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => {
|
||||||
|
if (postMainTaxonomy) {
|
||||||
|
return select("core").getEntityRecord("taxonomy", "thematiques", postMainTaxonomy.parent);
|
||||||
|
}
|
||||||
|
}, [postMainTaxonomy]);
|
||||||
|
let relatedPostsOptions = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => {
|
||||||
|
if (postMainTaxonomy) {
|
||||||
|
return select("core").getEntityRecords("postType", "fiche-questions", {
|
||||||
|
per_page: -1,
|
||||||
|
_embed: true,
|
||||||
|
thematiques: postMainTaxonomy.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [postMainTaxonomy]);
|
||||||
|
let currentRelatedPost = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => {
|
||||||
|
return select("core").getEntityRecord("postType", "fiche-questions", relatedPostId);
|
||||||
|
});
|
||||||
|
const {
|
||||||
|
relatedPosts
|
||||||
|
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => {
|
||||||
|
const {
|
||||||
|
getEntityRecords
|
||||||
|
} = select("core");
|
||||||
|
let query = {};
|
||||||
|
if (postMainTaxonomy) {
|
||||||
|
// Query args
|
||||||
|
query = {
|
||||||
|
status: "publish",
|
||||||
|
per_page: -1,
|
||||||
|
thematiques: postMainTaxonomy ? postMainTaxonomy.id : null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
relatedPosts: getEntityRecords("postType", "fiche-questions", query)
|
||||||
|
};
|
||||||
|
});
|
||||||
|
// if (relatedPosts) {
|
||||||
|
// let test = relatedPosts.map(({ item }) => <p>{item.title.rendered}</p>);
|
||||||
|
// }
|
||||||
|
let relatedPostsContent;
|
||||||
|
if (relatedPosts) {
|
||||||
|
relatedPostsContent = relatedPosts.map(post => {
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, post.title.rendered), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.RawHTML, null, post.content.raw));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!relatedPostsOptions) {
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "chargement\u2026"));
|
||||||
|
}
|
||||||
|
console.log(relatedPostId);
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, relatedPosts && relatedPosts.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, relatedPostsContent), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps, !relatedPostId && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.", "homegrade-theme__blocks-texte-fonctionnel"))), currentRelatedPost && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, currentRelatedPost.title.rendered), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.RawHTML, null, currentRelatedPost.content.raw))));
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/questions-container-auto/index.js":
|
||||||
|
/*!***********************************************!*\
|
||||||
|
!*** ./src/questions-container-auto/index.js ***!
|
||||||
|
\***********************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||||
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/questions-container-auto/style.scss");
|
||||||
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/questions-container-auto/edit.js");
|
||||||
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/questions-container-auto/block.json");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_3__.name, {
|
||||||
|
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"]
|
||||||
|
});
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/questions-container-auto/editor.scss":
|
||||||
|
/*!**************************************************!*\
|
||||||
|
!*** ./src/questions-container-auto/editor.scss ***!
|
||||||
|
\**************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/questions-container-auto/style.scss":
|
||||||
|
/*!*************************************************!*\
|
||||||
|
!*** ./src/questions-container-auto/style.scss ***!
|
||||||
|
\*************************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/api-fetch":
|
||||||
|
/*!**********************************!*\
|
||||||
|
!*** external ["wp","apiFetch"] ***!
|
||||||
|
\**********************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["apiFetch"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/block-editor":
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** external ["wp","blockEditor"] ***!
|
||||||
|
\*************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["blockEditor"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/blocks":
|
||||||
|
/*!********************************!*\
|
||||||
|
!*** external ["wp","blocks"] ***!
|
||||||
|
\********************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["blocks"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/components":
|
||||||
|
/*!************************************!*\
|
||||||
|
!*** external ["wp","components"] ***!
|
||||||
|
\************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["components"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/data":
|
||||||
|
/*!******************************!*\
|
||||||
|
!*** external ["wp","data"] ***!
|
||||||
|
\******************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["data"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/element":
|
||||||
|
/*!*********************************!*\
|
||||||
|
!*** external ["wp","element"] ***!
|
||||||
|
\*********************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["element"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/i18n":
|
||||||
|
/*!******************************!*\
|
||||||
|
!*** external ["wp","i18n"] ***!
|
||||||
|
\******************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["i18n"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/questions-container-auto/block.json":
|
||||||
|
/*!*************************************************!*\
|
||||||
|
!*** ./src/questions-container-auto/block.json ***!
|
||||||
|
\*************************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/questions-container-auto","version":"0.1.0","title":"Bloc Questions Auto","category":"homegrade-blocks","icon":{"background":"#fff","foreground":"#DF1E1E","src":"feedback"},"description":"Pour intégrer le contenu d\'une fiche de questions dans une page conseils","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"relatedPostId":{"type":"number"},"montexte":{"type":"string","default":"truc"}}}');
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
|
||||||
|
/******/ });
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ // 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 = {
|
||||||
|
/******/ "questions-container-auto/index": 0,
|
||||||
|
/******/ "questions-container-auto/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["webpackChunktest_de_block"] = globalThis["webpackChunktest_de_block"] || [];
|
||||||
|
/******/ 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, ["questions-container-auto/style-index"], () => (__webpack_require__("./src/questions-container-auto/index.js")))
|
||||||
|
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||||
|
/******/
|
||||||
|
/******/ })()
|
||||||
|
;
|
||||||
|
//# sourceMappingURL=index.js.map
|
||||||
1
build/questions-container-auto/index.js.map
Normal file
1
build/questions-container-auto/index.js.map
Normal file
File diff suppressed because one or more lines are too long
27
build/questions-container-auto/render.php
Normal file
27
build/questions-container-auto/render.php
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$relatedPostId = $attributes['relatedPostId'];
|
||||||
|
$relatedPost = get_post($relatedPostId);
|
||||||
|
|
||||||
|
$term = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||||
|
|
||||||
|
$relatedPosts = get_posts(array(
|
||||||
|
'post_per_page' => 30,
|
||||||
|
'post_status' => 'publish',
|
||||||
|
'post_type' => 'fiche-questions',
|
||||||
|
'thematiques' => $term->ID,
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<section class="questions-container-block">
|
||||||
|
|
||||||
|
<?php foreach ($relatedPosts as $post) : ?>
|
||||||
|
<article class="questions-container-block__question-content">
|
||||||
|
<h2><?php echo $post->post_title ?></h2>
|
||||||
|
<div><?php echo $post->post_content ?></div>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
</section>
|
||||||
17
build/questions-container-auto/style-index.css
Normal file
17
build/questions-container-auto/style-index.css
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*!****************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/questions-container-auto/style.scss ***!
|
||||||
|
\****************************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
/**
|
||||||
|
* The following styles get applied both on the front of your site
|
||||||
|
* and in the editor.
|
||||||
|
*
|
||||||
|
* Replace them with your own styles or remove the file completely.
|
||||||
|
*/
|
||||||
|
.questions-container-block__question-content {
|
||||||
|
padding: 10px 0 30px 0;
|
||||||
|
}
|
||||||
|
.questions-container-block h2 {
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=style-index.css.map*/
|
||||||
1
build/questions-container-auto/style-index.css.map
Normal file
1
build/questions-container-auto/style-index.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"questions-container-auto/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAQC;EACC;AADF;AAIC;EACC;AAFF,C","sources":["webpack://test-de-block/./src/questions-container-auto/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.questions-container-block {\n\t&__question-content {\n\t\tpadding: 10px 0 30px 0;\n\t}\n\n\th2 {\n\t\tfont-weight: 800;\n\t}\n}\n"],"names":[],"sourceRoot":""}
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"name": "homegrade-content-blocks/questions-container",
|
"name": "homegrade-content-blocks/questions-container",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"title": "Bloc Questions",
|
"title": "Bloc Questions",
|
||||||
"category": "wpblock-blocks",
|
"category": "homegrade-blocks",
|
||||||
"icon": {
|
"icon": {
|
||||||
"background": "#fff",
|
"background": "#fff",
|
||||||
"foreground": "#DF1E1E",
|
"foreground": "#DF1E1E",
|
||||||
|
|
@ -14,9 +14,18 @@
|
||||||
"supports": {
|
"supports": {
|
||||||
"html": false
|
"html": false
|
||||||
},
|
},
|
||||||
"textdomain": "wpblock-latest-posts",
|
"textdomain": "homegrade-theme__bloks-texte-fonctionnel",
|
||||||
"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",
|
||||||
"render": "file:./render.php"
|
"render": "file:./render.php",
|
||||||
|
"attributes": {
|
||||||
|
"relatedPostId": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"montexte": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "truc"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'a41ee85521c17cd88285');
|
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'ae1738942c42186da566');
|
||||||
|
|
|
||||||
|
|
@ -38,73 +38,101 @@ function Edit({
|
||||||
attributes,
|
attributes,
|
||||||
setAttributes
|
setAttributes
|
||||||
}) {
|
}) {
|
||||||
const autocompleters = [{
|
var _ref;
|
||||||
name: "fruit",
|
const {
|
||||||
// The prefix that triggers this completer
|
relatedPostId,
|
||||||
triggerPrefix: "~",
|
montexte
|
||||||
// The option data
|
} = attributes;
|
||||||
options: [{
|
// console.log(montexte);
|
||||||
visual: "🍎",
|
|
||||||
name: "Apple",
|
|
||||||
id: 1
|
|
||||||
}, {
|
|
||||||
visual: "🍊",
|
|
||||||
name: "Orange",
|
|
||||||
id: 2
|
|
||||||
}, {
|
|
||||||
visual: "🍇",
|
|
||||||
name: "Grapes",
|
|
||||||
id: 3
|
|
||||||
}],
|
|
||||||
// Returns a label for an option like "🍊 Orange"
|
|
||||||
getOptionLabel: option => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
|
|
||||||
className: "icon"
|
|
||||||
}, option.visual), option.name),
|
|
||||||
// Declares that options should be matched by their name
|
|
||||||
getOptionKeywords: option => [option.name],
|
|
||||||
// Declares that the Grapes option is disabled
|
|
||||||
isOptionDisabled: option => option.name === "Grapes",
|
|
||||||
// Declares completions should be inserted as abbreviations
|
|
||||||
getOptionCompletion: option => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("abbr", {
|
|
||||||
title: option.name
|
|
||||||
}, option.visual)
|
|
||||||
}];
|
|
||||||
let [taxonomiesOptions, setTaxonomiesOptions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
||||||
let relatedPosts = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select("core").getEntityRecords("postType", "fiche-questions", {
|
|
||||||
per_page: -1,
|
|
||||||
thematiques: 35
|
|
||||||
}));
|
|
||||||
|
|
||||||
// function getDatas() {
|
function handleRelatedPostChange(postId) {
|
||||||
// // Liste des questions sur la thématique courante
|
setAttributes({
|
||||||
|
relatedPostId: Number(postId),
|
||||||
// apiFetch({ path: "/wp/v2/thematiques?per_page=-1" }).then((terms) => {
|
montexte: "test"
|
||||||
// let notEmptyTaxs = terms.filter((term) => term.count > 0);
|
});
|
||||||
|
// console.log(typeof relatedPostId);
|
||||||
// setTaxonomiesOptions(notEmptyTaxs);
|
// console.log(relatedPostId);
|
||||||
// });
|
// console.log(montexte);
|
||||||
// }
|
|
||||||
|
|
||||||
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
||||||
// getDatas();
|
|
||||||
}, []);
|
|
||||||
if (relatedPosts) {
|
|
||||||
console.log(relatedPosts);
|
|
||||||
}
|
}
|
||||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Autocomplete, {
|
|
||||||
completers: autocompleters
|
let [taxonomiesOptions, setTaxonomiesOptions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
||||||
}, ({
|
let postTaxonomies = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select("core/editor").getCurrentPostAttribute("thematiques"));
|
||||||
isExpanded,
|
let postMainTaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select("core").getEntityRecord("taxonomy", "thematiques", postTaxonomies[0]), [postTaxonomies]);
|
||||||
listBoxId,
|
let postParentTaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => {
|
||||||
activeId
|
if (postMainTaxonomy) {
|
||||||
}) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
return select("core").getEntityRecord("taxonomy", "thematiques", postMainTaxonomy.parent);
|
||||||
contentEditable: true,
|
}
|
||||||
suppressContentEditableWarning: true,
|
}, [postMainTaxonomy]);
|
||||||
"aria-autocomplete": "list",
|
let currentGeneralThematique = (_ref = postParentTaxonomy !== null && postParentTaxonomy !== void 0 ? postParentTaxonomy : postMainTaxonomy) !== null && _ref !== void 0 ? _ref : null;
|
||||||
"aria-expanded": isExpanded,
|
let relatedPostsOptions = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => {
|
||||||
"aria-owns": listBoxId,
|
if (postMainTaxonomy) {
|
||||||
"aria-activedescendant": activeId
|
return select("core").getEntityRecords("postType", "fiche-questions", {
|
||||||
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "Type ~ for triggering the autocomplete."), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "test"));
|
per_page: -1,
|
||||||
|
_embed: true,
|
||||||
|
thematiques: postMainTaxonomy.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [postMainTaxonomy]);
|
||||||
|
let currentRelatedPost = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => {
|
||||||
|
return select("core").getEntityRecord("postType", "fiche-questions", relatedPostId);
|
||||||
|
});
|
||||||
|
const {
|
||||||
|
pages
|
||||||
|
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => {
|
||||||
|
const {
|
||||||
|
getEntityRecords
|
||||||
|
} = select("core");
|
||||||
|
let query = {};
|
||||||
|
if (postMainTaxonomy) {
|
||||||
|
// Query args
|
||||||
|
query = {
|
||||||
|
status: "publish",
|
||||||
|
per_page: -1,
|
||||||
|
thematiques: postMainTaxonomy ? postMainTaxonomy.id : null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
pages: getEntityRecords("postType", "fiche-questions", query)
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
// populate options for <SelectControl>
|
||||||
|
let options = [];
|
||||||
|
if (pages) {
|
||||||
|
options.push({
|
||||||
|
value: 0,
|
||||||
|
label: "Select a page"
|
||||||
|
});
|
||||||
|
pages.forEach(page => {
|
||||||
|
options.push({
|
||||||
|
value: page.id,
|
||||||
|
label: page.title.rendered
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
options.push({
|
||||||
|
value: 0,
|
||||||
|
label: "Loading..."
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (postMainTaxonomy) {
|
||||||
|
// console.log(postMainTaxonomy.id);
|
||||||
|
}
|
||||||
|
if (relatedPostsOptions) {
|
||||||
|
// console.log(relatedPostsOptions);
|
||||||
|
}
|
||||||
|
if (!relatedPostsOptions) {
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "chargement\u2026"));
|
||||||
|
}
|
||||||
|
console.log(relatedPostId);
|
||||||
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
|
||||||
|
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Question Relié", "homegrade-theme__bloks-texte-fonctionnel")
|
||||||
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.SelectControl, {
|
||||||
|
label: (postParentTaxonomy ? postParentTaxonomy.name + " | " : "") + postMainTaxonomy.name,
|
||||||
|
value: relatedPostId,
|
||||||
|
options: options,
|
||||||
|
onChange: e => handleRelatedPostChange(e)
|
||||||
|
}))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps, !relatedPostId && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.", "homegrade-theme__blocks-texte-fonctionnel"))), currentRelatedPost && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, currentRelatedPost.title.rendered), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.RawHTML, null, currentRelatedPost.content.raw))));
|
||||||
}
|
}
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
@ -231,7 +259,7 @@ module.exports = window["wp"]["i18n"];
|
||||||
\********************************************/
|
\********************************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/questions-container","version":"0.1.0","title":"Bloc Questions","category":"wpblock-blocks","icon":{"background":"#fff","foreground":"#DF1E1E","src":"feedback"},"description":"Pour intégrer le contenu d\'une fiche de questions dans une page conseils","supports":{"html":false},"textdomain":"wpblock-latest-posts","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php"}');
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/questions-container","version":"0.1.0","title":"Bloc Questions","category":"homegrade-blocks","icon":{"background":"#fff","foreground":"#DF1E1E","src":"feedback"},"description":"Pour intégrer le contenu d\'une fiche de questions dans une page conseils","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"relatedPostId":{"type":"number"},"montexte":{"type":"string","default":"truc"}}}');
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,9 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// $attributes = get_block_attributes();
|
|
||||||
|
$relatedPostId = $attributes['relatedPostId'];
|
||||||
|
$relatedPost = get_post($relatedPostId);
|
||||||
|
|
||||||
|
echo '<pre>';
|
||||||
|
// print_r($relatedPostID);
|
||||||
|
// print_r($relatedPost);
|
||||||
|
echo '</pre>';
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<section>
|
<section class="questions-container-block">
|
||||||
yo
|
<h2><?php echo $relatedPost->post_title ?></h2>
|
||||||
|
<?php echo $relatedPost->post_content ?>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -7,10 +7,8 @@
|
||||||
*
|
*
|
||||||
* Replace them with your own styles or remove the file completely.
|
* Replace them with your own styles or remove the file completely.
|
||||||
*/
|
*/
|
||||||
.wp-block-create-block-wpblock-latest-posts {
|
.questions-container-block h2 {
|
||||||
background-color: #21759b;
|
font-weight: 800;
|
||||||
color: #fff;
|
|
||||||
padding: 2px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*# sourceMappingURL=style-index.css.map*/
|
/*# sourceMappingURL=style-index.css.map*/
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"questions-container/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/questions-container/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""}
|
{"version":3,"file":"questions-container/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAQC;EACC;AADF,C","sources":["webpack://test-de-block/./src/questions-container/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.questions-container-block {\n\th2 {\n\t\tfont-weight: 800;\n\t}\n}\n"],"names":[],"sourceRoot":""}
|
||||||
|
|
@ -4,13 +4,13 @@
|
||||||
"name": "create-block/wpblock-citation",
|
"name": "create-block/wpblock-citation",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"title": "Wpblock Citation",
|
"title": "Wpblock Citation",
|
||||||
"category": "wpblock-blocks",
|
"category": "homegrade-blocks",
|
||||||
"icon": "smiley",
|
"icon": "smiley",
|
||||||
"description": "WPBlock de citation",
|
"description": "WPBlock de citation",
|
||||||
"supports": {
|
"supports": {
|
||||||
"html": false
|
"html": false
|
||||||
},
|
},
|
||||||
"textdomain": "wpblock-citation",
|
"textdomain": "homegrade-theme__bloks-texte-fonctionnel",
|
||||||
"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('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '321e3284a01706c81762');
|
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'b01194612b22d7be7531');
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,8 @@ function Edit({
|
||||||
textAlignment: newAlignment
|
textAlignment: newAlignment
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log(citation);
|
|
||||||
|
// console.log(citation);
|
||||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({
|
||||||
className: ` wpblock-citation-block text-align-${textAlignment}`,
|
className: ` wpblock-citation-block text-align-${textAlignment}`,
|
||||||
style: {
|
style: {
|
||||||
|
|
@ -303,7 +304,7 @@ function _extends() {
|
||||||
\*****************************************/
|
\*****************************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"create-block/wpblock-citation","version":"0.1.0","title":"Wpblock Citation","category":"wpblock-blocks","icon":"smiley","description":"WPBlock de citation","supports":{"html":false},"textdomain":"wpblock-citation","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"citation":{"type":"string","source":"html","selector":"h2"},"author":{"type":"string","source":"html","selector":"p"},"textAlignment":{"type":"string","default":"left"},"backgroundColor":{"type":"string","default":"#322f9c"},"textColor":{"type":"string","default":"#fff"}}}');
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"create-block/wpblock-citation","version":"0.1.0","title":"Wpblock Citation","category":"homegrade-blocks","icon":"smiley","description":"WPBlock de citation","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"citation":{"type":"string","source":"html","selector":"h2"},"author":{"type":"string","source":"html","selector":"p"},"textAlignment":{"type":"string","default":"left"},"backgroundColor":{"type":"string","default":"#322f9c"},"textColor":{"type":"string","default":"#fff"}}}');
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -4,7 +4,7 @@
|
||||||
"name": "create-block/wpblock-cover",
|
"name": "create-block/wpblock-cover",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"title": "Wpblock Cover",
|
"title": "Wpblock Cover",
|
||||||
"category": "wpblock-blocks",
|
"category": "homegrade-blocks",
|
||||||
"icon": {
|
"icon": {
|
||||||
"background": "#fff",
|
"background": "#fff",
|
||||||
"foreground": "#0414eb",
|
"foreground": "#0414eb",
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
"attribute": "src"
|
"attribute": "src"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"textdomain": "wpblock-cover",
|
"textdomain": "homegrade-theme__bloks-texte-fonctionnel",
|
||||||
"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('wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '529933f8df7f7b5f7f13');
|
<?php return array('dependencies' => array('wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'b5c155da42714eb35d8d');
|
||||||
|
|
|
||||||
|
|
@ -341,7 +341,7 @@ module.exports = window["wp"]["i18n"];
|
||||||
\**************************************/
|
\**************************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"create-block/wpblock-cover","version":"0.1.0","title":"Wpblock Cover","category":"wpblock-blocks","icon":{"background":"#fff","foreground":"#0414eb","src":"cover-image"},"description":"Example block scaffolded with Create Block tool.","supports":{"html":false},"attributes":{"coverId":{"type":"number"},"title":{"type":"string","source":"html","selector":"h2"},"subtitle":{"type":"string","source":"html","selector":"h3"},"coverAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"coverUrl":{"type":"string","source":"attribute","selector":"img","attribute":"src"}},"textdomain":"wpblock-cover","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');
|
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"create-block/wpblock-cover","version":"0.1.0","title":"Wpblock Cover","category":"homegrade-blocks","icon":{"background":"#fff","foreground":"#0414eb","src":"cover-image"},"description":"Example block scaffolded with Create Block tool.","supports":{"html":false},"attributes":{"coverId":{"type":"number"},"title":{"type":"string","source":"html","selector":"h2"},"subtitle":{"type":"string","source":"html","selector":"h3"},"coverAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"coverUrl":{"type":"string","source":"attribute","selector":"img","attribute":"src"}},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,26 +14,71 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
include_once('templates.php');
|
||||||
|
|
||||||
function create_block_test_de_block_block_init()
|
function create_block_test_de_block_block_init()
|
||||||
{
|
{
|
||||||
register_block_type(__DIR__ . '/build/blocka');
|
|
||||||
register_block_type(__DIR__ . '/build/questions-container');
|
|
||||||
register_block_type(__DIR__ . '/build/dynamic-posts');
|
|
||||||
register_block_type(__DIR__ . '/build/nested-parent');
|
|
||||||
register_block_type(__DIR__ . '/build/wpblock-cover');
|
|
||||||
register_block_type(__DIR__ . '/build/wpblock-citation');
|
|
||||||
register_block_type(__DIR__ . '/build/chapter-header');
|
register_block_type(__DIR__ . '/build/chapter-header');
|
||||||
|
register_block_type(__DIR__ . '/build/questions-container');
|
||||||
|
register_block_type(__DIR__ . '/build/questions-container-auto');
|
||||||
|
register_block_type(__DIR__ . '/build/content-heading');
|
||||||
|
register_block_type(__DIR__ . '/build/points-cles');
|
||||||
|
// register_block_type(__DIR__ . '/build/wpblock-cover');
|
||||||
|
// register_block_type(__DIR__ . '/build/wpblock-citation');
|
||||||
}
|
}
|
||||||
add_action('init', 'create_block_test_de_block_block_init');
|
add_action('init', 'create_block_test_de_block_block_init');
|
||||||
|
|
||||||
|
|
||||||
|
function homegrade_allowed_block_types($allowed_blocks, $editor_context)
|
||||||
|
{
|
||||||
|
if ('conseils' === $editor_context->post->post_type) {
|
||||||
|
$allowed_blocks = array(
|
||||||
|
'core/paragraph',
|
||||||
|
'core/list',
|
||||||
|
'core/list-item',
|
||||||
|
'homegrade-content-blocks/chapter-header',
|
||||||
|
'homegrade-content-blocks/points-cles',
|
||||||
|
'homegrade-content-blocks/questions-container'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
add_filter('homegrade_allowed_block_types', 'misha_allowed_block_types', 25, 2);
|
||||||
|
|
||||||
|
if ('fiche-questions' === $editor_context->post->post_type) {
|
||||||
|
$allowed_blocks = array(
|
||||||
|
'core/paragraph',
|
||||||
|
'core/heading',
|
||||||
|
'core/list',
|
||||||
|
'core/list-item',
|
||||||
|
'homegrade-content-blocks/chapter-header',
|
||||||
|
'homegrade-content-blocks/points-cles',
|
||||||
|
'homegrade-content-blocks/questions-container'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $allowed_blocks;
|
||||||
|
|
||||||
|
####ONLY DEREGISTER FEW BLOCKS
|
||||||
|
// get all the registered blocks
|
||||||
|
// $blocks = WP_Block_Type_Registry::get_instance()->get_all_registered();
|
||||||
|
|
||||||
|
// then disable some of them
|
||||||
|
// unset($blocks['core/paragraph']);
|
||||||
|
// unset($blocks['core/heading']);
|
||||||
|
|
||||||
|
// return the new list of allowed blocks
|
||||||
|
// return array_keys($blocks);
|
||||||
|
}
|
||||||
|
|
||||||
function wpblock_add_block_categories($categories)
|
function wpblock_add_block_categories($categories)
|
||||||
{
|
{
|
||||||
return array_merge(
|
return array_merge(
|
||||||
|
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
'slug' => 'wpblock-blocks',
|
'slug' => 'homegrade-blocks',
|
||||||
'title' => __('WpBlocks Serie ', 'block-course'),
|
'title' => __('Blocs Homegrade ', 'block-course'),
|
||||||
'icon' => 'heart',
|
'icon' => 'heart',
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
@ -41,7 +86,21 @@ function wpblock_add_block_categories($categories)
|
||||||
$categories
|
$categories
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
add_action('block_categories', 'wpblock_add_block_categories', 10, 2);
|
add_action('block_categories', 'wpblock_add_block_categories', 25, 2);
|
||||||
|
|
||||||
|
|
||||||
|
function blocks_course_plugin_enqueue_assets()
|
||||||
|
{
|
||||||
|
$asset_file = include(plugin_dir_path(__FILE__) . 'build/index.asset.php');
|
||||||
|
wp_enqueue_script('homegrade-content-blocks', plugins_url('build/filters/filters.js', __FILE__), $asset_file['dependencies'], $asset_file['version']);
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action('enqueue_block_editor_assets', 'blocks_course_plugin_enqueue_assets');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (function_exists("getThematiqueFamilySlug")) {
|
if (function_exists("getThematiqueFamilySlug")) {
|
||||||
function getThematiqueFamilySlug($thematique_slug)
|
function getThematiqueFamilySlug($thematique_slug)
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user