diff --git a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/index.js.map b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/index.js.map
index 4854b47..b3a1401 100644
--- a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/index.js.map
+++ b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"dernieres-dynamiques/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACsC;AAO5C;AACR;AAAA;AAER,SAASgB,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC;EAAY,CAAC,GAAGF,UAAU;EAElC,SAASG,mBAAmBA,CAACC,KAAK,EAAE;IACnCH,aAAa,CAAC;MAAEC,WAAW,EAAEE;IAAM,CAAC,CAAC;EACtC;EAEA,oBACCR,uDAAA,CAAAE,uDAAA;IAAAO,QAAA,gBACCX,sDAAA,CAACV,sEAAiB;MAAAqB,QAAA,eACjBX,sDAAA,CAACR,4DAAS;QAACoB,KAAK,EAAEvB,mDAAE,CAAC,YAAY,EAAE,sBAAsB,CAAE;QAAAsB,QAAA,eAC1DT,uDAAA,CAACN,mFAAkB;UAClBiB,SAAS,EAAC,qCAAqC;UAC/CC,OAAO;UACPC,KAAK,EAAC,4BAA4B;UAClCC,QAAQ,EAAEP,mBAAoB;UAC9BC,KAAK,EAAEF,WAAY;UAAAG,QAAA,gBAEnBX,sDAAA,CAACF,yFAAwB;YAACiB,KAAK,EAAC,QAAQ;YAACL,KAAK,EAAC;UAAQ,CAAE,CAAC,eAC1DV,sDAAA,CAACF,yFAAwB;YAACiB,KAAK,EAAC,QAAQ;YAACL,KAAK,EAAC;UAAM,CAAE,CAAC;QAAA,CACrC;MAAC,CACX;IAAC,CACM,CAAC,eACpBV,sDAAA;MAAA,GAAOT,sEAAa,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A;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://dernieres-dynamiques/./src/dernieres-dynamiques/edit.js","webpack://dernieres-dynamiques/./src/dernieres-dynamiques/editor.scss","webpack://dernieres-dynamiques/./src/dernieres-dynamiques/index.js","webpack://dernieres-dynamiques/./src/dernieres-dynamiques/save.js","webpack://dernieres-dynamiques/./src/dernieres-dynamiques/style.scss","webpack://dernieres-dynamiques/external window [\"wp\",\"blockEditor\"]","webpack://dernieres-dynamiques/external window [\"wp\",\"blocks\"]","webpack://dernieres-dynamiques/external window [\"wp\",\"components\"]","webpack://dernieres-dynamiques/external window [\"wp\",\"i18n\"]","webpack://dernieres-dynamiques/external window \"ReactJSXRuntime\"","webpack://dernieres-dynamiques/webpack/bootstrap","webpack://dernieres-dynamiques/webpack/runtime/chunk loaded","webpack://dernieres-dynamiques/webpack/runtime/compat get default export","webpack://dernieres-dynamiques/webpack/runtime/define property getters","webpack://dernieres-dynamiques/webpack/runtime/hasOwnProperty shorthand","webpack://dernieres-dynamiques/webpack/runtime/make namespace object","webpack://dernieres-dynamiques/webpack/runtime/jsonp chunk loading","webpack://dernieres-dynamiques/webpack/before-startup","webpack://dernieres-dynamiques/webpack/startup","webpack://dernieres-dynamiques/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport { InspectorControls, useBlockProps } from \"@wordpress/block-editor\";\nimport {\n\tPanelBody,\n\tCheckboxControl,\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from \"@wordpress/components\";\nimport \"./editor.scss\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { displayType } = attributes;\n\n\tfunction onDisplayTypeChange(value) {\n\t\tsetAttributes({ displayType: value });\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t
\n\t\t\t\t{__(\n\t\t\t\t\t\"Dernieres Dynamiques – hello from the editor!\",\n\t\t\t\t\t\"dernieres-dynamiques\"\n\t\t\t\t)}\n\t\t\t
\n\t\t>\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tsrc: (\n\t\t\t\n\t\t),\n\t\tforeground: \"#136f63\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","/**\n * React hook that is used to mark the block wrapper element.\n * It provides all the necessary props like the class name.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops\n */\nimport { useBlockProps } from '@wordpress/block-editor';\n\n/**\n * The save function defines the way in which the different attributes should\n * be combined into the final markup, which is then serialized by the block\n * editor into `post_content`.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save\n *\n * @return {Element} Element to render.\n */\nexport default function save() {\n\treturn (\n\t\t\n\t\t\t{ 'Dernieres Dynamiques – hello from the saved content!' }\n\t\t
\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"ReactJSXRuntime\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"dernieres-dynamiques/index\": 0,\n\t\"dernieres-dynamiques/style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkdernieres_dynamiques\"] = globalThis[\"webpackChunkdernieres_dynamiques\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"dernieres-dynamiques/style-index\"], () => (__webpack_require__(\"./src/dernieres-dynamiques/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","InspectorControls","useBlockProps","PanelBody","CheckboxControl","ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","displayType","onDisplayTypeChange","value","children","title","className","isBlock","label","onChange","registerBlockType","save","metadata","name","icon","src","width","height","viewBox","fill","xmlns","d","foreground","edit"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"dernieres-dynamiques/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACsC;AAO5C;AACR;AAAA;AAER,SAASgB,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC;EAAY,CAAC,GAAGF,UAAU;EAElC,SAASG,mBAAmBA,CAACC,KAAK,EAAE;IACnCH,aAAa,CAAC;MAAEC,WAAW,EAAEE;IAAM,CAAC,CAAC;EACtC;EAEA,oBACCR,uDAAA,CAAAE,uDAAA;IAAAO,QAAA,gBACCX,sDAAA,CAACV,sEAAiB;MAAAqB,QAAA,eACjBX,sDAAA,CA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,oBACClB,sDAAA;IAAA,GAAQT,kEAAa,CAAC2B,IAAI,CAAC,CAAC;IAAAP,QAAA,EACzB;EAAsD,CACtD,CAAC;AAEN;;;;;;;;;;;ACvBA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://dernieres-dynamiques/./src/dernieres-dynamiques/edit.js","webpack://dernieres-dynamiques/./src/dernieres-dynamiques/editor.scss?9695","webpack://dernieres-dynamiques/./src/dernieres-dynamiques/index.js","webpack://dernieres-dynamiques/./src/dernieres-dynamiques/save.js","webpack://dernieres-dynamiques/./src/dernieres-dynamiques/style.scss?a386","webpack://dernieres-dynamiques/external window [\"wp\",\"blockEditor\"]","webpack://dernieres-dynamiques/external window [\"wp\",\"blocks\"]","webpack://dernieres-dynamiques/external window [\"wp\",\"components\"]","webpack://dernieres-dynamiques/external window [\"wp\",\"i18n\"]","webpack://dernieres-dynamiques/external window \"ReactJSXRuntime\"","webpack://dernieres-dynamiques/webpack/bootstrap","webpack://dernieres-dynamiques/webpack/runtime/chunk loaded","webpack://dernieres-dynamiques/webpack/runtime/compat get default export","webpack://dernieres-dynamiques/webpack/runtime/define property getters","webpack://dernieres-dynamiques/webpack/runtime/hasOwnProperty shorthand","webpack://dernieres-dynamiques/webpack/runtime/make namespace object","webpack://dernieres-dynamiques/webpack/runtime/jsonp chunk loading","webpack://dernieres-dynamiques/webpack/before-startup","webpack://dernieres-dynamiques/webpack/startup","webpack://dernieres-dynamiques/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport { InspectorControls, useBlockProps } from \"@wordpress/block-editor\";\nimport {\n\tPanelBody,\n\tCheckboxControl,\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from \"@wordpress/components\";\nimport \"./editor.scss\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { displayType } = attributes;\n\n\tfunction onDisplayTypeChange(value) {\n\t\tsetAttributes({ displayType: value });\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t{__(\n\t\t\t\t\t\"Dernieres Dynamiques – hello from the editor!\",\n\t\t\t\t\t\"dernieres-dynamiques\"\n\t\t\t\t)}\n\t\t\t
\n\t\t>\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tsrc: (\n\t\t\t\n\t\t),\n\t\tforeground: \"#136f63\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","/**\n * React hook that is used to mark the block wrapper element.\n * It provides all the necessary props like the class name.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops\n */\nimport { useBlockProps } from '@wordpress/block-editor';\n\n/**\n * The save function defines the way in which the different attributes should\n * be combined into the final markup, which is then serialized by the block\n * editor into `post_content`.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save\n *\n * @return {Element} Element to render.\n */\nexport default function save() {\n\treturn (\n\t\t\n\t\t\t{ 'Dernieres Dynamiques – hello from the saved content!' }\n\t\t
\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"ReactJSXRuntime\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"dernieres-dynamiques/index\": 0,\n\t\"dernieres-dynamiques/style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkdernieres_dynamiques\"] = globalThis[\"webpackChunkdernieres_dynamiques\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"dernieres-dynamiques/style-index\"], () => (__webpack_require__(\"./src/dernieres-dynamiques/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","InspectorControls","useBlockProps","PanelBody","CheckboxControl","ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","displayType","onDisplayTypeChange","value","children","title","className","isBlock","label","onChange","registerBlockType","save","metadata","name","icon","src","width","height","viewBox","fill","xmlns","d","foreground","edit"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.asset.php b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.asset.php index 5615064..c070545 100644 --- a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.asset.php +++ b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.asset.php @@ -1 +1 @@ - array(), 'version' => 'e2a42947538603e62de3'); + array(), 'version' => 'e4c93dfaede1db21fc16'); diff --git a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js index 7676503..0f4cd3f 100644 --- a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js +++ b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js @@ -2,14 +2,24 @@ /*!******************************************!*\ !*** ./src/dernieres-dynamiques/view.js ***! \******************************************/ -document.addEventListener("DOMContentLoaded", function () { +function swiperCheckBreakpoints() { + const hasSwiper = dernieresDynamiquesSwiper.__swiper__ === true; + + // if (window.innerWidth < 960 && hasSwiper) { + // dernieresDynamiquesSwiper.destroy(true, true); + // } + // if (window.innerWidth >= 960 && !hasSwiper) { + // initiateSwiper(); + // } +} +function initiateSwiper() { const currentBlock = document.querySelector(".block-dernieres-dynamiques"); if (!currentBlock) return; const swiperFraction = currentBlock.querySelector(".swiper-pagination-fraction"); const slides = currentBlock.querySelectorAll(".swiper-slide"); const slideCount = slides.length; swiperFraction.textContent = `Article n°1 sur ${slideCount}`; - new Swiper(".dernieres-dynamiques-swiper", { + dernieresDynamiquesSwiper = new Swiper(".dernieres-dynamiques-swiper", { slidesPerView: 2, spaceBetween: 30, loop: true, @@ -25,39 +35,30 @@ document.addEventListener("DOMContentLoaded", function () { return ``; } }, + breakpoints: { + // when window width is >= 320px + + // when window width is >= 480px + 320: { + slidesPerView: 1 + }, + // when window width is >= 640px + 1100: { + slidesPerView: 2 + } + }, on: { slideChange: swiper => { const slidesCount = swiper?.slides?.length; swiperFraction.textContent = `Article n°${swiper.realIndex + 1} sur ${slidesCount}`; } } - - // pagination: [ - // { - // el: ".swiper-pagination", - // type: "bullets", - // clickable: true, - // }, - // { - // el: ".swiper-pagination-fraction", - // type: "fraction", - // renderFraction: function (currentClass, totalClass) { - // return ( - // '' + - // "Article n°" + - // '' + - // " sur " + - // '' + - // "
" - // ); - // }, - // }, - // ], }); +} +window.addEventListener("DOMContentLoaded", event => { + initiateSwiper(); + swiperCheckBreakpoints(); + window.addEventListener("resize", swiperCheckBreakpoints); }); /******/ })() ; diff --git a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js.map b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js.map index ffed2ab..f70a2fb 100644 --- a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js.map +++ b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js.map @@ -1 +1 @@ -{"version":3,"file":"dernieres-dynamiques/view.js","mappings":";;;;AAAAA,QAAQ,CAACC,gBAAgB,CAAC,kBAAkB,EAAE,YAAY;EACzD,MAAMC,YAAY,GAAGF,QAAQ,CAACG,aAAa,CAAC,6BAA6B,CAAC;EAC1E,IAAI,CAACD,YAAY,EAAE;EAEnB,MAAME,cAAc,GAAGF,YAAY,CAACC,aAAa,CAChD,6BACD,CAAC;EACD,MAAME,MAAM,GAAGH,YAAY,CAACI,gBAAgB,CAAC,eAAe,CAAC;EAC7D,MAAMC,UAAU,GAAGF,MAAM,CAACG,MAAM;EAChCJ,cAAc,CAACK,WAAW,GAAG,mBAAmBF,UAAU,EAAE;EAE5D,IAAIG,MAAM,CAAC,8BAA8B,EAAE;IAC1CC,aAAa,EAAE,CAAC;IAChBC,YAAY,EAAE,EAAE;IAChBC,IAAI,EAAE,IAAI;IACVC,UAAU,EAAE,IAAI;IAChBC,UAAU,EAAE;MACXC,MAAM,EAAE,qBAAqB;MAC7BC,MAAM,EAAE;IACT,CAAC;IACDC,UAAU,EAAE;MACXC,EAAE,EAAE,oBAAoB;MACxBC,SAAS,EAAE,IAAI;MACfC,YAAY,EAAE,SAAAA,CAAUC,KAAK,EAAEC,SAAS,EAAE;QACzC,OAAO,kBAAkBA,SAAS,aAAa;MAChD;IACD,CAAC;IACDC,EAAE,EAAE;MACHC,WAAW,EAAGC,MAAM,IAAK;QACxB,MAAMC,WAAW,GAAGD,MAAM,EAAErB,MAAM,EAAEG,MAAM;QAC1CJ,cAAc,CAACK,WAAW,GAAG,aAC5BiB,MAAM,CAACE,SAAS,GAAG,CAAC,QACbD,WAAW,EAAE;MACtB;IACD;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACD,CAAC,CAAC;AACH,CAAC,CAAC,C","sources":["webpack://dernieres-dynamiques/./src/dernieres-dynamiques/view.js"],"sourcesContent":["document.addEventListener(\"DOMContentLoaded\", function () {\n\tconst currentBlock = document.querySelector(\".block-dernieres-dynamiques\");\n\tif (!currentBlock) return;\n\n\tconst swiperFraction = currentBlock.querySelector(\n\t\t\".swiper-pagination-fraction\"\n\t);\n\tconst slides = currentBlock.querySelectorAll(\".swiper-slide\");\n\tconst slideCount = slides.length;\n\tswiperFraction.textContent = `Article n°1 sur ${slideCount}`;\n\n\tnew Swiper(\".dernieres-dynamiques-swiper\", {\n\t\tslidesPerView: 2,\n\t\tspaceBetween: 30,\n\t\tloop: true,\n\t\tgrabCursor: true,\n\t\tnavigation: {\n\t\t\tnextEl: \".swiper-button-next\",\n\t\t\tprevEl: \".swiper-button-prev\",\n\t\t},\n\t\tpagination: {\n\t\t\tel: \".swiper-pagination\",\n\t\t\tclickable: true,\n\t\t\trenderBullet: function (index, className) {\n\t\t\t\treturn ``;\n\t\t\t},\n\t\t},\n\t\ton: {\n\t\t\tslideChange: (swiper) => {\n\t\t\t\tconst slidesCount = swiper?.slides?.length;\n\t\t\t\tswiperFraction.textContent = `Article n°${\n\t\t\t\t\tswiper.realIndex + 1\n\t\t\t\t} sur ${slidesCount}`;\n\t\t\t},\n\t\t},\n\n\t\t// pagination: [\n\t\t// \t{\n\t\t// \t\tel: \".swiper-pagination\",\n\t\t// \t\ttype: \"bullets\",\n\t\t// \t\tclickable: true,\n\t\t// \t},\n\t\t// \t{\n\t\t// \t\tel: \".swiper-pagination-fraction\",\n\t\t// \t\ttype: \"fraction\",\n\t\t// \t\trenderFraction: function (currentClass, totalClass) {\n\t\t// \t\t\treturn (\n\t\t// \t\t\t\t'' +\n\t\t// \t\t\t\t\"Article n°\" +\n\t\t// \t\t\t\t'' +\n\t\t// \t\t\t\t\" sur \" +\n\t\t// \t\t\t\t'' +\n\t\t// \t\t\t\t\"
\"\n\t\t// \t\t\t);\n\t\t// \t\t},\n\t\t// \t},\n\t\t// ],\n\t});\n});\n"],"names":["document","addEventListener","currentBlock","querySelector","swiperFraction","slides","querySelectorAll","slideCount","length","textContent","Swiper","slidesPerView","spaceBetween","loop","grabCursor","navigation","nextEl","prevEl","pagination","el","clickable","renderBullet","index","className","on","slideChange","swiper","slidesCount","realIndex"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"dernieres-dynamiques/view.js","mappings":";;;;AAAA,SAASA,sBAAsBA,CAAA,EAAG;EACjC,MAAMC,SAAS,GAAGC,yBAAyB,CAACC,UAAU,KAAK,IAAI;;EAE/D;EACA;EACA;EACA;EACA;EACA;AACD;AAEA,SAASC,cAAcA,CAAA,EAAG;EACzB,MAAMC,YAAY,GAAGC,QAAQ,CAAC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C,sBAAsB,CAAC;AAC1D,CAAC,CAAC,C","sources":["webpack://dernieres-dynamiques/./src/dernieres-dynamiques/view.js"],"sourcesContent":["function swiperCheckBreakpoints() {\n\tconst hasSwiper = dernieresDynamiquesSwiper.__swiper__ === true;\n\n\t// if (window.innerWidth < 960 && hasSwiper) {\n\t// \tdernieresDynamiquesSwiper.destroy(true, true);\n\t// }\n\t// if (window.innerWidth >= 960 && !hasSwiper) {\n\t// \tinitiateSwiper();\n\t// }\n}\n\nfunction initiateSwiper() {\n\tconst currentBlock = document.querySelector(\".block-dernieres-dynamiques\");\n\tif (!currentBlock) return;\n\n\tconst swiperFraction = currentBlock.querySelector(\n\t\t\".swiper-pagination-fraction\"\n\t);\n\tconst slides = currentBlock.querySelectorAll(\".swiper-slide\");\n\tconst slideCount = slides.length;\n\tswiperFraction.textContent = `Article n°1 sur ${slideCount}`;\n\n\tdernieresDynamiquesSwiper = new Swiper(\".dernieres-dynamiques-swiper\", {\n\t\tslidesPerView: 2,\n\t\tspaceBetween: 30,\n\t\tloop: true,\n\t\tgrabCursor: true,\n\t\tnavigation: {\n\t\t\tnextEl: \".swiper-button-next\",\n\t\t\tprevEl: \".swiper-button-prev\",\n\t\t},\n\t\tpagination: {\n\t\t\tel: \".swiper-pagination\",\n\t\t\tclickable: true,\n\t\t\trenderBullet: function (index, className) {\n\t\t\t\treturn ``;\n\t\t\t},\n\t\t},\n\t\tbreakpoints: {\n\t\t\t// when window width is >= 320px\n\n\t\t\t// when window width is >= 480px\n\t\t\t320: {\n\t\t\t\tslidesPerView: 1,\n\t\t\t},\n\t\t\t// when window width is >= 640px\n\t\t\t1100: {\n\t\t\t\tslidesPerView: 2,\n\t\t\t},\n\t\t},\n\t\ton: {\n\t\t\tslideChange: (swiper) => {\n\t\t\t\tconst slidesCount = swiper?.slides?.length;\n\t\t\t\tswiperFraction.textContent = `Article n°${\n\t\t\t\t\tswiper.realIndex + 1\n\t\t\t\t} sur ${slidesCount}`;\n\t\t\t},\n\t\t},\n\t});\n}\n\nwindow.addEventListener(\"DOMContentLoaded\", (event) => {\n\tinitiateSwiper();\n\tswiperCheckBreakpoints();\n\n\twindow.addEventListener(\"resize\", swiperCheckBreakpoints);\n});\n"],"names":["swiperCheckBreakpoints","hasSwiper","dernieresDynamiquesSwiper","__swiper__","initiateSwiper","currentBlock","document","querySelector","swiperFraction","slides","querySelectorAll","slideCount","length","textContent","Swiper","slidesPerView","spaceBetween","loop","grabCursor","navigation","nextEl","prevEl","pagination","el","clickable","renderBullet","index","className","breakpoints","on","slideChange","swiper","slidesCount","realIndex","window","addEventListener","event"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/src/dernieres-dynamiques/view.js b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/src/dernieres-dynamiques/view.js index f1865f0..b022df2 100644 --- a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/src/dernieres-dynamiques/view.js +++ b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/src/dernieres-dynamiques/view.js @@ -1,4 +1,15 @@ -document.addEventListener("DOMContentLoaded", function () { +function swiperCheckBreakpoints() { + const hasSwiper = dernieresDynamiquesSwiper.__swiper__ === true; + + // if (window.innerWidth < 960 && hasSwiper) { + // dernieresDynamiquesSwiper.destroy(true, true); + // } + // if (window.innerWidth >= 960 && !hasSwiper) { + // initiateSwiper(); + // } +} + +function initiateSwiper() { const currentBlock = document.querySelector(".block-dernieres-dynamiques"); if (!currentBlock) return; @@ -9,7 +20,7 @@ document.addEventListener("DOMContentLoaded", function () { const slideCount = slides.length; swiperFraction.textContent = `Article n°1 sur ${slideCount}`; - new Swiper(".dernieres-dynamiques-swiper", { + dernieresDynamiquesSwiper = new Swiper(".dernieres-dynamiques-swiper", { slidesPerView: 2, spaceBetween: 30, loop: true, @@ -25,6 +36,18 @@ document.addEventListener("DOMContentLoaded", function () { return ``; }, }, + breakpoints: { + // when window width is >= 320px + + // when window width is >= 480px + 320: { + slidesPerView: 1, + }, + // when window width is >= 640px + 1100: { + slidesPerView: 2, + }, + }, on: { slideChange: (swiper) => { const slidesCount = swiper?.slides?.length; @@ -33,31 +56,12 @@ document.addEventListener("DOMContentLoaded", function () { } sur ${slidesCount}`; }, }, - - // pagination: [ - // { - // el: ".swiper-pagination", - // type: "bullets", - // clickable: true, - // }, - // { - // el: ".swiper-pagination-fraction", - // type: "fraction", - // renderFraction: function (currentClass, totalClass) { - // return ( - // '' + - // "Article n°" + - // '' + - // " sur " + - // '' + - // "
" - // ); - // }, - // }, - // ], }); +} + +window.addEventListener("DOMContentLoaded", (event) => { + initiateSwiper(); + swiperCheckBreakpoints(); + + window.addEventListener("resize", swiperCheckBreakpoints); });