removing old blocks
This commit is contained in:
parent
f2087f77f9
commit
286de77bed
|
|
@ -1,18 +0,0 @@
|
|||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
# WordPress Coding Standards
|
||||
# https://make.wordpress.org/core/handbook/coding-standards/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = tab
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
30
blocks/_oldBlocks/chapter-header/.gitignore
vendored
30
blocks/_oldBlocks/chapter-header/.gitignore
vendored
|
|
@ -1,30 +0,0 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Output of `npm pack`
|
||||
*.tgz
|
||||
|
||||
# Output of `wp-scripts plugin-zip`
|
||||
*.zip
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"$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",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-rich-text'), 'version' => '9bfe4f80aaca434b813f');
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
/*!****************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** 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/editor.scss ***!
|
||||
\****************************************************************************************************************************************************************************************************************************************/
|
||||
/**
|
||||
* The following styles get applied inside the editor only.
|
||||
*
|
||||
* Replace them with your own styles or remove the file completely.
|
||||
*/
|
||||
.homegrade-blocks-chapter-header-block .page-thematic-cover {
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=index.css.map*/
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"index.css","mappings":";;;AAAA;;;;EAAA;AAOE;EACA;AADF,C","sources":["webpack://multiblocks/./src/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.homegrade-blocks-chapter-header-block {\n\t\t.page-thematic-cover {\n\t\tmax-width: 300px;\n\t}\n}\n"],"names":[],"sourceRoot":""}
|
||||
|
|
@ -1,434 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/edit.js":
|
||||
/*!*********************!*\
|
||||
!*** ./src/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/editor.scss");
|
||||
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utilities.js */ "../utilities.js");
|
||||
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/rich-text */ "@wordpress/rich-text");
|
||||
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_7__);
|
||||
|
||||
|
||||
|
||||
|
||||
// pour les querry
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit({
|
||||
attributes,
|
||||
setAttributes
|
||||
}) {
|
||||
var _ref;
|
||||
const {
|
||||
editPost
|
||||
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)("core/editor");
|
||||
const [cover, setCover] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
||||
let postTitle = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select("core/editor").getEditedPostAttribute("title"));
|
||||
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 currentGeneralThematique = (_ref = postParentTaxonomy !== null && postParentTaxonomy !== void 0 ? postParentTaxonomy : postMainTaxonomy) !== null && _ref !== void 0 ? _ref : null;
|
||||
|
||||
// let currentGeneralThematiqueSlug = postParentTaxonomy
|
||||
// ? getThematiqueFamilySlug(postParentTaxonomy.slug)
|
||||
// : postMainTaxonomy
|
||||
// ? getThematiqueFamilySlug(postMainTaxonomy.slug)
|
||||
// : null;
|
||||
|
||||
let currentGeneralThematiqueCover = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => {
|
||||
if (currentGeneralThematique) {
|
||||
return select("core").getMedia(currentGeneralThematique.acf.taxonomy_pictures.illustration_s);
|
||||
}
|
||||
}, [currentGeneralThematique]);
|
||||
if (!postTitle) {
|
||||
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) {
|
||||
// console.log(currentGeneralThematique);
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||
className: "homegrade-blocks-chapter-header-block"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
className: "homegrade-blocks-chapter-header-block__infos"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||
className: "homegrade-blocks-chapter-header-block__page-thematic-title"
|
||||
}, currentGeneralThematique.name), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, {
|
||||
onChange: value => {
|
||||
console.log(value);
|
||||
(0,_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_7__.getActiveFormat)(value);
|
||||
editPost({
|
||||
title: value
|
||||
});
|
||||
},
|
||||
value: postTitle,
|
||||
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Text de placeholrder du bloc chapter-header", "homegrade-blocks__texte-fonctionnel"),
|
||||
tagName: "h2",
|
||||
allowedFormats: []
|
||||
}), postParentTaxonomy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
||||
href: "",
|
||||
className: "cta cta--primary cta--buton"
|
||||
}, "T\xE9l\xE9charger la brochure", " ")), currentGeneralThematiqueCover && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
|
||||
className: "homegrade-blocks-chapter-header-block__page-thematic-cover page-thematic-cover",
|
||||
src: `${currentGeneralThematiqueCover.source_url}`,
|
||||
alt: ""
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/index.js":
|
||||
/*!**********************!*\
|
||||
!*** ./src/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/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/edit.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/block.json");
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_3__.name, {
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../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 */ });
|
||||
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/editor.scss":
|
||||
/*!*************************!*\
|
||||
!*** ./src/editor.scss ***!
|
||||
\*************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/style.scss":
|
||||
/*!************************!*\
|
||||
!*** ./src/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/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"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/rich-text":
|
||||
/*!**********************************!*\
|
||||
!*** external ["wp","richText"] ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["richText"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/block.json":
|
||||
/*!************************!*\
|
||||
!*** ./src/block.json ***!
|
||||
\************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
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","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"}}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // 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 = deferred[i][0];
|
||||
/******/ var fn = deferred[i][1];
|
||||
/******/ var priority = deferred[i][2];
|
||||
/******/ 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 = {
|
||||
/******/ "index": 0,
|
||||
/******/ "./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 = data[0];
|
||||
/******/ var moreModules = data[1];
|
||||
/******/ var runtime = data[2];
|
||||
/******/ // 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 = self["webpackChunkmultiblocks"] = self["webpackChunkmultiblocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["./style-index"], () => (__webpack_require__("./src/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null;
|
||||
$thematique_generale = $thematique->parent ? get_term($thematique->parent, 'thematiques') : $thematique;
|
||||
$thematique_generale_id_fr = apply_filters('wpml_object_id', $thematique_generale->term_id, 'thematiques', TRUE, 'fr');
|
||||
|
||||
// Récupère la source de l'image par rapport à l'ID FR pour s'assurer de bien synchroniser les images dans les deux langues
|
||||
$thematique_picture = get_field('taxonomy_pictures', "thematiques_" . $thematique_generale_id_fr)['illustration_s'] ?? null;
|
||||
$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('brochure_pdf', $relatedBrochuresPosts[0]->ID) ?? null;
|
||||
?>
|
||||
|
||||
<section class="homegrade-blocks-chapter-header-block">
|
||||
<div class="homegrade-blocks-chapter-header-block__infos">
|
||||
<?php if ($thematique->parent == 0) : ?>
|
||||
|
||||
|
||||
<p class="homegrade-blocks-chapter-header-block__page-thematic-title <?php echo "text-" . getThematiqueFamilySlug($thematique_generale->slug) ?>"><?php echo __("Les conseillers Homegrade vous guident", "homegrade-blocks") ?></p>
|
||||
<?php else : ?>
|
||||
<p class="homegrade-blocks-chapter-header-block__page-thematic-title <?php echo "text-" . getThematiqueFamilySlug($thematique_generale->slug) ?>"><?php echo $thematique_generale->name ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<h1 class="homegrade-blocks-chapter-header-block__page-title"><?php echo get_the_title() ?></h1>
|
||||
|
||||
<?php if ($relatedBrochure) : ?>
|
||||
<a class="cta cta--primary cta--button" href="<?php echo $relatedBrochure['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>
|
||||
<img class="homegrade-blocks-chapter-header-block__page-thematic-cover " src="<?php echo $thematique_picture['url'] ?>" alt="">
|
||||
</section>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/*!***************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** 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/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.
|
||||
*/
|
||||
.homegrade-blocks-chapter-header-block {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.homegrade-blocks-chapter-header-block__page-thematic-cover {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"./style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;EACA;AAAD;AAEC;EACC;AAAF,C","sources":["webpack://multiblocks/./src/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.homegrade-blocks-chapter-header-block {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tmargin-bottom: 20px;\n\n\t&__page-thematic-cover {\n\t\tmax-width: 400px;\n\t}\n}\n"],"names":[],"sourceRoot":""}
|
||||
28142
blocks/_oldBlocks/chapter-header/package-lock.json
generated
28142
blocks/_oldBlocks/chapter-header/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"name": "multiblocks",
|
||||
"version": "0.1.0",
|
||||
"description": "Example block scaffolded with Create Block tool.",
|
||||
"author": "The WordPress Contributors",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"main": "build/index.js",
|
||||
"scripts": {
|
||||
"build": "wp-scripts build",
|
||||
"format": "wp-scripts format",
|
||||
"lint:css": "wp-scripts lint-style",
|
||||
"lint:js": "wp-scripts lint-js",
|
||||
"packages-update": "wp-scripts packages-update",
|
||||
"plugin-zip": "wp-scripts plugin-zip",
|
||||
"start": "wp-scripts start"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@wordpress/scripts": "^26.9.0"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
=== Multiblocks ===
|
||||
Contributors: The WordPress Contributors
|
||||
Tags: block
|
||||
Tested up to: 6.1
|
||||
Stable tag: 0.1.0
|
||||
License: GPL-2.0-or-later
|
||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Example block scaffolded with Create Block tool.
|
||||
|
||||
== Description ==
|
||||
|
||||
This is the long description. No limit, and you can use Markdown (as well as in the following sections).
|
||||
|
||||
For backwards compatibility, if this section is missing, the full length of the short description will be used, and
|
||||
Markdown parsed.
|
||||
|
||||
== Installation ==
|
||||
|
||||
This section describes how to install the plugin and get it working.
|
||||
|
||||
e.g.
|
||||
|
||||
1. Upload the plugin files to the `/wp-content/plugins/multiblocks` directory, or install the plugin through the WordPress plugins screen directly.
|
||||
1. Activate the plugin through the 'Plugins' screen in WordPress
|
||||
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
= A question that someone might have =
|
||||
|
||||
An answer to that question.
|
||||
|
||||
= What about foo bar? =
|
||||
|
||||
Answer to foo bar dilemma.
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
|
||||
the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets
|
||||
directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png`
|
||||
(or jpg, jpeg, gif).
|
||||
2. This is the second screen shot
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 0.1.0 =
|
||||
* Release
|
||||
|
||||
== Arbitrary section ==
|
||||
|
||||
You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated
|
||||
plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or
|
||||
"installation." Arbitrary sections will be shown below the built-in sections outlined above.
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"$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",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,128 +0,0 @@
|
|||
import { __ } from "@wordpress/i18n";
|
||||
|
||||
import {
|
||||
Inserter,
|
||||
InnerBlocks,
|
||||
useBlockProps,
|
||||
RichText,
|
||||
BlockControls,
|
||||
InspectorControls,
|
||||
} from "@wordpress/block-editor";
|
||||
import {
|
||||
ToolbarGroup,
|
||||
ToolbarButton,
|
||||
DropdownMenu,
|
||||
ToolbarDropdownMenu,
|
||||
PanelBody,
|
||||
TextControl,
|
||||
TextareaControl,
|
||||
ToggleControl,
|
||||
SelectControl,
|
||||
} from "@wordpress/components";
|
||||
import { useSelect, useDispatch } from "@wordpress/data"; // pour les querry
|
||||
import { useEffect, useState } from "@wordpress/element";
|
||||
|
||||
import "./editor.scss";
|
||||
import { getThematiqueFamilySlug } from "../../utilities.js";
|
||||
import { getActiveFormat } from "@wordpress/rich-text";
|
||||
|
||||
export default function Edit({ attributes, setAttributes }) {
|
||||
const { editPost } = useDispatch("core/editor");
|
||||
const [cover, setCover] = useState(null);
|
||||
|
||||
let postTitle = useSelect((select) =>
|
||||
select("core/editor").getEditedPostAttribute("title")
|
||||
);
|
||||
|
||||
let postTaxonomies = useSelect((select) =>
|
||||
select("core/editor").getCurrentPostAttribute("thematiques")
|
||||
);
|
||||
let postMainTaxonomy = useSelect(
|
||||
(select) =>
|
||||
select("core").getEntityRecord(
|
||||
"taxonomy",
|
||||
"thematiques",
|
||||
postTaxonomies[0]
|
||||
),
|
||||
[postTaxonomies]
|
||||
);
|
||||
let postParentTaxonomy = useSelect(
|
||||
(select) => {
|
||||
if (postMainTaxonomy) {
|
||||
return select("core").getEntityRecord(
|
||||
"taxonomy",
|
||||
"thematiques",
|
||||
postMainTaxonomy.parent
|
||||
);
|
||||
}
|
||||
},
|
||||
[postMainTaxonomy]
|
||||
);
|
||||
let currentGeneralThematique = postParentTaxonomy ?? postMainTaxonomy ?? null;
|
||||
|
||||
// let currentGeneralThematiqueSlug = postParentTaxonomy
|
||||
// ? getThematiqueFamilySlug(postParentTaxonomy.slug)
|
||||
// : postMainTaxonomy
|
||||
// ? getThematiqueFamilySlug(postMainTaxonomy.slug)
|
||||
// : null;
|
||||
|
||||
let currentGeneralThematiqueCover = useSelect(
|
||||
(select) => {
|
||||
if (currentGeneralThematique) {
|
||||
return select("core").getMedia(
|
||||
currentGeneralThematique.acf.taxonomy_pictures.illustration_s
|
||||
);
|
||||
}
|
||||
},
|
||||
[currentGeneralThematique]
|
||||
);
|
||||
|
||||
if (!postTitle) {
|
||||
return (
|
||||
<div>
|
||||
<p>Chargement des données...</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (postMainTaxonomy && postTitle && currentGeneralThematique) {
|
||||
// console.log(currentGeneralThematique);
|
||||
return (
|
||||
<section className="homegrade-blocks-chapter-header-block">
|
||||
<div className="homegrade-blocks-chapter-header-block__infos">
|
||||
<p className="homegrade-blocks-chapter-header-block__page-thematic-title">
|
||||
{currentGeneralThematique.name}
|
||||
</p>
|
||||
|
||||
<RichText
|
||||
onChange={(value) => {
|
||||
console.log(value);
|
||||
getActiveFormat(value);
|
||||
editPost({ title: value });
|
||||
}}
|
||||
value={postTitle}
|
||||
placeholder={__(
|
||||
"Text de placeholder du bloc chapter-header",
|
||||
"homegrade-blocks"
|
||||
)}
|
||||
tagName="h2"
|
||||
allowedFormats={[]}
|
||||
/>
|
||||
|
||||
{postParentTaxonomy && (
|
||||
<p href="" className="cta cta--primary cta--buton">
|
||||
Télécharger la brochure{" "}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
{currentGeneralThematiqueCover && (
|
||||
<img
|
||||
className="homegrade-blocks-chapter-header-block__page-thematic-cover page-thematic-cover"
|
||||
src={`${currentGeneralThematiqueCover.source_url}`}
|
||||
alt=""
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
/**
|
||||
* The following styles get applied inside the editor only.
|
||||
*
|
||||
* Replace them with your own styles or remove the file completely.
|
||||
*/
|
||||
|
||||
.homegrade-blocks-chapter-header-block {
|
||||
.page-thematic-cover {
|
||||
max-width: 300px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
import { registerBlockType } from "@wordpress/blocks";
|
||||
|
||||
import "./style.scss";
|
||||
import Edit from "./edit";
|
||||
import metadata from "./block.json";
|
||||
|
||||
registerBlockType(metadata.name, {
|
||||
edit: Edit,
|
||||
});
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
<?php
|
||||
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null;
|
||||
$thematique_generale = $thematique->parent ? get_term($thematique->parent, 'thematiques') : $thematique;
|
||||
$thematique_generale_id_fr = apply_filters('wpml_object_id', $thematique_generale->term_id, 'thematiques', TRUE, 'fr');
|
||||
|
||||
// Récupère la source de l'image par rapport à l'ID FR pour s'assurer de bien synchroniser les images dans les deux langues
|
||||
$thematique_picture = get_field('taxonomy_pictures', "thematiques_" . $thematique_generale_id_fr)['illustration_s'] ?? null;
|
||||
$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('brochure_pdf', $relatedBrochuresPosts[0]->ID) ?? null;
|
||||
?>
|
||||
|
||||
<section class="homegrade-blocks-chapter-header-block">
|
||||
<div class="homegrade-blocks-chapter-header-block__infos">
|
||||
<?php if ($thematique->parent == 0) : ?>
|
||||
|
||||
<p class="homegrade-blocks-chapter-header-block__page-thematic-title <?php echo "text-" . getThematiqueFamilySlug($thematique_generale->slug) ?>"><?php echo __("Les conseillers Homegrade vous guident", "homegrade-blocks") ?></p>
|
||||
<?php else : ?>
|
||||
<p class="homegrade-blocks-chapter-header-block__page-thematic-title <?php echo "text-" . getThematiqueFamilySlug($thematique_generale->slug) ?>"><?php echo $thematique_generale->name ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<h1 class="homegrade-blocks-chapter-header-block__page-title"><?php echo get_the_title() ?></h1>
|
||||
|
||||
<?php if ($relatedBrochure) : ?>
|
||||
<a class="cta cta--primary cta--button" href="<?php echo $relatedBrochure['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>
|
||||
<img class="homegrade-blocks-chapter-header-block__page-thematic-cover " src="<?php echo $thematique_picture['url'] ?>" alt="">
|
||||
</section>
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
|
||||
|
||||
export default function save({ attributes }) {
|
||||
const { blocktitle, showDescription } = attributes;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<RichText.Content
|
||||
tagName="h2"
|
||||
value={blocktitle}
|
||||
className="mydummytext"
|
||||
/>
|
||||
|
||||
{showDescription && (
|
||||
<RichText
|
||||
{...useBlockProps()}
|
||||
className="description"
|
||||
onChange={(value) => setAttributes({ blockDescriptionText: value })}
|
||||
value={blockDescriptionText}
|
||||
placeholder={__("Test", "homegrade-blocks")}
|
||||
tagName="p"
|
||||
allowedFormats={[]}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
.homegrade-blocks-chapter-header-block {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
&__page-thematic-cover {
|
||||
max-width: 400px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
# WordPress Coding Standards
|
||||
# https://make.wordpress.org/core/handbook/coding-standards/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = tab
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
30
blocks/_oldBlocks/kit-presse/.gitignore
vendored
30
blocks/_oldBlocks/kit-presse/.gitignore
vendored
|
|
@ -1,30 +0,0 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Output of `npm pack`
|
||||
*.tgz
|
||||
|
||||
# Output of `wp-scripts plugin-zip`
|
||||
*.zip
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
28850
blocks/_oldBlocks/kit-presse/package-lock.json
generated
28850
blocks/_oldBlocks/kit-presse/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"name": "test",
|
||||
"version": "0.1.0",
|
||||
"description": "Example block scaffolded with Create Block tool.",
|
||||
"author": "The WordPress Contributors",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"main": "build/index.js",
|
||||
"scripts": {
|
||||
"build": "wp-scripts build --webpack-copy-php",
|
||||
"format": "wp-scripts format",
|
||||
"lint:css": "wp-scripts lint-style",
|
||||
"lint:js": "wp-scripts lint-js",
|
||||
"packages-update": "wp-scripts packages-update",
|
||||
"plugin-zip": "wp-scripts plugin-zip",
|
||||
"start": "wp-scripts start --webpack-copy-php"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@wordpress/scripts": "^26.11.0"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "homegrade-content-blocks/kit-presse",
|
||||
"version": "0.1.0",
|
||||
"title": "Kit Presse",
|
||||
"category": "homegrade-blocks",
|
||||
"icon": "smiley",
|
||||
"description": "Un bloc pour afficher les photos pour la presse",
|
||||
"supports": {
|
||||
"html": false
|
||||
},
|
||||
"textdomain": "test",
|
||||
"editorScript": "file:./index.js",
|
||||
"editorStyle": "file:./index.css",
|
||||
"style": "file:./style-index.css",
|
||||
"render": "file:./render.php"
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
import { __ } from "@wordpress/i18n";
|
||||
import { useBlockProps } from "@wordpress/block-editor";
|
||||
import { InnerBlocks } from "@wordpress/block-editor";
|
||||
import "./editor.scss";
|
||||
|
||||
export default function Edit() {
|
||||
return (
|
||||
<section
|
||||
{...useBlockProps({
|
||||
className: `homegrade-blocks-kit-presse`,
|
||||
})}
|
||||
>
|
||||
<InnerBlocks
|
||||
allowedBlocks={[
|
||||
"homegrade-content-blocks/section-titling",
|
||||
"core/paragraph",
|
||||
]}
|
||||
template={[
|
||||
[
|
||||
"homegrade-content-blocks/section-titling",
|
||||
{ sectionTitle: __("Kit presse", "homegrade") },
|
||||
],
|
||||
["core/paragraph"],
|
||||
]}
|
||||
templateLock={true}
|
||||
/>
|
||||
<p className="temp_guidance_sentence">
|
||||
{__(
|
||||
"Les éléments déposés dans le kit press s'afficheront ici",
|
||||
"homegrade-blocks__text-backoffice"
|
||||
)}
|
||||
</p>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
/**
|
||||
* The following styles get applied inside the editor only.
|
||||
*
|
||||
* Replace them with your own styles or remove the file completely.
|
||||
*/
|
||||
|
||||
.wp-block-create-block-test {
|
||||
border: 1px dotted #f00;
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="fiches" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 35.23 43.15">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1, .cls-2 {
|
||||
stroke-width: 0px;
|
||||
}
|
||||
|
||||
.cls-1, .cls-3, .cls-4 {
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
fill: url(#Dégradé_sans_nom_5);
|
||||
}
|
||||
|
||||
.cls-3, .cls-4 {
|
||||
stroke: #000;
|
||||
stroke-linecap: round;
|
||||
stroke-width: 2px;
|
||||
}
|
||||
|
||||
.cls-4 {
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
</style>
|
||||
<linearGradient id="Dégradé_sans_nom_5" data-name="Dégradé sans nom 5" x1="-1662.48" y1="-15.41" x2="-1660.8" y2="-17.17" gradientTransform="translate(16763.7 -47.81) scale(10.08 -3.91)" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#f3281d"/>
|
||||
<stop offset="1" stop-color="#fe766f"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="Groupe_4723" data-name="Groupe 4723">
|
||||
<g id="Rectangle_1361" data-name="Rectangle 1361">
|
||||
<rect class="cls-1" y="5.55" width="29.14" height="37.6"/>
|
||||
<rect class="cls-4" x="1.68" y="7.23" width="25.78" height="34.24"/>
|
||||
</g>
|
||||
<rect id="Rectangle_1362" data-name="Rectangle 1362" class="cls-2" x="6.09" y="11.98" width="16.97" height="6.58"/>
|
||||
<line id="Ligne_3477" data-name="Ligne 3477" class="cls-3" x1="7.03" y1="22.94" x2="22.11" y2="22.94"/>
|
||||
<line id="Ligne_3478" data-name="Ligne 3478" class="cls-3" x1="7.03" y1="28.26" x2="22.11" y2="28.26"/>
|
||||
<line id="Ligne_3479" data-name="Ligne 3479" class="cls-3" x1="7.03" y1="33.58" x2="22.11" y2="33.58"/>
|
||||
<path id="Tracé_20354" data-name="Tracé 20354" class="cls-4" d="m7.02,3.54V1h27.2v37.5h-3.02"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="image" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 35.24 35.24">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: url(#Dégradé_sans_nom_5);
|
||||
stroke-width: 0px;
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
fill: none;
|
||||
stroke: #000;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
stroke-width: 2px;
|
||||
}
|
||||
</style>
|
||||
<linearGradient id="Dégradé_sans_nom_5" data-name="Dégradé sans nom 5" x1="-2760.13" y1="75.52" x2="-2759.14" y2="74.47" gradientTransform="translate(23623.33 653.57) scale(8.56 -8.56)" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#f3281d"/>
|
||||
<stop offset="1" stop-color="#fe766f"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="Icon_feather-image" data-name="Icon feather-image">
|
||||
<path id="Tracé_24544" data-name="Tracé 24544" class="cls-2" d="m4.69,1h25.85c2.04,0,3.69,1.65,3.69,3.69h0v25.85c0,2.04-1.65,3.69-3.69,3.69H4.69c-2.04,0-3.69-1.65-3.69-3.69h0V4.69c0-2.04,1.65-3.69,3.69-3.69Z"/>
|
||||
<path id="Tracé_24545" data-name="Tracé 24545" class="cls-1" d="m15.45,11.18c0,2.36-1.92,4.28-4.28,4.28s-4.28-1.92-4.28-4.28,1.91-4.28,4.28-4.28c2.36,0,4.28,1.91,4.28,4.28h0Z"/>
|
||||
<path id="Tracé_24546" data-name="Tracé 24546" class="cls-2" d="m34.24,23.16l-9.23-9.23L4.69,34.24"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -1,24 +0,0 @@
|
|||
import { registerBlockType } from "@wordpress/blocks";
|
||||
import "./style.scss";
|
||||
import Edit from "./edit";
|
||||
import save from "./save";
|
||||
|
||||
import metadata from "./block.json";
|
||||
|
||||
registerBlockType(metadata.name, {
|
||||
icon: {
|
||||
src: (
|
||||
<svg viewBox="0 0 39.37 34.38">
|
||||
<g id="Calque_1-2" data-name="Calque 1">
|
||||
<path
|
||||
class="cls-1"
|
||||
d="m36.32,6.95h-7.23v-3.91c0-1.68-1.36-3.05-3.05-3.05h-12.71c-1.69,0-3.05,1.37-3.05,3.05v3.91H3.05c-1.68,0-3.05,1.37-3.05,3.05v21.33c0,1.68,1.37,3.05,3.05,3.05h13.22v-5.87c-2.49-1.27-4.06-3.83-4.06-6.66s1.47-5.21,3.84-6.53c.24-.14.54-.13.78,0,.24.14.39.4.39.68v4.81l2.47,1.15,2.47-1.15v-4.81c0-.28.15-.54.39-.68.24-.14.54-.14.78,0,2.37,1.32,3.84,3.82,3.84,6.53s-1.58,5.39-4.07,6.66v5.87h13.22c1.68,0,3.06-1.37,3.06-3.05V10c0-1.68-1.37-3.05-3.06-3.05Zm-8.8,0h-15.65v-3.91c0-.81.66-1.47,1.47-1.47h12.71c.81,0,1.47.66,1.47,1.47v3.91Z"
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
),
|
||||
foreground: "#DF1E1E",
|
||||
},
|
||||
edit: Edit,
|
||||
save,
|
||||
});
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
<?php
|
||||
|
||||
$press_kit_datas = get_field('press_kit_datas', 'option');
|
||||
|
||||
|
||||
function getRessourceIcon($ressource_type)
|
||||
{
|
||||
switch ($ressource_type) {
|
||||
case 'image/jpeg':
|
||||
return plugin_dir_url(__DIR__) . "src/img/homegrade_image.svg";
|
||||
|
||||
case 'application/pdf':
|
||||
return plugin_dir_url(__DIR__) . "src/img/homegrade_fiches.svg";
|
||||
|
||||
default:
|
||||
return plugin_dir_url(__DIR__) . "src/img/homegrade_fiches.svg";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<h1>sasmljkdcbsmkdjfbds</h1>
|
||||
<section <?php echo get_block_wrapper_attributes(["class" => "homegrade-blocks-kit-presse"]); ?>>
|
||||
<?php echo $content; ?>
|
||||
|
||||
<ul class="homegrade-blocks-kit-presse__press-grid-datas">
|
||||
|
||||
<div class="table_head" aria-hidden="true">
|
||||
<p><?php echo __("Fichier", "homegrade-blocks") ?></p>
|
||||
<p><?php echo __("Format", "homegrade-blocks") ?></p>
|
||||
<p><?php echo __("Mise à jour", "homegrade-blocks") ?></p>
|
||||
</div>
|
||||
<?php foreach ($press_kit_datas as $data) : ?>
|
||||
<?php
|
||||
$ressourceType = $data['mime_type'];
|
||||
$ressourceIcon = getRessourceIcon($ressourceType);
|
||||
|
||||
|
||||
setlocale(LC_TIME, 'fr_FR');
|
||||
$timestamp = strtotime($data['modified']);
|
||||
$formatted_date = strftime("%B %Y", $timestamp);
|
||||
|
||||
?>
|
||||
<li class="homegrade-blocks-kit-presse__press-ressource">
|
||||
<div class="homegrade-blocks-kit-presse__ressource-icon">
|
||||
<img src="<?php echo $ressourceIcon ?>" alt="">
|
||||
</div>
|
||||
<p class="homegrade-blocks-kit-presse__ressource-title"><?php echo $data['title'] ?></p>
|
||||
<p class="homegrade-blocks-kit-presse__ressource-type"><?php echo $data['subtype'] ?></p>
|
||||
<p class="homegrade-blocks-kit-presse__ressource-date"><?php echo $formatted_date ?></p>
|
||||
<a class="homegrade-blocks-kit-presse__ressource-download cta cta--secondary cta--button" href=""><?php echo __('Télécharger') ?></a>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import { useBlockProps, InnerBlocks } from "@wordpress/block-editor";
|
||||
|
||||
export default function save({ attributes }) {
|
||||
return <InnerBlocks.Content />;
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/**
|
||||
* 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-test {
|
||||
background-color: #21759b;
|
||||
color: #fff;
|
||||
padding: 2px;
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "homegrade-content-blocks/box-monoblock",
|
||||
"version": "0.1.0",
|
||||
"title": "Monobloc",
|
||||
"category": "homegrade-blocks",
|
||||
"description": "Bloc conteneur d'une seule colonne",
|
||||
"supports": {
|
||||
"html": false
|
||||
},
|
||||
"editorScript": "file:./index.js",
|
||||
"editorStyle": "file:./index.css",
|
||||
"style": "file:./style-index.css",
|
||||
"attributes": {
|
||||
"childName": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
import { __ } from "@wordpress/i18n";
|
||||
import "./editor.scss";
|
||||
|
||||
import { useBlockProps, RichText } from "@wordpress/block-editor";
|
||||
import { InnerBlocks } from "@wordpress/block-editor";
|
||||
|
||||
export default function Edit({ attributes, setAttributes, ...props }) {
|
||||
let { childName } = attributes;
|
||||
|
||||
function onChangeChildName(childName) {
|
||||
setAttributes({ childName });
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
{...useBlockProps({
|
||||
className: `box-monoblock card-large-content`,
|
||||
})}
|
||||
>
|
||||
<InnerBlocks allowedBlocks={["core/paragraph"]} />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
// THE STYLE IS HANDLED IN PARENT BLOCK (timeline)
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="mascotte" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 60 60">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: url(#Dégradé_sans_nom_3);
|
||||
}
|
||||
|
||||
.cls-1, .cls-2 {
|
||||
stroke-width: 0px;
|
||||
}
|
||||
|
||||
.cls-3 {
|
||||
fill: #fff;
|
||||
stroke: #000;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
stroke-width: 2px;
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
fill: url(#Dégradé_sans_nom_3-2);
|
||||
}
|
||||
</style>
|
||||
<linearGradient id="Dégradé_sans_nom_3" data-name="Dégradé sans nom 3" x1="-2280.28" y1="80.03" x2="-2279.29" y2="78.98" gradientTransform="translate(6033.72 622.47) scale(2.63 -7.44)" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#f3281d"/>
|
||||
<stop offset="1" stop-color="#fe766f"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="Dégradé_sans_nom_3-2" data-name="Dégradé sans nom 3" x1="-2276.06" y1="80.02" x2="-2275.06" y2="78.97" gradientTransform="translate(6009.38 619.45) scale(2.62 -7.44)" xlink:href="#Dégradé_sans_nom_3"/>
|
||||
</defs>
|
||||
<g id="Groupe_5862" data-name="Groupe 5862">
|
||||
<g id="Groupe_3195" data-name="Groupe 3195">
|
||||
<g id="Groupe_de_masques_1" data-name="Groupe de masques 1">
|
||||
<g id="Groupe_5593" data-name="Groupe 5593">
|
||||
<g id="Groupe_5595" data-name="Groupe 5595">
|
||||
<g id="Groupe_5594" data-name="Groupe 5594">
|
||||
<path id="Tracé_23844" data-name="Tracé 23844" class="cls-3" d="m12.46,54.29c.34-1.09.82-2.53,1.49-4.18,0,0,.36-.88.77-1.79,1.62-3.6,5.34-9.45,5.6-9.85l18.98-6.94.29,7.22c2.01,1.44,3.72,3.25,5.03,5.34,1,1.61,1.76,3.35,2.25,5.18.42,1.65.64,3.34.66,5.03"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Groupe_5596" data-name="Groupe 5596">
|
||||
<path id="Tracé_23846" data-name="Tracé 23846" class="cls-3" d="m47.07,36.61l-14.99,8.65v-17.2l7.49-13.7,7.5,5.05v17.19Z"/>
|
||||
<path id="Tracé_23847" data-name="Tracé 23847" class="cls-3" d="m32.08,45.26l-14.98-8.65v-17.19l14.98,8.65v17.19Z"/>
|
||||
<path id="Tracé_23848" data-name="Tracé 23848" class="cls-3" d="m17.1,19.41l7.49-13.7,14.98,8.65-7.49,13.7-14.98-8.65Z"/>
|
||||
</g>
|
||||
<path id="Tracé_23849" data-name="Tracé 23849" class="cls-1" d="m36.34,33.91l2.63-1.52v-5.92l-2.63,1.51v5.93Z"/>
|
||||
<path id="Tracé_23850" data-name="Tracé 23850" class="cls-2" d="m41.32,31.05l2.62-1.51v-5.93l-2.62,1.51v5.93Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.5 KiB |
|
|
@ -1,41 +0,0 @@
|
|||
import { registerBlockType } from "@wordpress/blocks";
|
||||
import "./style.scss";
|
||||
import metadata from "./block.json";
|
||||
|
||||
import Edit from "./edit";
|
||||
import Save from "./save";
|
||||
|
||||
import { navigation } from "@wordpress/icons";
|
||||
|
||||
registerBlockType(metadata.name, {
|
||||
title: metadata.title,
|
||||
icon: {
|
||||
foreground: "#DF1E1E",
|
||||
src: (
|
||||
<svg version="1.1" x="0px" y="0px" viewBox="0 0 677.3 958.75">
|
||||
<switch>
|
||||
<foreignObject
|
||||
requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/"
|
||||
x="0"
|
||||
y="0"
|
||||
width="1"
|
||||
height="1"
|
||||
/>
|
||||
<g>
|
||||
<g>
|
||||
<path d="M652.9,173.9L363.1,6.5c-15.1-8.7-33.7-8.7-48.8,0L24.4,173.9C9.3,182.6,0,198.7,0,216.2v334.7 c0,17.4,9.3,33.6,24.4,42.3l289.8,167.3c15.1,8.7,33.7,8.7,48.8,0l289.8-167.3c15.1-8.7,24.4-24.8,24.4-42.3V216.2 C677.3,198.7,668,182.6,652.9,173.9z M653.3,537c0,17.4-9.3,33.6-24.4,42.3L363.1,732.7c-15.1,8.7-33.7,8.7-48.8,0L48.4,579.3 C33.3,570.5,24,554.4,24,537V230c0-17.4,9.3-33.6,24.4-42.3L314.2,34.3c15.1-8.7,33.7-8.7,48.8,0l265.8,153.5 c15.1,8.7,24.4,24.8,24.4,42.3V537z" />
|
||||
<path d="M568,256.9L378.8,366.1c-15.1,8.7-24.4,24.8-24.4,42.3c0,0-0.1,90.6-0.1,157.2v4.7c0,32.7,0,58.8,0.1,63.9 c0.2,16.7-3.1,44.3,25.2,29.2l189.1-109.2c15.1-8.7,24.4-24.8,24.4-42.3c0,0,0.1-90.6,0.1-157.2c0-1.6,0-3.2,0-4.7 c0-32.7,0-58.8-0.1-63.9C593,269.5,596.3,241.9,568,256.9z" />
|
||||
<path d="M108.7,256.9l189.1,109.2c15.1,8.7,24.4,24.8,24.4,42.3c0,0,0.1,90.6,0.1,157.2v4.7c0,32.7,0,58.8-0.1,63.9 c-0.2,16.7,3.1,44.3-25.2,29.2L107.9,554.3c-15.1-8.7-24.4-24.8-24.4-42.3c0,0-0.1-90.6-0.1-157.2c0-1.6,0-3.2,0-4.7 c0-32.7,0-58.8,0.1-63.9C83.7,269.5,80.4,241.9,108.7,256.9z" />
|
||||
<path d="M338.6,346.1c8.4,0,16.8-2.2,24.3-6.5l182.5-105.4c0.9-0.6,1.7-1.1,2.3-1.5c12.8-8.6,26-18.2-4.7-36.2 c-1.3-0.8-2.8-1.7-4.5-2.6L362.9,92.6c-7.5-4.3-15.9-6.5-24.3-6.5c-8.4,0-16.8,2.2-24.3,6.5L138.6,194c-1.6,0.9-3.1,1.8-4.5,2.6 c-30.7,17.9-17.5,27.6-4.7,36.2c0.6,0.4,1.3,0.9,2.3,1.5l182.5,105.4C321.8,343.9,330.2,346.1,338.6,346.1z" />
|
||||
</g>
|
||||
</g>
|
||||
</switch>
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
|
||||
supports: metadata.supports,
|
||||
attributes: metadata.attributes,
|
||||
edit: Edit,
|
||||
save: Save,
|
||||
});
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
|
||||
|
||||
export default function save({ attributes }) {
|
||||
const { name, position } = attributes;
|
||||
return (
|
||||
<div
|
||||
{...useBlockProps.save({
|
||||
className: `box-monoblock card-large-content`,
|
||||
})}
|
||||
>
|
||||
<InnerBlocks.Content />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
// THE STYLE IS HANDLED IN PARENT BLOCK (timeline)
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
# WordPress Coding Standards
|
||||
# https://make.wordpress.org/core/handbook/coding-standards/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = tab
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Output of `npm pack`
|
||||
*.tgz
|
||||
|
||||
# Output of `wp-scripts plugin-zip`
|
||||
*.zip
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"$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 +0,0 @@
|
|||
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '44eaf7b4718f2bbda604');
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
/*!****************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** 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/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 +0,0 @@
|
|||
{"version":3,"file":"index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://multiblocks/./src/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":""}
|
||||
|
|
@ -1,408 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/edit.js":
|
||||
/*!*********************!*\
|
||||
!*** ./src/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/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-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/index.js":
|
||||
/*!**********************!*\
|
||||
!*** ./src/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/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/edit.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/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/editor.scss":
|
||||
/*!*************************!*\
|
||||
!*** ./src/editor.scss ***!
|
||||
\*************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/style.scss":
|
||||
/*!************************!*\
|
||||
!*** ./src/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/block.json":
|
||||
/*!************************!*\
|
||||
!*** ./src/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 = deferred[i][0];
|
||||
/******/ var fn = deferred[i][1];
|
||||
/******/ var priority = deferred[i][2];
|
||||
/******/ 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 = {
|
||||
/******/ "index": 0,
|
||||
/******/ "./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 = data[0];
|
||||
/******/ var moreModules = data[1];
|
||||
/******/ var runtime = data[2];
|
||||
/******/ // 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 = self["webpackChunkmultiblocks"] = self["webpackChunkmultiblocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["./style-index"], () => (__webpack_require__("./src/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
$relatedPostId = $attributes['relatedPostId'] ?? null;
|
||||
$relatedPost = get_post($relatedPostId);
|
||||
|
||||
$term = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||
|
||||
$args = array(
|
||||
'post_per_page' => 30,
|
||||
'post_status' => 'publish',
|
||||
'post_type' => 'questions',
|
||||
'thematiques' => $term->ID,
|
||||
'lang' => ICL_LANGUAGE_CODE,
|
||||
);
|
||||
|
||||
$relatedPosts = new WP_Query($args);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<section class="questions-container-block">
|
||||
<?php if ($relatedPosts->have_posts()) : ?>
|
||||
<?php while ($relatedPosts->have_posts()) :
|
||||
$relatedPosts->the_post();
|
||||
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||
$thematiqueParent = getParentThematique($thematique);
|
||||
$thematiqueColorSlug = getThematiqueFamilySlug($thematiqueParent->slug);
|
||||
?>
|
||||
<article class="homegrade-blocks">
|
||||
<h2><?php the_title() ?></h2>
|
||||
<div><?php the_content() ?></div>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
/*!***************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** 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/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 +0,0 @@
|
|||
{"version":3,"file":"./style-index.css","mappings":";;;AAAA;;;;;EAAA;AAQC;EACC;AADF;AAIC;EACC;AAFF,C","sources":["webpack://multiblocks/./src/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":""}
|
||||
28142
blocks/_oldBlocks/questions-container-auto/package-lock.json
generated
28142
blocks/_oldBlocks/questions-container-auto/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"name": "multiblocks",
|
||||
"version": "0.1.0",
|
||||
"description": "Example block scaffolded with Create Block tool.",
|
||||
"author": "The WordPress Contributors",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"main": "build/index.js",
|
||||
"scripts": {
|
||||
"build": "wp-scripts build",
|
||||
"format": "wp-scripts format",
|
||||
"lint:css": "wp-scripts lint-style",
|
||||
"lint:js": "wp-scripts lint-js",
|
||||
"packages-update": "wp-scripts packages-update",
|
||||
"plugin-zip": "wp-scripts plugin-zip",
|
||||
"start": "wp-scripts start"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@wordpress/scripts": "^26.9.0"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
=== Multiblocks ===
|
||||
Contributors: The WordPress Contributors
|
||||
Tags: block
|
||||
Tested up to: 6.1
|
||||
Stable tag: 0.1.0
|
||||
License: GPL-2.0-or-later
|
||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Example block scaffolded with Create Block tool.
|
||||
|
||||
== Description ==
|
||||
|
||||
This is the long description. No limit, and you can use Markdown (as well as in the following sections).
|
||||
|
||||
For backwards compatibility, if this section is missing, the full length of the short description will be used, and
|
||||
Markdown parsed.
|
||||
|
||||
== Installation ==
|
||||
|
||||
This section describes how to install the plugin and get it working.
|
||||
|
||||
e.g.
|
||||
|
||||
1. Upload the plugin files to the `/wp-content/plugins/multiblocks` directory, or install the plugin through the WordPress plugins screen directly.
|
||||
1. Activate the plugin through the 'Plugins' screen in WordPress
|
||||
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
= A question that someone might have =
|
||||
|
||||
An answer to that question.
|
||||
|
||||
= What about foo bar? =
|
||||
|
||||
Answer to foo bar dilemma.
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
|
||||
the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets
|
||||
directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png`
|
||||
(or jpg, jpeg, gif).
|
||||
2. This is the second screen shot
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 0.1.0 =
|
||||
* Release
|
||||
|
||||
== Arbitrary section ==
|
||||
|
||||
You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated
|
||||
plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or
|
||||
"installation." Arbitrary sections will be shown below the built-in sections outlined above.
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"$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,152 +0,0 @@
|
|||
import { __ } from "@wordpress/i18n";
|
||||
import {
|
||||
useBlockProps,
|
||||
RichText,
|
||||
BlockControls,
|
||||
InspectorControls,
|
||||
} from "@wordpress/block-editor";
|
||||
import {
|
||||
ToolbarGroup,
|
||||
ToolbarButton,
|
||||
DropdownMenu,
|
||||
ToolbarDropdownMenu,
|
||||
PanelBody,
|
||||
TextControl,
|
||||
TextareaControl,
|
||||
ToggleControl,
|
||||
SelectControl,
|
||||
} from "@wordpress/components";
|
||||
import { useSelect } from "@wordpress/data"; // pour les querry
|
||||
import "./editor.scss";
|
||||
import apiFetch from "@wordpress/api-fetch";
|
||||
import { useEffect, useState, RawHTML } from "@wordpress/element";
|
||||
import { Autocomplete } from "@wordpress/components";
|
||||
|
||||
export default function Edit({ attributes, setAttributes }) {
|
||||
const { relatedPostId, montexte } = attributes;
|
||||
// console.log(montexte);
|
||||
|
||||
function handleRelatedPostChange(postId) {
|
||||
setAttributes({ relatedPostId: Number(postId), montexte: "test" });
|
||||
}
|
||||
|
||||
let [taxonomiesOptions, setTaxonomiesOptions] = useState(null);
|
||||
let postTaxonomies = useSelect((select) =>
|
||||
select("core/editor").getCurrentPostAttribute("thematiques")
|
||||
);
|
||||
let postMainTaxonomy = useSelect(
|
||||
(select) =>
|
||||
select("core").getEntityRecord(
|
||||
"taxonomy",
|
||||
"thematiques",
|
||||
postTaxonomies[0]
|
||||
),
|
||||
[postTaxonomies]
|
||||
);
|
||||
let postParentTaxonomy = useSelect(
|
||||
(select) => {
|
||||
if (postMainTaxonomy) {
|
||||
return select("core").getEntityRecord(
|
||||
"taxonomy",
|
||||
"thematiques",
|
||||
postMainTaxonomy.parent
|
||||
);
|
||||
}
|
||||
},
|
||||
[postMainTaxonomy]
|
||||
);
|
||||
|
||||
let relatedPostsOptions = useSelect(
|
||||
(select) => {
|
||||
if (postMainTaxonomy) {
|
||||
return select("core").getEntityRecords("postType", "fiche-questions", {
|
||||
per_page: -1,
|
||||
_embed: true,
|
||||
thematiques: postMainTaxonomy.id,
|
||||
});
|
||||
}
|
||||
},
|
||||
[postMainTaxonomy]
|
||||
);
|
||||
|
||||
let currentRelatedPost = useSelect((select) => {
|
||||
return select("core").getEntityRecord(
|
||||
"postType",
|
||||
"fiche-questions",
|
||||
relatedPostId
|
||||
);
|
||||
});
|
||||
|
||||
const { relatedPosts } = 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 (
|
||||
<>
|
||||
<h2>{post.title.rendered}</h2>
|
||||
<RawHTML>{post.content.raw}</RawHTML>
|
||||
</>
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
if (!relatedPostsOptions) {
|
||||
return (
|
||||
<>
|
||||
<p>chargement…</p>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
console.log(relatedPostId);
|
||||
|
||||
return (
|
||||
<>
|
||||
{relatedPosts && relatedPosts.length > 0 && (
|
||||
<div>{relatedPostsContent}</div>
|
||||
)}
|
||||
|
||||
<section {...useBlockProps}>
|
||||
{!relatedPostId && (
|
||||
<>
|
||||
<p>
|
||||
{__(
|
||||
"Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.",
|
||||
"homegrade-blocks"
|
||||
)}
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
|
||||
{currentRelatedPost && (
|
||||
<>
|
||||
<h3>{currentRelatedPost.title.rendered}</h3>
|
||||
<RawHTML>{currentRelatedPost.content.raw}</RawHTML>
|
||||
</>
|
||||
)}
|
||||
{/* {relatedPostsOptions &&
|
||||
relatedPostsOptions.map((post) => {
|
||||
return <li>{post.title.rendered}</li>;
|
||||
})} */}
|
||||
</section>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
/**
|
||||
* 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;
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
import { registerBlockType } from "@wordpress/blocks";
|
||||
|
||||
import "./style.scss";
|
||||
|
||||
import Edit from "./edit";
|
||||
import metadata from "./block.json";
|
||||
|
||||
registerBlockType(metadata.name, {
|
||||
edit: Edit,
|
||||
});
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
$relatedPostId = $attributes['relatedPostId'] ?? null;
|
||||
$relatedPost = get_post($relatedPostId);
|
||||
|
||||
$term = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||
|
||||
$args = array(
|
||||
'post_per_page' => 30,
|
||||
'post_status' => 'publish',
|
||||
'post_type' => 'questions',
|
||||
'thematiques' => $term->ID,
|
||||
'lang' => ICL_LANGUAGE_CODE,
|
||||
);
|
||||
|
||||
$relatedPosts = new WP_Query($args);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<section class="questions-container-block">
|
||||
<?php if ($relatedPosts->have_posts()) : ?>
|
||||
<?php while ($relatedPosts->have_posts()) :
|
||||
$relatedPosts->the_post();
|
||||
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||
$thematiqueParent = getMainThematique($thematique);
|
||||
$thematiqueColorSlug = getThematiqueFamilySlug($thematiqueParent->slug);
|
||||
?>
|
||||
<article class="homegrade-blocks__texte-fonctionnel">
|
||||
<h2><?php the_title() ?></h2>
|
||||
<div><?php the_content() ?></div>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
|
||||
|
||||
export default function save({ attributes }) {
|
||||
const { blocktitle, showDescription } = attributes;
|
||||
|
||||
return <h2>qsdqsd</h2>;
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight: 800;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
# WordPress Coding Standards
|
||||
# https://make.wordpress.org/core/handbook/coding-standards/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = tab
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
30
blocks/_oldBlocks/rich-paragraph/.gitignore
vendored
30
blocks/_oldBlocks/rich-paragraph/.gitignore
vendored
|
|
@ -1,30 +0,0 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Output of `npm pack`
|
||||
*.tgz
|
||||
|
||||
# Output of `wp-scripts plugin-zip`
|
||||
*.zip
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "homegrade-content-blocks/rich-paragraph",
|
||||
"version": "0.1.0",
|
||||
"title": "Paragraphe",
|
||||
"category": "homegrade-blocks",
|
||||
"description": "Paragraphe special",
|
||||
"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"
|
||||
},
|
||||
"textAlignment": {
|
||||
"type": "string",
|
||||
"default": "left"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '6f0d892d5de7f226dec4');
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
/*!****************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** 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/editor.scss ***!
|
||||
\****************************************************************************************************************************************************************************************************************************************/
|
||||
/**
|
||||
* The following styles get applied inside the editor only.
|
||||
*
|
||||
* Replace them with your own styles or remove the file completely.
|
||||
*/
|
||||
.homegrade-content-blocks-rich-paragraph {
|
||||
border: 1px dotted #f00;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=index.css.map*/
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://multiblocks/./src/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.homegrade-content-blocks-rich-paragraph {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
|
||||
|
|
@ -1,395 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/edit.js":
|
||||
/*!*********************!*\
|
||||
!*** ./src/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/editor.scss");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit({
|
||||
attributes,
|
||||
setAttributes
|
||||
}) {
|
||||
const {
|
||||
montexte,
|
||||
textAlignment
|
||||
} = attributes;
|
||||
function onChangeAlignment(newAlignment) {
|
||||
console.log(newAlignment);
|
||||
setAttributes({
|
||||
textAlignment: newAlignment
|
||||
});
|
||||
}
|
||||
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_block_editor__WEBPACK_IMPORTED_MODULE_2__.BlockControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.AlignmentToolbar, {
|
||||
value: textAlignment,
|
||||
onChange: onChangeAlignment
|
||||
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToolbarButton, {
|
||||
onClick: () => console.log("salut")
|
||||
}, "Salut")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps)(),
|
||||
className: "homegrade-content-blocks-rich-paragraph",
|
||||
onChange: value => setAttributes({
|
||||
montexte: value
|
||||
}),
|
||||
value: montexte,
|
||||
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Votre Text Monsieur", "mon-espace"),
|
||||
tagName: "h2",
|
||||
allowedFormats: [],
|
||||
style: {
|
||||
textAlign: textAlignment
|
||||
}
|
||||
})));
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/index.js":
|
||||
/*!**********************!*\
|
||||
!*** ./src/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/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./block.json */ "./src/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", {
|
||||
id: "Calque_2",
|
||||
viewBox: "0 0 70 77.4"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
|
||||
id: "Layer_1"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
||||
d: "m42.8,23.78c-2-1.1-4.5.3-4.5,2.6v10.3c0,1.1.6,2.1,1.5,2.6l10.8,6.3c1.1.7,2.5-.1,2.5-1.4v-12.7c0-1.1-.6-2.1-1.5-2.6l-8.8-5.1Zm-15.8.1l-8.8,5.1c-.9.5-1.5,1.5-1.5,2.6v12.9c0,1.2,1.3,1.9,2.3,1.3l11-6.4c1-.6,1.5-1.5,1.5-2.5v-10.4c0-2.3-2.5-3.8-4.5-2.6Zm-19.3-3.3l4.2,2.4c.9.5,2.1.5,3,0l18.5-10.8c.9-.5,2.1-.5,3,0l18.5,10.8c.9.6,2.1.6,3,0l4.2-2.4c2-1.2,2-4,0-5.2L36.4.38c-.9-.5-2.1-.5-3,0L7.7,15.38c-2,1.2-2,4,0,5.2Zm57.8,6l-4.1,2.4c-.9.5-1.5,1.5-1.5,2.6v21.7c0,1.1-.6,2.1-1.5,2.6l-18.6,10.9c-.9.5-1.5,1.5-1.5,2.6v4.9c0,2.3,2.5,3.8,4.5,2.6l25.6-15c.9-.6,1.5-1.6,1.6-2.6v-30.1c0-2.3-2.5-3.8-4.5-2.6Zm-18.2,25.1l-11-6.4c-.9-.5-2.1-.5-3,0l-10.9,6.4c-1,.6-1,2.1,0,2.7l11,6.4c.9.5,2.1.5,3,0l10.9-6.4c1-.6,1-2.1,0-2.7Zm-17.2,15.2l-18.6-10.9c-.9-.5-1.5-1.5-1.5-2.6v-21.8c0-1.1-.6-2.1-1.4-2.6l-4.1-2.4c-2-1.2-4.5.3-4.5,2.6v30.2c0,1.1.6,2.1,1.5,2.6l25.6,15c2,1.2,4.5-.3,4.5-2.6v-4.9c0-1.1-.6-2.1-1.5-2.6Z"
|
||||
}))),
|
||||
foreground: "#0414eb"
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_4__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/save.js":
|
||||
/*!*********************!*\
|
||||
!*** ./src/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 {
|
||||
montexte
|
||||
} = attributes;
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
|
||||
className: `wpblock-citation-citation mydummytext`
|
||||
})
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, {
|
||||
tagName: "h2",
|
||||
value: montexte,
|
||||
className: "mydummytext"
|
||||
}));
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/editor.scss":
|
||||
/*!*************************!*\
|
||||
!*** ./src/editor.scss ***!
|
||||
\*************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/style.scss":
|
||||
/*!************************!*\
|
||||
!*** ./src/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/block.json":
|
||||
/*!************************!*\
|
||||
!*** ./src/block.json ***!
|
||||
\************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/rich-paragraph","version":"0.1.0","title":"Paragraphe","category":"homegrade-blocks","description":"Paragraphe special","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"},"textAlignment":{"type":"string","default":"left"}}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // 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 = deferred[i][0];
|
||||
/******/ var fn = deferred[i][1];
|
||||
/******/ var priority = deferred[i][2];
|
||||
/******/ 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 = {
|
||||
/******/ "index": 0,
|
||||
/******/ "./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 = data[0];
|
||||
/******/ var moreModules = data[1];
|
||||
/******/ var runtime = data[2];
|
||||
/******/ // 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 = self["webpackChunkmultiblocks"] = self["webpackChunkmultiblocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["./style-index"], () => (__webpack_require__("./src/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,16 +0,0 @@
|
|||
/*!***************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** 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/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.
|
||||
*/
|
||||
.homegrade-content-blocks-rich-paragraph {
|
||||
background-color: #21759b;
|
||||
color: #fff;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"./style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://multiblocks/./src/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.homegrade-content-blocks-rich-paragraph {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""}
|
||||
28142
blocks/_oldBlocks/rich-paragraph/package-lock.json
generated
28142
blocks/_oldBlocks/rich-paragraph/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"name": "multiblocks",
|
||||
"version": "0.1.0",
|
||||
"description": "Example block scaffolded with Create Block tool.",
|
||||
"author": "The WordPress Contributors",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"main": "build/index.js",
|
||||
"scripts": {
|
||||
"build": "wp-scripts build",
|
||||
"format": "wp-scripts format",
|
||||
"lint:css": "wp-scripts lint-style",
|
||||
"lint:js": "wp-scripts lint-js",
|
||||
"packages-update": "wp-scripts packages-update",
|
||||
"plugin-zip": "wp-scripts plugin-zip",
|
||||
"start": "wp-scripts start"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@wordpress/scripts": "^26.9.0"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
=== Multiblocks ===
|
||||
Contributors: The WordPress Contributors
|
||||
Tags: block
|
||||
Tested up to: 6.1
|
||||
Stable tag: 0.1.0
|
||||
License: GPL-2.0-or-later
|
||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Example block scaffolded with Create Block tool.
|
||||
|
||||
== Description ==
|
||||
|
||||
This is the long description. No limit, and you can use Markdown (as well as in the following sections).
|
||||
|
||||
For backwards compatibility, if this section is missing, the full length of the short description will be used, and
|
||||
Markdown parsed.
|
||||
|
||||
== Installation ==
|
||||
|
||||
This section describes how to install the plugin and get it working.
|
||||
|
||||
e.g.
|
||||
|
||||
1. Upload the plugin files to the `/wp-content/plugins/multiblocks` directory, or install the plugin through the WordPress plugins screen directly.
|
||||
1. Activate the plugin through the 'Plugins' screen in WordPress
|
||||
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
= A question that someone might have =
|
||||
|
||||
An answer to that question.
|
||||
|
||||
= What about foo bar? =
|
||||
|
||||
Answer to foo bar dilemma.
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
|
||||
the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets
|
||||
directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png`
|
||||
(or jpg, jpeg, gif).
|
||||
2. This is the second screen shot
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 0.1.0 =
|
||||
* Release
|
||||
|
||||
== Arbitrary section ==
|
||||
|
||||
You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated
|
||||
plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or
|
||||
"installation." Arbitrary sections will be shown below the built-in sections outlined above.
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "homegrade-content-blocks/rich-paragraph",
|
||||
"version": "0.1.0",
|
||||
"title": "Paragraphe",
|
||||
"category": "homegrade-blocks",
|
||||
"description": "Paragraphe special",
|
||||
"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"
|
||||
},
|
||||
"textAlignment": {
|
||||
"type": "string",
|
||||
"default": "left"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
import { __ } from "@wordpress/i18n";
|
||||
import {
|
||||
useBlockProps,
|
||||
InnerBlocks,
|
||||
RichText,
|
||||
InspectorControls,
|
||||
AlignmentToolbar,
|
||||
BlockControls,
|
||||
PanelColorSettings,
|
||||
ContrastChecker,
|
||||
} from "@wordpress/block-editor";
|
||||
import {
|
||||
ToolbarButton,
|
||||
PanelBody,
|
||||
ToggleControl,
|
||||
TextControl,
|
||||
ColorPalette,
|
||||
ColorPicker,
|
||||
} from "@wordpress/components";
|
||||
import { Tooltip } from "@wordpress/components";
|
||||
|
||||
import "./editor.scss";
|
||||
export default function Edit({ attributes, setAttributes }) {
|
||||
const { montexte, textAlignment } = attributes;
|
||||
|
||||
function onChangeAlignment(newAlignment) {
|
||||
console.log(newAlignment);
|
||||
setAttributes({ textAlignment: newAlignment });
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<InspectorControls>
|
||||
{/* LA méthode pour chopper les couleurs du thème */}
|
||||
{/* <PanelColorSettings
|
||||
title="Couleurs"
|
||||
icon="admin-appearance"
|
||||
initialOpen={false}
|
||||
colorSettings={[
|
||||
{
|
||||
value: backgroundColor,
|
||||
onChange: (value) => setAttributes({ backgroundColor: value }),
|
||||
label: "Couleur de fond",
|
||||
},
|
||||
{
|
||||
value: textColor,
|
||||
onChange: (value) => setAttributes({ textColor: value }),
|
||||
label: "Couleur de texte",
|
||||
},
|
||||
]}
|
||||
>
|
||||
<ContrastChecker textColor="#fff" backgroundColor={backgroundColor} />
|
||||
</PanelColorSettings> */}
|
||||
</InspectorControls>
|
||||
|
||||
{/* Controle de block -> toolbar du dessus */}
|
||||
|
||||
<BlockControls>
|
||||
<AlignmentToolbar value={textAlignment} onChange={onChangeAlignment} />
|
||||
|
||||
<ToolbarButton onClick={() => console.log("salut")}>
|
||||
Salut
|
||||
</ToolbarButton>
|
||||
</BlockControls>
|
||||
<div>
|
||||
<RichText
|
||||
{...useBlockProps()}
|
||||
className="homegrade-content-blocks-rich-paragraph"
|
||||
onChange={(value) => setAttributes({ montexte: value })}
|
||||
value={montexte}
|
||||
placeholder={__("Votre Text Monsieur", "homegrade-blocks")}
|
||||
tagName="h2"
|
||||
allowedFormats={[]}
|
||||
style={{ textAlign: textAlignment }}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
/**
|
||||
* The following styles get applied inside the editor only.
|
||||
*
|
||||
* Replace them with your own styles or remove the file completely.
|
||||
*/
|
||||
|
||||
.homegrade-content-blocks-rich-paragraph {
|
||||
border: 1px dotted #f00;
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
import { registerBlockType } from "@wordpress/blocks";
|
||||
import "./style.scss";
|
||||
|
||||
import Edit from "./edit";
|
||||
import save from "./save";
|
||||
import metadata from "./block.json";
|
||||
|
||||
registerBlockType(metadata.name, {
|
||||
icon: {
|
||||
src: (
|
||||
<svg id="Calque_2" viewBox="0 0 70 77.4">
|
||||
<g id="Layer_1">
|
||||
<path d="m42.8,23.78c-2-1.1-4.5.3-4.5,2.6v10.3c0,1.1.6,2.1,1.5,2.6l10.8,6.3c1.1.7,2.5-.1,2.5-1.4v-12.7c0-1.1-.6-2.1-1.5-2.6l-8.8-5.1Zm-15.8.1l-8.8,5.1c-.9.5-1.5,1.5-1.5,2.6v12.9c0,1.2,1.3,1.9,2.3,1.3l11-6.4c1-.6,1.5-1.5,1.5-2.5v-10.4c0-2.3-2.5-3.8-4.5-2.6Zm-19.3-3.3l4.2,2.4c.9.5,2.1.5,3,0l18.5-10.8c.9-.5,2.1-.5,3,0l18.5,10.8c.9.6,2.1.6,3,0l4.2-2.4c2-1.2,2-4,0-5.2L36.4.38c-.9-.5-2.1-.5-3,0L7.7,15.38c-2,1.2-2,4,0,5.2Zm57.8,6l-4.1,2.4c-.9.5-1.5,1.5-1.5,2.6v21.7c0,1.1-.6,2.1-1.5,2.6l-18.6,10.9c-.9.5-1.5,1.5-1.5,2.6v4.9c0,2.3,2.5,3.8,4.5,2.6l25.6-15c.9-.6,1.5-1.6,1.6-2.6v-30.1c0-2.3-2.5-3.8-4.5-2.6Zm-18.2,25.1l-11-6.4c-.9-.5-2.1-.5-3,0l-10.9,6.4c-1,.6-1,2.1,0,2.7l11,6.4c.9.5,2.1.5,3,0l10.9-6.4c1-.6,1-2.1,0-2.7Zm-17.2,15.2l-18.6-10.9c-.9-.5-1.5-1.5-1.5-2.6v-21.8c0-1.1-.6-2.1-1.4-2.6l-4.1-2.4c-2-1.2-4.5.3-4.5,2.6v30.2c0,1.1.6,2.1,1.5,2.6l25.6,15c2,1.2,4.5-.3,4.5-2.6v-4.9c0-1.1-.6-2.1-1.5-2.6Z" />
|
||||
</g>
|
||||
</svg>
|
||||
),
|
||||
foreground: "#0414eb",
|
||||
},
|
||||
edit: Edit,
|
||||
save,
|
||||
});
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
|
||||
|
||||
export default function save({ attributes }) {
|
||||
const { montexte } = attributes;
|
||||
|
||||
return (
|
||||
<div
|
||||
{...useBlockProps.save({
|
||||
className: `wpblock-citation-citation mydummytext`,
|
||||
})}
|
||||
>
|
||||
<RichText.Content tagName="h2" value={montexte} className="mydummytext" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
.homegrade-content-blocks-rich-paragraph {
|
||||
background-color: #21759b;
|
||||
color: #fff;
|
||||
padding: 2px;
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
# WordPress Coding Standards
|
||||
# https://make.wordpress.org/core/handbook/coding-standards/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = tab
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
30
blocks/_oldBlocks/to-know/.gitignore
vendored
30
blocks/_oldBlocks/to-know/.gitignore
vendored
|
|
@ -1,30 +0,0 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Output of `npm pack`
|
||||
*.tgz
|
||||
|
||||
# Output of `wp-scripts plugin-zip`
|
||||
*.zip
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "homegrade-content-blocks/to-know",
|
||||
"version": "0.1.0",
|
||||
"title": "À savoir / Astuces",
|
||||
"category": "homegrade-blocks",
|
||||
"icon": "smiley",
|
||||
"description": "Pour insérer des mises en page de à savoir.",
|
||||
"supports": {
|
||||
"html": false
|
||||
},
|
||||
"textdomain": "homegrade-blocks",
|
||||
"editorScript": "file:./index.js",
|
||||
"editorStyle": "file:./index.css",
|
||||
"style": "file:./style-index.css"
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => '9f220ef0d22beca445e8');
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
/*!****************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** 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/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/tips-container/editor.scss ***!
|
||||
\*******************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
@ -1,493 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/edit.js":
|
||||
/*!*********************!*\
|
||||
!*** ./src/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 _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/editor.scss");
|
||||
/* harmony import */ var _tips_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tips-container */ "./src/tips-container/index.js");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit() {
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)({
|
||||
className: `homegrade-blocks-to-know`
|
||||
})
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InnerBlocks, {
|
||||
allowedBlocks: ["homegrade-content-blocks/section-titling", "homegrade-content-blocks/tips-container", "core/paragraph"],
|
||||
template: [["homegrade-content-blocks/section-titling"]]
|
||||
}));
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/index.js":
|
||||
/*!**********************!*\
|
||||
!*** ./src/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/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./block.json */ "./src/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 91.6 100"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
|
||||
id: "Calque_1-2",
|
||||
"data-name": "Calque 1"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
||||
class: "cls-1",
|
||||
d: "m83.3,8.4v83.3H16.6c-4.2,0-8.3-2.1-8.3-8.3h66.7V0H12.5Q0,0,0,12.5v70.8c0,12.5,10.4,16.7,20.8,16.7h70.8V16.7l-8.3-8.3Zm-45.8,24.9c2.1-12.5,22.9-12.5,22.9,2.1,0,10.4-10.4,18.8-22.9,29.2-12.5-10.4-22.9-18.8-22.9-29.2,0-14.6,20.8-14.6,22.9-2.1Z"
|
||||
}))),
|
||||
foreground: "#f03"
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_4__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/save.js":
|
||||
/*!*********************!*\
|
||||
!*** ./src/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
|
||||
}) {
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
|
||||
className: `homegrade-blocks-to-know`
|
||||
})
|
||||
}, "Multiblocks – salut from the saved content!");
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/tips-container/edit.js":
|
||||
/*!************************************!*\
|
||||
!*** ./src/tips-container/edit.js ***!
|
||||
\************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _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 _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/tips-container/editor.scss");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit() {
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({
|
||||
className: `homegrade-blocks-to-know`
|
||||
})
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
|
||||
allowedBlocks: ["homegrade-content-blocks/section-titling", "core/paragraph"],
|
||||
template: [["homegrade-content-blocks/section-titling"]]
|
||||
}));
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/tips-container/index.js":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/tips-container/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/tips-container/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/tips-container/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/tips-container/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./block.json */ "./src/tips-container/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 91.6 100"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
|
||||
id: "Calque_1-2",
|
||||
"data-name": "Calque 1"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
||||
class: "cls-1",
|
||||
d: "m83.3,8.4v83.3H16.6c-4.2,0-8.3-2.1-8.3-8.3h66.7V0H12.5Q0,0,0,12.5v70.8c0,12.5,10.4,16.7,20.8,16.7h70.8V16.7l-8.3-8.3Zm-45.8,24.9c2.1-12.5,22.9-12.5,22.9,2.1,0,10.4-10.4,18.8-22.9,29.2-12.5-10.4-22.9-18.8-22.9-29.2,0-14.6,20.8-14.6,22.9-2.1Z"
|
||||
}))),
|
||||
foreground: "#f03"
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_4__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/tips-container/save.js":
|
||||
/*!************************************!*\
|
||||
!*** ./src/tips-container/save.js ***!
|
||||
\************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _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
|
||||
}) {
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
|
||||
className: `homegrade-blocks-to-know`
|
||||
})
|
||||
}, "Multiblocks – salut from the saved content!");
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/editor.scss":
|
||||
/*!*************************!*\
|
||||
!*** ./src/editor.scss ***!
|
||||
\*************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/style.scss":
|
||||
/*!************************!*\
|
||||
!*** ./src/style.scss ***!
|
||||
\************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/tips-container/editor.scss":
|
||||
/*!****************************************!*\
|
||||
!*** ./src/tips-container/editor.scss ***!
|
||||
\****************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/tips-container/style.scss":
|
||||
/*!***************************************!*\
|
||||
!*** ./src/tips-container/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/block.json":
|
||||
/*!************************!*\
|
||||
!*** ./src/block.json ***!
|
||||
\************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/to-know","version":"0.1.0","title":"À savoir / Astuces","category":"homegrade-blocks","icon":"smiley","description":"Pour insérer des mises en page de à savoir.","supports":{"html":false},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/tips-container/block.json":
|
||||
/*!***************************************!*\
|
||||
!*** ./src/tips-container/block.json ***!
|
||||
\***************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/tips-container","version":"0.1.0","title":"Tips container","category":"homegrade-blocks","icon":"smiley","description":"Pour insérer des tips","supports":{"html":false},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var chunkIds = deferred[i][0];
|
||||
/******/ var fn = deferred[i][1];
|
||||
/******/ var priority = deferred[i][2];
|
||||
/******/ 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 = {
|
||||
/******/ "index": 0,
|
||||
/******/ "./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 = data[0];
|
||||
/******/ var moreModules = data[1];
|
||||
/******/ var runtime = data[2];
|
||||
/******/ // 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 = self["webpackChunkmultiblocks"] = self["webpackChunkmultiblocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["./style-index"], () => (__webpack_require__("./src/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "homegrade-content-blocks/to-know",
|
||||
"version": "0.1.0",
|
||||
"title": "À savoir / Astuces",
|
||||
"category": "homegrade-blocks",
|
||||
"icon": "smiley",
|
||||
"description": "Pour insérer des mises en page de à savoir.",
|
||||
"supports": {
|
||||
"html": false
|
||||
},
|
||||
"textdomain": "homegrade-blocks",
|
||||
"editorScript": "file:./index.js",
|
||||
"editorStyle": "file:./index.css",
|
||||
"style": "file:./style-index.css"
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'ed778666468292c0834f');
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
/*!********************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** 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/src/editor.scss ***!
|
||||
\********************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
@ -1,353 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/src/edit.js":
|
||||
/*!*************************!*\
|
||||
!*** ./src/src/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 _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/src/editor.scss");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit() {
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({
|
||||
className: `homegrade-blocks-to-know`
|
||||
})
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
|
||||
allowedBlocks: ["homegrade-content-blocks/section-titling", "core/paragraph"],
|
||||
template: [["homegrade-content-blocks/section-titling"]]
|
||||
}));
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/src/index.js":
|
||||
/*!**************************!*\
|
||||
!*** ./src/src/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/src/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/src/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/src/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./block.json */ "./src/src/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 91.6 100"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
|
||||
id: "Calque_1-2",
|
||||
"data-name": "Calque 1"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
||||
class: "cls-1",
|
||||
d: "m83.3,8.4v83.3H16.6c-4.2,0-8.3-2.1-8.3-8.3h66.7V0H12.5Q0,0,0,12.5v70.8c0,12.5,10.4,16.7,20.8,16.7h70.8V16.7l-8.3-8.3Zm-45.8,24.9c2.1-12.5,22.9-12.5,22.9,2.1,0,10.4-10.4,18.8-22.9,29.2-12.5-10.4-22.9-18.8-22.9-29.2,0-14.6,20.8-14.6,22.9-2.1Z"
|
||||
}))),
|
||||
foreground: "#f03"
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_4__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/src/save.js":
|
||||
/*!*************************!*\
|
||||
!*** ./src/src/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
|
||||
}) {
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
|
||||
className: `homegrade-blocks-to-know`
|
||||
})
|
||||
}, "Multiblocks – salut from the saved content!");
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/src/editor.scss":
|
||||
/*!*****************************!*\
|
||||
!*** ./src/src/editor.scss ***!
|
||||
\*****************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/src/style.scss":
|
||||
/*!****************************!*\
|
||||
!*** ./src/src/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/src/block.json":
|
||||
/*!****************************!*\
|
||||
!*** ./src/src/block.json ***!
|
||||
\****************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/to-know","version":"0.1.0","title":"À savoir / Astuces","category":"homegrade-blocks","icon":"smiley","description":"Pour insérer des mises en page de à savoir.","supports":{"html":false},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var chunkIds = deferred[i][0];
|
||||
/******/ var fn = deferred[i][1];
|
||||
/******/ var priority = deferred[i][2];
|
||||
/******/ 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 = {
|
||||
/******/ "src/index": 0,
|
||||
/******/ "src/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 = data[0];
|
||||
/******/ var moreModules = data[1];
|
||||
/******/ var runtime = data[2];
|
||||
/******/ // 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 = self["webpackChunkmultiblocks"] = self["webpackChunkmultiblocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["src/style-index"], () => (__webpack_require__("./src/src/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +0,0 @@
|
|||
/*!*******************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/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/src/style.scss ***!
|
||||
\*******************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
/*!***************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** 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/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/tips-container/style.scss ***!
|
||||
\******************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "homegrade-content-blocks/tips-container",
|
||||
"version": "0.1.0",
|
||||
"title": "Tips container",
|
||||
"category": "homegrade-blocks",
|
||||
"icon": "smiley",
|
||||
"description": "Pour insérer des tips",
|
||||
"supports": {
|
||||
"html": false
|
||||
},
|
||||
"textdomain": "homegrade-blocks",
|
||||
"editorScript": "file:./index.js",
|
||||
"editorStyle": "file:./index.css",
|
||||
"style": "file:./style-index.css"
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'fda5eb491fc416dd0183');
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
/*!*******************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** 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/tips-container/editor.scss ***!
|
||||
\*******************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
@ -1,353 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/tips-container/edit.js":
|
||||
/*!************************************!*\
|
||||
!*** ./src/tips-container/edit.js ***!
|
||||
\************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _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 _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/tips-container/editor.scss");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit() {
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({
|
||||
className: `homegrade-blocks-to-know`
|
||||
})
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
|
||||
allowedBlocks: ["homegrade-content-blocks/section-titling", "core/paragraph"],
|
||||
template: [["homegrade-content-blocks/section-titling"]]
|
||||
}));
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/tips-container/index.js":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/tips-container/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/tips-container/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/tips-container/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/tips-container/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./block.json */ "./src/tips-container/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 91.6 100"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
|
||||
id: "Calque_1-2",
|
||||
"data-name": "Calque 1"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
||||
class: "cls-1",
|
||||
d: "m83.3,8.4v83.3H16.6c-4.2,0-8.3-2.1-8.3-8.3h66.7V0H12.5Q0,0,0,12.5v70.8c0,12.5,10.4,16.7,20.8,16.7h70.8V16.7l-8.3-8.3Zm-45.8,24.9c2.1-12.5,22.9-12.5,22.9,2.1,0,10.4-10.4,18.8-22.9,29.2-12.5-10.4-22.9-18.8-22.9-29.2,0-14.6,20.8-14.6,22.9-2.1Z"
|
||||
}))),
|
||||
foreground: "#f03"
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_4__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/tips-container/save.js":
|
||||
/*!************************************!*\
|
||||
!*** ./src/tips-container/save.js ***!
|
||||
\************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _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
|
||||
}) {
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
|
||||
className: `homegrade-blocks-to-know`
|
||||
})
|
||||
}, "Multiblocks – salut from the saved content!");
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/tips-container/editor.scss":
|
||||
/*!****************************************!*\
|
||||
!*** ./src/tips-container/editor.scss ***!
|
||||
\****************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/tips-container/style.scss":
|
||||
/*!***************************************!*\
|
||||
!*** ./src/tips-container/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/tips-container/block.json":
|
||||
/*!***************************************!*\
|
||||
!*** ./src/tips-container/block.json ***!
|
||||
\***************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/tips-container","version":"0.1.0","title":"Tips container","category":"homegrade-blocks","icon":"smiley","description":"Pour insérer des tips","supports":{"html":false},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var chunkIds = deferred[i][0];
|
||||
/******/ var fn = deferred[i][1];
|
||||
/******/ var priority = deferred[i][2];
|
||||
/******/ 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 = {
|
||||
/******/ "tips-container/index": 0,
|
||||
/******/ "./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 = data[0];
|
||||
/******/ var moreModules = data[1];
|
||||
/******/ var runtime = data[2];
|
||||
/******/ // 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 = self["webpackChunkmultiblocks"] = self["webpackChunkmultiblocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["./style-index"], () => (__webpack_require__("./src/tips-container/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user