Compare commits

..

5 Commits

Author SHA1 Message Date
Antoine M
e6d2ca7023 FEATURE Adatping correct nameclasses for block
All checks were successful
continuous-integration/drone/push Build is passing
2026-05-11 11:17:38 +02:00
Antoine M
017dc7c1ef building 2026-05-11 11:17:20 +02:00
Antoine M
50b8875ae2 building 2026-05-11 11:17:03 +02:00
Antoine M
eecb5e01e7 REFACTOR clean up iframe structure in custom video block 2026-05-11 11:16:52 +02:00
Antoine M
838ccdf6ec FEATURE updating menu icons for post types 2026-05-11 11:16:44 +02:00
17 changed files with 459 additions and 6 deletions

View File

@ -57,7 +57,7 @@ function carhop_create_posttype()
'has_archive' => true,
'rewrite' => array('slug' => 'actualites'),
'show_in_rest' => true,
'menu_icon' => 'dashicons-admin-post',
'menu_icon' => 'dashicons-buddicons-pm',
'menu_position' => 4,
'supports' => array('title', 'editor', 'thumbnail'),
'taxonomies' => array('etiquettes'),
@ -262,7 +262,7 @@ function carhop_create_posttype()
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'reportages'),
'menu_icon' => 'data:image/svg+xml;base64,' . base64_encode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.25 3.92857H16.05L11.25 0.785714V0.714286C11.25 0.321429 10.9125 0 10.5 0C10.0875 0 9.75 0.321429 9.75 0.714286V0.785714L4.95 3.92857H3.75C3.3375 3.92857 3 4.25 3 4.64286V19.2857C3 19.6786 3.3375 20 3.75 20H17.25C17.6625 20 18 19.6786 18 19.2857V4.64286C18 4.25 17.6625 3.92857 17.25 3.92857ZM10.2 1.35714C10.3125 1.39286 10.3875 1.42857 10.5 1.42857C10.6125 1.42857 10.725 1.42857 10.8 1.35714L14.7 3.92857H6.3L10.2 1.35714ZM16.5 15.3571C14.1375 11.75 12.9375 11.1786 11.55 12.9286C11.4 13.1071 11.175 13.3571 10.875 13.6429C10.9875 13.9643 11.1 14.2857 11.25 14.6071C12 16.8929 12.9 17.3929 13.65 17.8214L13.8375 17.9286L14.925 18.5357H13.4625C12.6 18.0357 11.4375 17.5714 10.5375 14.8214C10.35 14.2857 10.2 13.8214 10.0125 13.4286C8.6625 10.2857 7.2 10.3571 6.225 11.1429C5.625 11.6429 5.0625 12.3929 4.5 13.2857V5.35714H16.5V15.3571ZM13.875 8.92857C14.5125 8.92857 15 8.46429 15 7.85714C15 7.25 14.5125 6.78571 13.875 6.78571C13.2375 6.78571 12.75 7.25 12.75 7.85714C12.75 8.46429 13.2375 8.92857 13.875 8.92857Z" fill="#9BA2A9"/></svg>'),
'menu_icon' => 'dashicons-megaphone',
'show_in_rest' => true,
'supports' => array('title', 'revisions'),
'menu_position' => 4,

View File

@ -11,9 +11,7 @@ if($share_link){
<section <?php echo get_block_wrapper_attributes(array('class' => 'block-custom-video custom-video content-section')) ?>>
<iframe id="ik-vod-<?php echo $video_id_from_share_link ; ?>" class="ik-player-1jhvl2upwockr ik-embed" src="https://player.vod2.infomaniak.com/embed/<?php echo $video_id_from_share_link ; ?>" width="100%" height="auto" style="aspect-ratio: 16 / 9" allowfullscreen crossorigin="anonymous" frameborder="0" allow="autoplay; fullscreen; picture-in-picture"></iframe>
</section>

View File

@ -1042,6 +1042,28 @@ return array(
'render' => 'file:./render.php',
'viewScript' => 'file:./view.js'
),
'reportages-list' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'carhop-blocks/reportages-list',
'version' => '0.1.0',
'title' => 'Liste des reportages',
'category' => 'carhop-blocks',
'icon' => 'smiley',
'description' => 'Liste des reportages',
'example' => array(
),
'supports' => array(
'html' => false
),
'textdomain' => 'carhop-blocks',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'render' => 'file:./render.php',
'viewScript' => 'file:./view.js'
),
'scroll-story-block' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,

View File

@ -0,0 +1,20 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "carhop-blocks/reportages-list",
"version": "0.1.0",
"title": "Liste des reportages",
"category": "carhop-blocks",
"icon": "smiley",
"description": "Liste des reportages",
"example": {},
"supports": {
"html": false
},
"textdomain": "carhop-blocks",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"render": "file:./render.php",
"viewScript": "file:./view.js"
}

View File

@ -0,0 +1,4 @@
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/reportages-list/editor.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -0,0 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n', 'wp-server-side-render'), 'version' => '36357dfa806be08ff9c1');

View File

@ -0,0 +1,4 @@
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/reportages-list/editor.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -0,0 +1,327 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/reportages-list/block.json":
/*!****************************************!*\
!*** ./src/reportages-list/block.json ***!
\****************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/reportages-list","version":"0.1.0","title":"Liste des reportages","category":"carhop-blocks","icon":"smiley","description":"Liste des reportages","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","viewScript":"file:./view.js"}');
/***/ }),
/***/ "./src/reportages-list/edit.js":
/*!*************************************!*\
!*** ./src/reportages-list/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_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/reportages-list/editor.scss");
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/server-side-render */ "@wordpress/server-side-render");
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__);
function Edit() {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: "alignwide"
}),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)((_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_3___default()), {
block: "carhop-blocks/reportages-list"
})
});
}
/***/ }),
/***/ "./src/reportages-list/editor.scss":
/*!*****************************************!*\
!*** ./src/reportages-list/editor.scss ***!
\*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/reportages-list/index.js":
/*!**************************************!*\
!*** ./src/reportages-list/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/reportages-list/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/reportages-list/edit.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/reportages-list/block.json");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__);
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_3__.name, {
icon: {
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("svg", {
width: "32",
height: "32",
viewBox: "0 0 32 32",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("path", {
d: "M16 24L8 16L16 8L24 16L16 24Z"
})
})
},
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"]
});
/***/ }),
/***/ "./src/reportages-list/style.scss":
/*!****************************************!*\
!*** ./src/reportages-list/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/i18n":
/*!******************************!*\
!*** external ["wp","i18n"] ***!
\******************************/
/***/ ((module) => {
module.exports = window["wp"]["i18n"];
/***/ }),
/***/ "@wordpress/server-side-render":
/*!******************************************!*\
!*** external ["wp","serverSideRender"] ***!
\******************************************/
/***/ ((module) => {
module.exports = window["wp"]["serverSideRender"];
/***/ }),
/***/ "react/jsx-runtime":
/*!**********************************!*\
!*** external "ReactJSXRuntime" ***!
\**********************************/
/***/ ((module) => {
module.exports = window["ReactJSXRuntime"];
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "reportages-list/index": 0,
/******/ "reportages-list/style-index": 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
/******/ 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, ["reportages-list/style-index"], () => (__webpack_require__("./src/reportages-list/index.js")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
<?php
$wrapper_attributes = get_block_wrapper_attributes(['class' => 'reportages-list alignwide']);
$contact_persons = get_field('contact_persons', 'option');
$ressources_graphiques = get_field('ressources_graphiques', 'option');
?>
<section <?php echo $wrapper_attributes; ?>>
<div class="ressources-tabs-grid ressources-grid-content-wrapper" data-active-tab="communiques">
<h2 class="reportages-grid__title">Quelques reportages</h2>
<?php get_template_part('template-parts/post-types/reportages/reportages-grid'); ?>
</div>
</section>

View File

@ -0,0 +1,14 @@
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/reportages-list/style.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied both on the front of your site
* and in the editor.
*
* Replace them with your own styles or remove the file completely.
*/
.wp-block-create-block-chapo {
background-color: #21759b;
color: #fff;
padding: 2px;
}

View File

@ -0,0 +1,16 @@
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/reportages-list/style.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied both on the front of your site
* and in the editor.
*
* Replace them with your own styles or remove the file completely.
*/
.wp-block-create-block-chapo {
background-color: #21759b;
color: #fff;
padding: 2px;
}
/*# sourceMappingURL=style-index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"reportages-list/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://carhop-blocks/./src/reportages-list/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-chapo {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => '69123d2c012743b30d20');

View File

@ -0,0 +1,28 @@
/******/ (() => { // webpackBootstrap
/*!*************************************!*\
!*** ./src/reportages-list/view.js ***!
\*************************************/
document.addEventListener("DOMContentLoaded", function () {
const toolbar = document.querySelector("#press-toolbar");
if (!toolbar) return;
const toolbarButtons = toolbar.querySelectorAll("button");
const ressourcesGridContentWrapper = document.querySelector(".ressources-grid-content-wrapper");
function setActiveTab(currentButton) {
toolbarButtons.forEach(button => {
button.setAttribute("aria-selected", "false");
});
currentButton.setAttribute("aria-selected", "true");
ressourcesGridContentWrapper.setAttribute("data-active-tab", currentButton.getAttribute("data-tab"));
}
function initToolbar() {
toolbarButtons.forEach(button => {
button.addEventListener("click", function () {
setActiveTab(button);
});
});
}
initToolbar();
});
/******/ })()
;
//# sourceMappingURL=view.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"reportages-list/view.js","mappings":";;;;AAAAA,QAAQ,CAACC,gBAAgB,CAAC,kBAAkB,EAAE,YAAY;EACzD,MAAMC,OAAO,GAAGF,QAAQ,CAACG,aAAa,CAAC,gBAAgB,CAAC;EACxD,IAAI,CAACD,OAAO,EAAE;EACd,MAAME,cAAc,GAAGF,OAAO,CAACG,gBAAgB,CAAC,QAAQ,CAAC;EACzD,MAAMC,4BAA4B,GAAGN,QAAQ,CAACG,aAAa,CAC1D,kCACD,CAAC;EAED,SAASI,YAAYA,CAACC,aAAa,EAAE;IACpCJ,cAAc,CAACK,OAAO,CAAEC,MAAM,IAAK;MAClCA,MAAM,CAACC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC;IAC9C,CAAC,CAAC;IAEFH,aAAa,CAACG,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC;IACnDL,4BAA4B,CAACK,YAAY,CACxC,iBAAiB,EACjBH,aAAa,CAACI,YAAY,CAAC,UAAU,CACtC,CAAC;EACF;EAEA,SAASC,WAAWA,CAAA,EAAG;IACtBT,cAAc,CAACK,OAAO,CAAEC,MAAM,IAAK;MAClCA,MAAM,CAACT,gBAAgB,CAAC,OAAO,EAAE,YAAY;QAC5CM,YAAY,CAACG,MAAM,CAAC;MACrB,CAAC,CAAC;IACH,CAAC,CAAC;EACH;EACAG,WAAW,CAAC,CAAC;AACd,CAAC,CAAC,C","sources":["webpack://carhop-blocks/./src/reportages-list/view.js"],"sourcesContent":["document.addEventListener(\"DOMContentLoaded\", function () {\r\n\tconst toolbar = document.querySelector(\"#press-toolbar\");\r\n\tif (!toolbar) return;\r\n\tconst toolbarButtons = toolbar.querySelectorAll(\"button\");\r\n\tconst ressourcesGridContentWrapper = document.querySelector(\r\n\t\t\".ressources-grid-content-wrapper\"\r\n\t);\r\n\r\n\tfunction setActiveTab(currentButton) {\r\n\t\ttoolbarButtons.forEach((button) => {\r\n\t\t\tbutton.setAttribute(\"aria-selected\", \"false\");\r\n\t\t});\r\n\r\n\t\tcurrentButton.setAttribute(\"aria-selected\", \"true\");\r\n\t\tressourcesGridContentWrapper.setAttribute(\r\n\t\t\t\"data-active-tab\",\r\n\t\t\tcurrentButton.getAttribute(\"data-tab\")\r\n\t\t);\r\n\t}\r\n\r\n\tfunction initToolbar() {\r\n\t\ttoolbarButtons.forEach((button) => {\r\n\t\t\tbutton.addEventListener(\"click\", function () {\r\n\t\t\t\tsetActiveTab(button);\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\tinitToolbar();\r\n});\r\n"],"names":["document","addEventListener","toolbar","querySelector","toolbarButtons","querySelectorAll","ressourcesGridContentWrapper","setActiveTab","currentButton","forEach","button","setAttribute","getAttribute","initToolbar"],"ignoreList":[],"sourceRoot":""}

View File

@ -1,5 +1,5 @@
<?php
$wrapper_attributes = get_block_wrapper_attributes(['class' => 'press-ressources alignwide']);
$wrapper_attributes = get_block_wrapper_attributes(['class' => 'reportages-list alignwide']);
$contact_persons = get_field('contact_persons', 'option');
$ressources_graphiques = get_field('ressources_graphiques', 'option');
@ -8,7 +8,7 @@
<section <?php echo $wrapper_attributes; ?>>
<div class="ressources-tabs-grid ressources-grid-content-wrapper" data-active-tab="communiques">
<h2 class="reportages-grid__title">Quelques reportages</h2>
<?php get_template_part('template-parts/post-types/reportages/reportages-grid'); ?>
</div>