Compare commits

..

No commits in common. "e2a7b57b35fee48776999ec79ac85bd745449a49" and "a399f47397d3de134e24710965a460cb94e3e402" have entirely different histories.

69 changed files with 601 additions and 1185 deletions

View File

@ -43,7 +43,7 @@ function dynamiques_taxonomy_init()
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'meta_box_cb' => false,
'meta_box_cb' => true,
);
register_taxonomy('etiquettes', array('articles', 'revues'), $args);
}

View File

@ -1,7 +1,7 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "carhop-blocks/chapter-section",
"name": "deliblocks/chapter-section",
"version": "0.1.0",
"title": " Section Chapitre",
"category": "carhop-blocks",
@ -18,10 +18,6 @@
"viewScript": "file:./view.js",
"render": "file:./render.php",
"attributes": {
"align": {
"type": "string",
"default": "full"
},
"coverUrl": {
"type": "string"
},
@ -48,22 +44,6 @@
"left",
"right"
]
},
"hasBackgroundColor": {
"type": "boolean",
"default": false
},
"backgroundColor": {
"type": "string",
"default": "#ffffff"
},
"backgroundOrientation": {
"type": "string",
"default": "left",
"enum": [
"left",
"right"
]
}
},
"usesContext": [

View File

@ -1,6 +1,6 @@
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.98.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.3_webpack@5.98.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.85.1_webpack@5.98.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
/*!****************************************************************************************************************************************************************************************************************************************!*\
!*** 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 ***!
\****************************************************************************************************************************************************************************************************************************************/
.portfolio-header__cover {
z-index: 0 !important;
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '4d7a8310574bcf753578');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '30caa5e48ffaa311290f');

View File

@ -1,8 +1,8 @@
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.98.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.3_webpack@5.98.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.85.1_webpack@5.98.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
/*!****************************************************************************************************************************************************************************************************************************************!*\
!*** 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 ***!
\****************************************************************************************************************************************************************************************************************************************/
.portfolio-header__cover {
z-index: 0 !important;
}
/*# sourceMappingURL=index.css.map*/

View File

@ -1 +1 @@
{"version":3,"file":"index.css","mappings":";;;AAAA;EACC;AACD,C","sources":["webpack://portfolio-header/./src/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-chapter-section {\n\tmargin: 2rem calc(50% - 50vw);\n}\n"],"names":[],"sourceRoot":""}
{"version":3,"file":"index.css","mappings":";;;AACC;EACC;AAAF,C","sources":["webpack://portfolio-header/./src/editor.scss"],"sourcesContent":[".portfolio-header {\n\t&__cover {\n\t\tz-index: 0 !important;\n\t}\n}\n"],"names":[],"sourceRoot":""}

View File

@ -2,10 +2,10 @@
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/.pnpm/@wordpress+icons@10.19.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js":
/*!******************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/@wordpress+icons@10.19.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js ***!
\******************************************************************************************************************************/
/***/ "./node_modules/@wordpress/icons/build-module/library/trash.js":
/*!*********************************************************************!*\
!*** ./node_modules/@wordpress/icons/build-module/library/trash.js ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
@ -35,16 +35,6 @@ const trash = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx
/***/ }),
/***/ "./src/block.json":
/*!************************!*\
!*** ./src/block.json ***!
\************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/chapter-section","version":"0.1.0","title":" Section Chapitre","category":"carhop-blocks","icon":"smiley","description":"Example block scaffolded with Create Block tool.","example":{},"supports":{"html":false},"textdomain":"deliblocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php","attributes":{"align":{"type":"string","default":"full"},"coverUrl":{"type":"string"},"coverAlt":{"type":"string"},"coverId":{"type":"number"},"coverSize":{"type":"string","default":"large","enum":["small","medium","grande","large"]},"disposition":{"type":"string","default":"left","enum":["left","right"]},"hasBackgroundColor":{"type":"boolean","default":false},"backgroundColor":{"type":"string","default":"#ffffff"},"backgroundOrientation":{"type":"string","default":"left","enum":["left","right"]}},"usesContext":["postType","postId"]}');
/***/ }),
/***/ "./src/edit.js":
/*!*********************!*\
!*** ./src/edit.js ***!
@ -59,7 +49,7 @@ __webpack_require__.r(__webpack_exports__);
/* 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 _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/.pnpm/@wordpress+icons@10.19.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/trash.js");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/editor.scss");
@ -71,22 +61,17 @@ __webpack_require__.r(__webpack_exports__);
function Edit({
attributes,
setAttributes,
...props
}) {
const colors = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useSetting)("color.palette.theme");
const {
disposition,
coverUrl,
coverAlt,
coverId,
coverSize,
hasBackgroundColor,
backgroundColor,
backgroundOrientation
coverSize
} = attributes;
function onDispositionChange(disposition) {
setAttributes({
@ -112,29 +97,9 @@ function Edit({
coverUrl: null
});
}
function onBackgroundColorChange(value) {
setAttributes({
backgroundColor: value
});
}
function onHasBackgroundColorChange(value) {
setAttributes({
hasBackgroundColor: value
});
if (!value) {
setAttributes({
backgroundColor: null
});
}
}
function onBackgroundOrientationChange(value) {
setAttributes({
backgroundOrientation: value
});
}
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
className: "deligraph-blocks-components-image__panel-body",
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Image d'accompagnement", "deligraph-blocks"),
children: [coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
@ -191,49 +156,12 @@ function Edit({
value: "small"
})]
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
className: "deligraph-blocks-components-image__panel-body",
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Arrière plan", "deligraph-blocks"),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CheckboxControl, {
label: "Arri\xE8re plan color\xE9",
checked: hasBackgroundColor,
onChange: onHasBackgroundColorChange
}), hasBackgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ColorPalette, {
colors: colors,
value: backgroundColor,
onChange: onBackgroundColorChange
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControl, {
className: "deligraph-blocks__variant",
isBlock: true,
label: "Disposition",
onChange: onBackgroundOrientationChange,
value: backgroundOrientation,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, {
label: "Gauche",
value: "left"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, {
label: "Droite",
value: "right"
})]
})]
})]
})]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("section", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} ${hasBackgroundColor && backgroundColor ? "chapter-section--has-background" : ""}`
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition}`
}),
children: [hasBackgroundColor && backgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("svg", {
className: `chapter-section__background chapter-section__background--${backgroundOrientation}`,
width: "1302",
height: "654",
viewBox: "0 0 1302 654",
preserveAspectRatio: "none",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("path", {
d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z",
fill: backgroundColor
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: "chapter-section__content",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: "chapter-section__innerblocks",
@ -247,7 +175,7 @@ function Edit({
placeholder: "Chapter Title",
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue augue, sagittis quis mauris in, consequat vehicula est. Aliquam quis nulla ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras bibendum eget lorem eget aliquet. Fusce vel consequat neque. "
}]],
allowedBlocks: ["core/heading", "core/paragraph", "core/list", "core/button", "core/buttons", "carhop-blocks/cta"]
allowedBlocks: ["core/heading", "core/paragraph", "core/list", "core/button", "core/buttons"]
})
})
}), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
@ -265,18 +193,6 @@ function Edit({
});
}
/***/ }),
/***/ "./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/index.js":
@ -309,7 +225,7 @@ __webpack_require__.r(__webpack_exports__);
d: "M21,7H3V4A1,1,0,0,1,4,3H20a1,1,0,0,1,1,1ZM3,20V9H21V20a1,1,0,0,1-1,1H4A1,1,0,0,1,3,20Zm3-6H18V12H6Zm0,4h6V16H6Z"
})
}),
foreground: "#136f63"
foreground: "#723d46"
},
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
@ -340,26 +256,13 @@ function save({
disposition,
coverUrl,
coverAlt,
coverSize,
backgroundColor,
hasBackgroundColor,
backgroundOrientation
coverSize
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} ${backgroundColor ? "chapter-section--has-background" : ""}`
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} `
}),
children: [hasBackgroundColor && backgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {
className: `chapter-section__background chapter-section__background--${backgroundOrientation}`,
width: "1302",
height: "654",
viewBox: "0 0 1302 654",
preserveAspectRatio: "none",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", {
d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z",
fill: backgroundColor
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "chapter-section__content",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "chapter-section__innerblocks",
@ -373,6 +276,18 @@ function save({
});
}
/***/ }),
/***/ "./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":
@ -385,6 +300,16 @@ __webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "react/jsx-runtime":
/*!**********************************!*\
!*** external "ReactJSXRuntime" ***!
\**********************************/
/***/ ((module) => {
module.exports = window["ReactJSXRuntime"];
/***/ }),
/***/ "@wordpress/block-editor":
@ -437,13 +362,13 @@ module.exports = window["wp"]["primitives"];
/***/ }),
/***/ "react/jsx-runtime":
/*!**********************************!*\
!*** external "ReactJSXRuntime" ***!
\**********************************/
/***/ "./src/block.json":
/*!************************!*\
!*** ./src/block.json ***!
\************************/
/***/ ((module) => {
module.exports = window["ReactJSXRuntime"];
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"deliblocks/chapter-section","version":"0.1.0","title":" Section Chapitre","category":"carhop-blocks","icon":"smiley","description":"Example block scaffolded with Create Block tool.","example":{},"supports":{"html":false},"textdomain":"deliblocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php","attributes":{"coverUrl":{"type":"string"},"coverAlt":{"type":"string"},"coverId":{"type":"number"},"coverSize":{"type":"string","default":"large","enum":["small","medium","grande","large"]},"disposition":{"type":"string","default":"left","enum":["left","right"]}},"usesContext":["postType","postId"]}');
/***/ })

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,4 @@
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.98.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.3_webpack@5.98.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.85.1_webpack@5.98.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
}
/*!***************************************************************************************************************************************************************************************************************************************!*\
!*** 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 ***!
\***************************************************************************************************************************************************************************************************************************************/

View File

@ -1,8 +1,4 @@
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.98.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.3_webpack@5.98.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.85.1_webpack@5.98.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
}
/*!***************************************************************************************************************************************************************************************************************************************!*\
!*** 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 ***!
\***************************************************************************************************************************************************************************************************************************************/
/*# sourceMappingURL=style-index.css.map*/

View File

@ -1 +0,0 @@
{"version":3,"file":"./style-index.css","mappings":";;;AAAA;EACC;AACD,C","sources":["webpack://portfolio-header/./src/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-chapter-section {\r\n\tmargin: 2rem calc(50% - 50vw);\r\n}\r\n"],"names":[],"sourceRoot":""}

View File

@ -18,10 +18,6 @@
"viewScript": "file:./view.js",
"render": "file:./render.php",
"attributes": {
"align": {
"type": "string",
"default": "full"
},
"coverUrl": {
"type": "string"
},
@ -48,22 +44,6 @@
"left",
"right"
]
},
"hasBackgroundColor": {
"type": "boolean",
"default": false
},
"backgroundColor": {
"type": "string",
"default": "#ffffff"
},
"backgroundOrientation": {
"type": "string",
"default": "left",
"enum": [
"left",
"right"
]
}
},
"usesContext": [

View File

@ -1,3 +0,0 @@
<svg width="1302" height="654" viewBox="0 0 1302 654" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1302 0L0 15.8281V654L1302 642.633L1302 0Z" fill="#FCF3F8"/>
</svg>

Before

Width:  |  Height:  |  Size: 179 B

View File

@ -5,32 +5,19 @@ import {
InspectorControls,
MediaReplaceFlow,
MediaPlaceholder,
useSetting,
} from "@wordpress/block-editor";
import { lock, trash } from "@wordpress/icons";
import { ColorPalette } from "@wordpress/components";
import {
PanelBody,
__experimentalToggleGroupControl as ToggleGroupControl,
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
Button,
CheckboxControl,
} from "@wordpress/components";
import "./editor.scss";
export default function Edit({ attributes, setAttributes, ...props }) {
const colors = useSetting("color.palette.theme");
const {
disposition,
coverUrl,
coverAlt,
coverId,
coverSize,
hasBackgroundColor,
backgroundColor,
backgroundOrientation,
} = attributes;
const { disposition, coverUrl, coverAlt, coverId, coverSize } = attributes;
function onDispositionChange(disposition) {
setAttributes({ disposition });
}
@ -52,19 +39,6 @@ export default function Edit({ attributes, setAttributes, ...props }) {
coverUrl: null,
});
}
function onBackgroundColorChange(value) {
setAttributes({ backgroundColor: value });
}
function onHasBackgroundColorChange(value) {
setAttributes({ hasBackgroundColor: value });
if (!value) {
setAttributes({ backgroundColor: null });
}
}
function onBackgroundOrientationChange(value) {
setAttributes({ backgroundOrientation: value });
}
return (
<>
<InspectorControls>
@ -122,59 +96,12 @@ export default function Edit({ attributes, setAttributes, ...props }) {
<ToggleGroupControlOption label="Petite" value="small" />
</ToggleGroupControl>
</PanelBody>
<PanelBody
className="deligraph-blocks-components-image__panel-body"
title={__("Arrière plan", "deligraph-blocks")}
>
<CheckboxControl
label="Arrière plan coloré"
checked={hasBackgroundColor}
onChange={onHasBackgroundColorChange}
/>
{hasBackgroundColor && (
<>
<ColorPalette
colors={colors}
value={backgroundColor}
onChange={onBackgroundColorChange}
/>
<ToggleGroupControl
className="deligraph-blocks__variant"
isBlock
label="Disposition"
onChange={onBackgroundOrientationChange}
value={backgroundOrientation}
>
<ToggleGroupControlOption label="Gauche" value="left" />
<ToggleGroupControlOption label="Droite" value="right" />
</ToggleGroupControl>
</>
)}
</PanelBody>
</InspectorControls>
<section
{...useBlockProps({
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} ${
hasBackgroundColor && backgroundColor
? "chapter-section--has-background"
: ""
}`,
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition}`,
})}
>
{hasBackgroundColor && backgroundColor && (
<svg
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
width="1302"
height="654"
viewBox="0 0 1302 654"
preserveAspectRatio="none"
>
<path
d="M1302 0L0 15.8281V654L1302 642.633L1302 0Z"
fill={backgroundColor}
/>
</svg>
)}
<div className="chapter-section__content">
<div className="chapter-section__innerblocks">
<InnerBlocks
@ -203,7 +130,6 @@ export default function Edit({ attributes, setAttributes, ...props }) {
"core/list",
"core/button",
"core/buttons",
"carhop-blocks/cta",
]}
/>
</div>

View File

@ -1,3 +1,5 @@
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
.portfolio-header {
&__cover {
z-index: 0 !important;
}
}

View File

@ -11,7 +11,7 @@ registerBlockType(metadata.name, {
<path d="M21,7H3V4A1,1,0,0,1,4,3H20a1,1,0,0,1,1,1ZM3,20V9H21V20a1,1,0,0,1-1,1H4A1,1,0,0,1,3,20Zm3-6H18V12H6Zm0,4h6V16H6Z" />
</svg>
),
foreground: "#136f63",
foreground: "#723d46",
},
edit: Edit,
save,

View File

@ -1,36 +1,12 @@
import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
export default function save({ attributes }) {
const {
disposition,
coverUrl,
coverAlt,
coverSize,
backgroundColor,
hasBackgroundColor,
backgroundOrientation,
} = attributes;
const { disposition, coverUrl, coverAlt, coverSize } = attributes;
return (
<section
{...useBlockProps.save({
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} ${
backgroundColor ? "chapter-section--has-background" : ""
}`,
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} `,
})}
>
{hasBackgroundColor && backgroundColor && (
<svg
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
width="1302"
height="654"
viewBox="0 0 1302 654"
preserveAspectRatio="none"
>
<path
d="M1302 0L0 15.8281V654L1302 642.633L1302 0Z"
fill={backgroundColor}
/>
</svg>
)}
<div className="chapter-section__content">
<div className="chapter-section__innerblocks">
<InnerBlocks.Content />

View File

@ -1,3 +0,0 @@
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
}

View File

@ -21,7 +21,6 @@ return array(
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'viewScript' => 'file:./view.js',
'render' => 'file:./render.php',
'attributes' => array(
'text' => array(
'type' => 'string',
@ -33,10 +32,6 @@ return array(
'align' => array(
'type' => 'string',
'default' => 'left'
),
'color' => array(
'type' => 'string',
'default' => '#136F63'
)
)
)

View File

@ -16,7 +16,6 @@
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js",
"render": "file:./render.php",
"attributes": {
"text": {
"type": "string",
@ -28,10 +27,6 @@
"align": {
"type": "string",
"default": "left"
},
"color": {
"type": "string",
"default": "#136F63"
}
}
}

View File

@ -1,32 +1,11 @@
/*!********************************************************************************************************************************************************************************************************************************************!*\
!*** 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/cta/editor.scss ***!
\********************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta {
color: var(--cta-current-color);
padding: 2px;
display: block;
width: -moz-fit-content;
width: fit-content;
display: flex;
align-items: center;
gap: 10px;
line-height: normal;
}
.wp-block-carhop-blocks-cta .icon svg {
width: 30px;
height: 30px;
}
.wp-block-carhop-blocks-cta .icon svg path,
.wp-block-carhop-blocks-cta .icon svg circle {
stroke: var(--cta-current-color);
}
.wp-block-carhop-blocks-cta.align--left {
margin-right: 0;
}
.wp-block-carhop-blocks-cta.align--right {
margin-left: 0;
margin-right: auto;
}
.wp-block-carhop-blocks-cta.align--center {
margin: 0 auto;
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.99.7/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.3_webpack@5.99.7/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.87.0_webpack@5.99.7/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/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-cta {
border: 1px dotted #f00;
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '75ed85d80e2bf481c1fc');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '39dc17506c212a97723f');

View File

@ -1,34 +1,13 @@
/*!********************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/editor.scss ***!
\********************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta {
color: var(--cta-current-color);
padding: 2px;
display: block;
width: -moz-fit-content;
width: fit-content;
display: flex;
align-items: center;
gap: 10px;
line-height: normal;
}
.wp-block-carhop-blocks-cta .icon svg {
width: 30px;
height: 30px;
}
.wp-block-carhop-blocks-cta .icon svg path,
.wp-block-carhop-blocks-cta .icon svg circle {
stroke: var(--cta-current-color);
}
.wp-block-carhop-blocks-cta.align--left {
margin-left: 0;
}
.wp-block-carhop-blocks-cta.align--right {
margin-right: 0;
margin-left: auto;
}
.wp-block-carhop-blocks-cta.align--center {
margin: 0 auto;
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.99.7/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.3_webpack@5.99.7/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.87.0_webpack@5.99.7/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/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-cta {
border: 1px dotted #f00;
}
/*# sourceMappingURL=index.css.map*/

View File

@ -1 +1 @@
{"version":3,"file":"cta/index.css","mappings":";;;AAAA;EACC;EAEA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;AAAD;AAGE;EACC;EACA;AADH;AAGE;;EAEC;AADH;AAKC;EACC;AAHF;AAKC;EACC;EACA;AAHF;AAKC;EACC;AAHF,C","sources":["webpack://cta/./src/cta/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tcolor: var(--cta-current-color);\n\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tstroke: var(--cta-current-color);\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"sourceRoot":""}
{"version":3,"file":"cta/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://cta/./src/cta/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-cta {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}

View File

@ -8,7 +8,7 @@
\****************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/cta","version":"0.1.0","title":"Cta","category":"carhop-blocks","icon":"smiley","description":"Un bouton de lien","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php","attributes":{"text":{"type":"string","default":"Call to action"},"link":{"type":"object"},"align":{"type":"string","default":"left"},"color":{"type":"string","default":"#136F63"}}}');
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/cta","version":"0.1.0","title":"Cta","category":"carhop-blocks","icon":"smiley","description":"Un bouton de lien","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"text":{"type":"string","default":"Call to action"},"link":{"type":"object"},"align":{"type":"string","default":"left"}}}');
/***/ }),
@ -29,11 +29,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/cta/editor.scss");
/* harmony import */ var _img_carhop_fleche_lien_externe_full_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../img/carhop-fleche-lien-externe-full.svg */ "./src/img/carhop-fleche-lien-externe-full.svg");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
/* 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__);
@ -45,29 +42,20 @@ function Edit({
attributes,
setAttributes
}) {
const {
color
} = attributes;
const colors = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useSetting)("color.palette.theme");
function handleColorChange(value) {
setAttributes({
color: value
});
}
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.AlignmentToolbar, {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.AlignmentToolbar, {
value: attributes.align,
onChange: value => setAttributes({
align: value
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
title: "Lien",
initialOpen: true,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.__experimentalLinkControl, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.__experimentalLinkControl, {
value: attributes.link,
onChange: value => {
setAttributes({
@ -75,30 +63,12 @@ function Edit({
});
}
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
title: "Couleur",
initialOpen: true,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ColorPalette, {
value: color,
onChange: value => {
console.log(value);
handleColorChange(value);
},
colors: colors,
disableCustomColors: true
})
})
})]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: `cta align--${attributes.align}`,
style: {
"--cta-current-color": color
}
className: `cta align--${attributes.align}`
}),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
tagName: "a",
placeholder: "Ajouter un lien",
value: attributes.text,
@ -106,14 +76,6 @@ function Edit({
text
}),
allowedFormats: []
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
className: "icon",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_img_carhop_fleche_lien_externe_full_svg__WEBPACK_IMPORTED_MODULE_4__.ReactComponent, {
style: {
"--cta-current-color": color
}
})
})]
})]
});
}
@ -198,10 +160,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ });
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _img_carhop_fleche_lien_externe_full_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../img/carhop-fleche-lien-externe-full.svg */ "./src/img/carhop-fleche-lien-externe-full.svg");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
function save({
@ -210,26 +170,15 @@ function save({
const {
align,
link,
text,
color
text
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment, {})
// <a
// href={link?.url}
// {...useBlockProps.save({
// className: `align--${align}`,
// style: {
// color: color,
// "--cta-current-color": color,
// },
// })}
// >
// {text}
// <div className="icon">
// <ArrowIcon style={{ "--cta-current-color": color }} />
// </div>
// </a>
;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a", {
href: link?.url,
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: `align--${align}`
}),
children: text
});
}
/***/ }),
@ -244,42 +193,6 @@ __webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/img/carhop-fleche-lien-externe-full.svg":
/*!*****************************************************!*\
!*** ./src/img/carhop-fleche-lien-externe-full.svg ***!
\*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ ReactComponent: () => (/* binding */ SvgCarhopFlecheLienExterneFull),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var _defs, _path, _circle;
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
var SvgCarhopFlecheLienExterneFull = function SvgCarhopFlecheLienExterneFull(props) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
xmlns: "http://www.w3.org/2000/svg",
id: "carhop-fleche-lien-externe-full_svg__fleche-lien-externe-full",
viewBox: "0 0 32 32"
}, props), _defs || (_defs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("style", null, ".carhop-fleche-lien-externe-full_svg__cls-1{fill:none;stroke:#000;stroke-width:2px}"))), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
d: "m21.15 10.59-9.38 10.02M21.15 21.4V10.59H10.83",
className: "carhop-fleche-lien-externe-full_svg__cls-1"
})), _circle || (_circle = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("circle", {
cx: 16,
cy: 16,
r: 15,
className: "carhop-fleche-lien-externe-full_svg__cls-1"
})));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iZmxlY2hlLWxpZW4tZXh0ZXJuZS1mdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnPgogICAgPHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjEuMTUsMTAuNTlsLTkuMzgsMTAuMDIiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIxLjE1LDIxLjR2LTEwLjgxaC0xMC4zMiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2IiBjeT0iMTYiIHI9IjE1Ii8+Cjwvc3ZnPg==");
/***/ }),
/***/ "@wordpress/block-editor":
@ -322,16 +235,6 @@ module.exports = window["wp"]["i18n"];
/***/ }),
/***/ "react":
/*!************************!*\
!*** external "React" ***!
\************************/
/***/ ((module) => {
module.exports = window["React"];
/***/ }),
/***/ "react/jsx-runtime":
/*!**********************************!*\
!*** external "ReactJSXRuntime" ***!

File diff suppressed because one or more lines are too long

View File

@ -1,35 +0,0 @@
<?php
$align = isset($attributes['align']) ? $attributes['align'] : '';
$link = isset($attributes['link']) ? $attributes['link'] : [];
$text = isset($attributes['text']) ? $attributes['text'] : '';
$color = isset($attributes['color']) ? $attributes['color'] : 'red';
$svg_arrow_path = get_template_directory() . '/resources/img/carhop-fleche-lien-externe-full.svg';
$wrapper_attributes = get_block_wrapper_attributes([
'class' => 'align--' . esc_attr($align),
'style' => sprintf(
'color: %s; --cta-current-color: %s;',
esc_attr($color),
esc_attr($color)
)
]);
$link_url = isset($link['url']) ? esc_url($link['url']) : '#';
?>
<a href="<?php echo $link_url; ?>" <?php echo $wrapper_attributes; ?>>
<?php echo esc_html($text); ?>
<div class="icon">
<svg id="fleche-lien-externe-full" viewBox="0 0 32 32" style="--cta-current-color: <?php echo esc_attr($color); ?>">
<g>
<path class="cls-1" d="M21.15,10.59l-9.38,10.02" />
<path class="cls-1" d="M21.15,21.4v-10.81h-10.32" />
</g>
<circle class="cls-1" cx="16" cy="16" r="15" />
</svg>
</div>
</a>

View File

@ -1,9 +1,8 @@
/*!*******************************************************************************************************************************************************************************************************************************************!*\
!*** 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/cta/style.scss ***!
\*******************************************************************************************************************************************************************************************************************************************/
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.99.7/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.3_webpack@5.99.7/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.87.0_webpack@5.99.7/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/style.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta {
margin-top: 20px;
color: var(--cta-current-color);
color: #fff;
padding: 2px;
display: block;
width: -moz-fit-content;
@ -13,16 +12,17 @@
gap: 10px;
line-height: normal;
}
.wp-block-carhop-blocks-cta a {
text-decoration: none;
}
.wp-block-carhop-blocks-cta .icon svg {
.wp-block-carhop-blocks-cta:after {
margin-top: -2px;
content: "";
filter: invert(1);
width: 30px;
height: 30px;
}
.wp-block-carhop-blocks-cta .icon svg path,
.wp-block-carhop-blocks-cta .icon svg circle {
stroke: var(--cta-current-color);
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iZmxlY2hlLWxpZW4tZXh0ZXJuZS1mdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnPgogICAgPHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjEuMTUsMTAuNTlsLTkuMzgsMTAuMDIiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIxLjE1LDIxLjR2LTEwLjgxaC0xMC4zMiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2IiBjeT0iMTYiIHI9IjE1Ii8+Cjwvc3ZnPg==);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: block;
}
.wp-block-carhop-blocks-cta.align--left {
margin-right: 0;

View File

@ -1,9 +1,8 @@
/*!*******************************************************************************************************************************************************************************************************************************************!*\
!*** 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/cta/style.scss ***!
\*******************************************************************************************************************************************************************************************************************************************/
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.99.7/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.3_webpack@5.99.7/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.87.0_webpack@5.99.7/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/style.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta {
margin-top: 20px;
color: var(--cta-current-color);
color: #fff;
padding: 2px;
display: block;
width: -moz-fit-content;
@ -13,16 +12,17 @@
gap: 10px;
line-height: normal;
}
.wp-block-carhop-blocks-cta a {
text-decoration: none;
}
.wp-block-carhop-blocks-cta .icon svg {
.wp-block-carhop-blocks-cta:after {
margin-top: -2px;
content: "";
filter: invert(1);
width: 30px;
height: 30px;
}
.wp-block-carhop-blocks-cta .icon svg path,
.wp-block-carhop-blocks-cta .icon svg circle {
stroke: var(--cta-current-color);
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iZmxlY2hlLWxpZW4tZXh0ZXJuZS1mdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnPgogICAgPHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjEuMTUsMTAuNTlsLTkuMzgsMTAuMDIiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIxLjE1LDIxLjR2LTEwLjgxaC0xMC4zMiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2IiBjeT0iMTYiIHI9IjE1Ii8+Cjwvc3ZnPg==);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: block;
}
.wp-block-carhop-blocks-cta.align--left {
margin-left: 0;

View File

@ -1 +1 @@
{"version":3,"file":"cta/style-index.css","mappings":";;;AAAA;EACC;EACA;EAEA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;AAAD;AAEC;EACC;AAAF;AAGE;EACC;EACA;AADH;AAGE;;EAEC;AADH;AAKC;EACC;AAHF;AAKC;EACC;EACA;AAHF;AAKC;EACC;AAHF,C","sources":["webpack://cta/./src/cta/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tmargin-top: 20px;\n\tcolor: var(--cta-current-color);\n\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\ta {\n\t\ttext-decoration: none;\n\t}\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tstroke: var(--cta-current-color);\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"sourceRoot":""}
{"version":3,"file":"cta/style-index.css","mappings":";;;AAAA;EACC;EACA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;AACD;AACC;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;AACC;EACC;AACF;AACC;EACC;EACA;AACF;AACC;EACC;AACF,C","sources":["webpack://cta/./src/cta/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tcolor: #fff;\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\t&:after {\n\t\tmargin-top: -2px;\n\t\tcontent: \"\";\n\t\tfilter: invert(1);\n\t\twidth: 30px;\n\t\theight: 30px;\n\t\tbackground-image: url(../img/carhop-fleche-lien-externe-full.svg);\n\t\tbackground-size: cover;\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t\tdisplay: block;\n\t}\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"sourceRoot":""}

View File

@ -8,9 +8,6 @@
"name": "cta",
"version": "0.1.0",
"license": "GPL-2.0-or-later",
"dependencies": {
"url-loader": "^4.1.1"
},
"devDependencies": {
"@wordpress/scripts": "^30.15.0"
}
@ -2706,6 +2703,7 @@
"version": "0.3.8",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
"integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/set-array": "^1.2.1",
@ -2720,6 +2718,7 @@
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6.0.0"
@ -2729,6 +2728,7 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
"integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6.0.0"
@ -2738,6 +2738,7 @@
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz",
"integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.5",
@ -2748,12 +2749,14 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
"dev": true,
"license": "MIT"
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.25",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
"integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
@ -3848,6 +3851,7 @@
"version": "9.6.1",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz",
"integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "*",
@ -3858,6 +3862,7 @@
"version": "3.7.7",
"resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz",
"integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/eslint": "*",
@ -3868,6 +3873,7 @@
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
"integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/express": {
@ -3990,6 +3996,7 @@
"version": "7.0.15",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/json5": {
@ -4024,6 +4031,7 @@
"version": "22.15.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz",
"integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~6.21.0"
@ -4508,6 +4516,7 @@
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz",
"integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@webassemblyjs/helper-numbers": "1.13.2",
@ -4518,24 +4527,28 @@
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz",
"integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==",
"dev": true,
"license": "MIT"
},
"node_modules/@webassemblyjs/helper-api-error": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz",
"integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==",
"dev": true,
"license": "MIT"
},
"node_modules/@webassemblyjs/helper-buffer": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz",
"integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==",
"dev": true,
"license": "MIT"
},
"node_modules/@webassemblyjs/helper-numbers": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz",
"integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@webassemblyjs/floating-point-hex-parser": "1.13.2",
@ -4547,12 +4560,14 @@
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz",
"integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==",
"dev": true,
"license": "MIT"
},
"node_modules/@webassemblyjs/helper-wasm-section": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz",
"integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
@ -4565,6 +4580,7 @@
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz",
"integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@xtuc/ieee754": "^1.2.0"
@ -4574,6 +4590,7 @@
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz",
"integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@xtuc/long": "4.2.2"
@ -4583,12 +4600,14 @@
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz",
"integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==",
"dev": true,
"license": "MIT"
},
"node_modules/@webassemblyjs/wasm-edit": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz",
"integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
@ -4605,6 +4624,7 @@
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz",
"integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
@ -4618,6 +4638,7 @@
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz",
"integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
@ -4630,6 +4651,7 @@
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz",
"integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
@ -4644,6 +4666,7 @@
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz",
"integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
@ -5256,12 +5279,14 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
"integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
"dev": true,
"license": "BSD-3-Clause"
},
"node_modules/@xtuc/long": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
"dev": true,
"license": "Apache-2.0"
},
"node_modules/abab": {
@ -5300,6 +5325,7 @@
"version": "8.14.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz",
"integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==",
"dev": true,
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
@ -5369,6 +5395,7 @@
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.1",
@ -5395,6 +5422,7 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
"integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
"dev": true,
"license": "MIT",
"dependencies": {
"ajv": "^8.0.0"
@ -5412,6 +5440,7 @@
"version": "8.17.1",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3",
@ -5428,12 +5457,14 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true,
"license": "MIT"
},
"node_modules/ajv-keywords": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
"dev": true,
"license": "MIT",
"peerDependencies": {
"ajv": "^6.9.1"
@ -6191,6 +6222,7 @@
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": "*"
@ -6309,6 +6341,7 @@
"version": "4.24.4",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz",
"integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==",
"dev": true,
"funding": [
{
"type": "opencollective",
@ -6386,6 +6419,7 @@
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true,
"license": "MIT"
},
"node_modules/builtin-modules": {
@ -6561,6 +6595,7 @@
"version": "1.0.30001716",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001716.tgz",
"integrity": "sha512-49/c1+x3Kwz7ZIWt+4DvK3aMJy9oYXXG6/97JKsnjdCk/6n9vVyWL8NAwVt95Lwt9eigI10Hl782kDfZUUlRXw==",
"dev": true,
"funding": [
{
"type": "opencollective",
@ -6711,6 +6746,7 @@
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz",
"integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6.0"
@ -8160,6 +8196,7 @@
"version": "1.5.145",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.145.tgz",
"integrity": "sha512-pZ5EcTWRq/055MvSBgoFEyKf2i4apwfoqJbK/ak2jnFq8oHjZ+vzc3AhRcz37Xn+ZJfL58R666FLJx0YOK9yTw==",
"dev": true,
"license": "ISC"
},
"node_modules/emittery": {
@ -8186,6 +8223,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 4"
@ -8215,6 +8253,7 @@
"version": "5.18.1",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz",
"integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==",
"dev": true,
"license": "MIT",
"dependencies": {
"graceful-fs": "^4.2.4",
@ -8412,6 +8451,7 @@
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz",
"integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==",
"dev": true,
"license": "MIT"
},
"node_modules/es-object-atoms": {
@ -8478,6 +8518,7 @@
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
@ -9137,6 +9178,7 @@
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
"integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"esrecurse": "^4.3.0",
@ -9150,6 +9192,7 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=4.0"
@ -9379,6 +9422,7 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
"integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"estraverse": "^5.2.0"
@ -9391,6 +9435,7 @@
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=4.0"
@ -9427,6 +9472,7 @@
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.8.x"
@ -9607,6 +9653,7 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true,
"license": "MIT"
},
"node_modules/fast-diff": {
@ -9657,6 +9704,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
"dev": true,
"license": "MIT"
},
"node_modules/fast-levenshtein": {
@ -9670,6 +9718,7 @@
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz",
"integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==",
"dev": true,
"funding": [
{
"type": "github",
@ -10324,6 +10373,7 @@
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
"dev": true,
"license": "BSD-2-Clause"
},
"node_modules/glob/node_modules/brace-expansion": {
@ -10465,6 +10515,7 @@
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true,
"license": "ISC"
},
"node_modules/graphemer": {
@ -10524,6 +10575,7 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
@ -12688,12 +12740,14 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
"dev": true,
"license": "MIT"
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true,
"license": "MIT"
},
"node_modules/json-stable-stringify-without-jsonify": {
@ -12714,6 +12768,7 @@
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true,
"license": "MIT",
"bin": {
"json5": "lib/cli.js"
@ -13129,6 +13184,7 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",
"integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6.11.5"
@ -13138,6 +13194,7 @@
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"license": "MIT",
"dependencies": {
"big.js": "^5.2.2",
@ -13637,6 +13694,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
"dev": true,
"license": "MIT"
},
"node_modules/merge2": {
@ -13697,6 +13755,7 @@
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.6"
@ -13706,6 +13765,7 @@
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dev": true,
"license": "MIT",
"dependencies": {
"mime-db": "1.52.0"
@ -13925,6 +13985,7 @@
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true,
"license": "MIT"
},
"node_modules/netmask": {
@ -13977,6 +14038,7 @@
"version": "2.0.19",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
"integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
"dev": true,
"license": "MIT"
},
"node_modules/normalize-package-data": {
@ -14763,6 +14825,7 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
"dev": true,
"license": "ISC"
},
"node_modules/picomatch": {
@ -15942,6 +16005,7 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
@ -16047,6 +16111,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"safe-buffer": "^5.1.0"
@ -16422,6 +16487,7 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@ -16670,6 +16736,7 @@
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"dev": true,
"funding": [
{
"type": "github",
@ -16818,6 +16885,7 @@
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz",
"integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/json-schema": "^7.0.9",
@ -16837,6 +16905,7 @@
"version": "8.17.1",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3",
@ -16853,6 +16922,7 @@
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
"integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3"
@ -16865,6 +16935,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true,
"license": "MIT"
},
"node_modules/select-hose": {
@ -16979,6 +17050,7 @@
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
"integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
"randombytes": "^2.1.0"
@ -18515,6 +18587,7 @@
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
@ -18551,6 +18624,7 @@
"version": "5.39.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz",
"integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"@jridgewell/source-map": "^0.3.3",
@ -18569,6 +18643,7 @@
"version": "5.3.14",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz",
"integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.25",
@ -18603,6 +18678,7 @@
"version": "27.5.1",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
"integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*",
@ -18617,6 +18693,7 @@
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
@ -18632,12 +18709,14 @@
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true,
"license": "MIT"
},
"node_modules/terser/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
@ -18647,6 +18726,7 @@
"version": "0.5.21",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
"dev": true,
"license": "MIT",
"dependencies": {
"buffer-from": "^1.0.0",
@ -19139,6 +19219,7 @@
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"dev": true,
"license": "MIT"
},
"node_modules/unicode-canonical-property-names-ecmascript": {
@ -19222,6 +19303,7 @@
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
"integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==",
"dev": true,
"funding": [
{
"type": "opencollective",
@ -19272,6 +19354,7 @@
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"punycode": "^2.1.0"
@ -19281,6 +19364,7 @@
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz",
"integrity": "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==",
"dev": true,
"license": "MIT",
"dependencies": {
"loader-utils": "^2.0.0",
@ -19308,6 +19392,7 @@
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
"integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/json-schema": "^7.0.8",
@ -19464,6 +19549,7 @@
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz",
"integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==",
"dev": true,
"license": "MIT",
"dependencies": {
"glob-to-regexp": "^0.4.1",
@ -19504,6 +19590,7 @@
"version": "5.99.7",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.99.7.tgz",
"integrity": "sha512-CNqKBRMQjwcmKR0idID5va1qlhrqVUKpovi+Ec79ksW8ux7iS1+A6VqzfZXgVYCFRKl7XL5ap3ZoMpwBJxcg0w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/eslint-scope": "^3.7.7",
@ -19884,6 +19971,7 @@
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
"integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=10.13.0"

View File

@ -17,8 +17,5 @@
"devDependencies": {
"@wordpress/scripts": "^30.15.0"
},
"packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39",
"dependencies": {
"url-loader": "^4.1.1"
}
"packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39"
}

View File

@ -16,7 +16,6 @@
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js",
"render": "file:./render.php",
"attributes": {
"text": {
"type": "string",
@ -28,10 +27,6 @@
"align": {
"type": "string",
"default": "left"
},
"color": {
"type": "string",
"default": "#136F63"
}
}
}

View File

@ -4,22 +4,13 @@ import {
RichText,
InspectorControls,
__experimentalLinkControl as LinkControl,
useSetting,
} from "@wordpress/block-editor";
import { PanelBody } from "@wordpress/components";
import "./editor.scss";
import { BlockControls, AlignmentToolbar } from "@wordpress/block-editor";
import { ColorPalette, PanelRow } from "@wordpress/components";
import { Tip } from "@wordpress/components";
import { ReactComponent as ArrowIcon } from "../img/carhop-fleche-lien-externe-full.svg";
export default function Edit({ attributes, setAttributes }) {
const { color } = attributes;
const colors = useSetting("color.palette.theme");
function handleColorChange(value) {
setAttributes({ color: value });
}
return (
<>
<BlockControls>
@ -38,41 +29,18 @@ export default function Edit({ attributes, setAttributes }) {
}}
/>
</div>
<PanelBody title="Couleur" initialOpen={true}>
<PanelRow>
<ColorPalette
value={color}
onChange={(value) => {
console.log(value);
handleColorChange(value);
}}
colors={colors}
disableCustomColors={true}
/>
</PanelRow>
</PanelBody>
</PanelBody>
</InspectorControls>
<div
<RichText
{...useBlockProps({
className: `cta align--${attributes.align}`,
style: {
"--cta-current-color": color,
},
})}
>
<RichText
tagName="a"
placeholder="Ajouter un lien"
value={attributes.text}
onChange={(text) => setAttributes({ text })}
allowedFormats={[]}
/>
<div className="icon">
<ArrowIcon style={{ "--cta-current-color": color }} />
</div>
</div>
</>
);
}

View File

@ -1,33 +1,9 @@
.wp-block-carhop-blocks-cta {
color: var(--cta-current-color);
/**
* The following styles get applied inside the editor only.
*
* Replace them with your own styles or remove the file completely.
*/
padding: 2px;
display: block;
width: fit-content;
display: flex;
align-items: center;
gap: 10px;
line-height: normal;
.icon {
svg {
width: 30px;
height: 30px;
}
svg path,
svg circle {
stroke: var(--cta-current-color);
}
}
&.align--left {
margin-left: 0;
}
&.align--right {
margin-right: 0;
margin-left: auto;
}
&.align--center {
margin: 0 auto;
}
.wp-block-create-block-cta {
border: 1px dotted #f00;
}

View File

@ -1,35 +0,0 @@
<?php
$align = isset($attributes['align']) ? $attributes['align'] : '';
$link = isset($attributes['link']) ? $attributes['link'] : [];
$text = isset($attributes['text']) ? $attributes['text'] : '';
$color = isset($attributes['color']) ? $attributes['color'] : 'red';
$svg_arrow_path = get_template_directory() . '/resources/img/carhop-fleche-lien-externe-full.svg';
$wrapper_attributes = get_block_wrapper_attributes([
'class' => 'align--' . esc_attr($align),
'style' => sprintf(
'color: %s; --cta-current-color: %s;',
esc_attr($color),
esc_attr($color)
)
]);
$link_url = isset($link['url']) ? esc_url($link['url']) : '#';
?>
<a href="<?php echo $link_url; ?>" <?php echo $wrapper_attributes; ?>>
<?php echo esc_html($text); ?>
<div class="icon">
<svg id="fleche-lien-externe-full" viewBox="0 0 32 32" style="--cta-current-color: <?php echo esc_attr($color); ?>">
<g>
<path class="cls-1" d="M21.15,10.59l-9.38,10.02" />
<path class="cls-1" d="M21.15,21.4v-10.81h-10.32" />
</g>
<circle class="cls-1" cx="16" cy="16" r="15" />
</svg>
</div>
</a>

View File

@ -1,24 +1,15 @@
import { useBlockProps } from "@wordpress/block-editor";
import { ReactComponent as ArrowIcon } from "../img/carhop-fleche-lien-externe-full.svg";
export default function save({ attributes }) {
const { align, link, text, color } = attributes;
const { align, link, text } = attributes;
return (
<></>
// <a
// href={link?.url}
// {...useBlockProps.save({
// className: `align--${align}`,
// style: {
// color: color,
// "--cta-current-color": color,
// },
// })}
// >
// {text}
// <div className="icon">
// <ArrowIcon style={{ "--cta-current-color": color }} />
// </div>
// </a>
<a
href={link?.url}
{...useBlockProps.save({
className: `align--${align}`,
})}
>
{text}
</a>
);
}

View File

@ -1,7 +1,5 @@
.wp-block-carhop-blocks-cta {
margin-top: 20px;
color: var(--cta-current-color);
color: #fff;
padding: 2px;
display: block;
width: fit-content;
@ -10,20 +8,18 @@
gap: 10px;
line-height: normal;
a {
text-decoration: none;
}
.icon {
svg {
&:after {
margin-top: -2px;
content: "";
filter: invert(1);
width: 30px;
height: 30px;
background-image: url(../img/carhop-fleche-lien-externe-full.svg);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: block;
}
svg path,
svg circle {
stroke: var(--cta-current-color);
}
}
&.align--left {
margin-left: 0;
}

View File

@ -20,13 +20,6 @@ return array(
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'viewScript' => 'file:./view.js',
'render' => 'file:./render.php',
'attributes' => array(
'title' => array(
'type' => 'string',
'default' => 'Restez connectés à lhistoire sociale'
)
)
'viewScript' => 'file:./view.js'
)
);

View File

@ -15,12 +15,5 @@
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js",
"render": "file:./render.php",
"attributes": {
"title": {
"type": "string",
"default": "Restez connectés à lhistoire sociale"
}
}
"viewScript": "file:./view.js"
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '2706590dc5f7986977d7');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'f4dd64da00366e8af217');

View File

@ -8,7 +8,7 @@
\*********************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/subscribe-infolettre","version":"0.1.0","title":"Infolettre","category":"carhop-blocks","icon":"smiley","description":"Infolettre","example":{},"supports":{"html":false},"textdomain":"subscribe-infolettre","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php","attributes":{"title":{"type":"string","default":"Restez connectés à lhistoire sociale"}}}');
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/subscribe-infolettre","version":"0.1.0","title":"Infolettre","category":"carhop-blocks","icon":"smiley","description":"Infolettre","example":{},"supports":{"html":false},"textdomain":"subscribe-infolettre","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');
/***/ }),
@ -33,13 +33,7 @@ __webpack_require__.r(__webpack_exports__);
function Edit({
attributes,
setAttributes
}) {
const {
title
} = attributes;
function Edit() {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("section", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: "subscribe-infolettre"
@ -51,25 +45,12 @@ function Edit({
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
className: "block-title",
children: "infolettre"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
tagName: "h2",
className: "subscribe-infolettre__title",
placeholder: "Description",
value: title,
onChange: value => setAttributes({
title: value
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
template: [
// [
// "core/heading",
// {
// className: "subscribe-infolettre__title",
// placeholder: "Titre",
// content: "Un titre précis ",
// },
// ],
["core/paragraph", {
template: [["core/heading", {
className: "subscribe-infolettre__title",
placeholder: "Titre",
content: "Un titre précis "
}], ["core/paragraph", {
className: "subscribe-infolettre__description",
placeholder: "Description",
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue augue, sagittis quis mauris in, consequat vehicula est. Aliquam quis nulla ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras bibendum eget lorem eget aliquet. Fusce vel consequat neque. "
@ -152,7 +133,36 @@ __webpack_require__.r(__webpack_exports__);
function save() {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {});
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("section", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: "subscribe-infolettre"
}),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
className: "subscribe-infolettre__inner",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
className: "subscribe-infolettre__content",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p", {
className: "block-title",
children: "infolettre"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "subscribe-infolettre__form",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("form", {
action: "",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("input", {
type: "text",
placeholder: "Nom"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("input", {
type: "email",
placeholder: "Adresse email"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button", {
type: "submit",
children: "S'abonner"
})]
})
})]
})
});
}
/***/ }),

View File

@ -1,24 +0,0 @@
<?php
$wrapper_attributes = get_block_wrapper_attributes(['class' => 'subscribe-infolettre']);
$title = $attributes['title'] ?? null;
?>
<section <?php echo $wrapper_attributes; ?>>
<div class="subscribe-infolettre__inner">
<div class="subscribe-infolettre__content">
<p class="block-title">infolettre</p>
<?php if ($title) : ?>
<h2 class="subscribe-infolettre__title"><?php echo $title; ?></h2>
<?php endif; ?>
<?php echo $content; ?>
</div>
<div class="subscribe-infolettre__form">
<form action="">
<input type="text" placeholder="Nom" />
<input type="email" placeholder="Adresse email" />
<button type="submit">S'abonner</button>
</form>
</div>
</div>
</section>

View File

@ -0,0 +1 @@
{"version":3,"file":"subscribe-infolettre/view.js","mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACAA,OAAO,CAACC,GAAG,CAAE,6DAA8D,CAAC;AAC5E,8B","sources":["webpack://subscribe-infolettre/./src/subscribe-infolettre/view.js"],"sourcesContent":["/**\n * Use this file for JavaScript code that you want to run in the front-end\n * on posts/pages that contain this block.\n *\n * When this file is defined as the value of the `viewScript` property\n * in `block.json` it will be enqueued on the front end of the site.\n *\n * Example:\n *\n * ```js\n * {\n * \"viewScript\": \"file:./view.js\"\n * }\n * ```\n *\n * If you're not making any changes to this file because your project doesn't need any\n * JavaScript running in the front-end, then you should delete this file and remove\n * the `viewScript` property from `block.json`.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script\n */\n\n/* eslint-disable no-console */\nconsole.log( 'Hello World! (from create-block-subscribe-infolettre block)' );\n/* eslint-enable no-console */\n"],"names":["console","log"],"sourceRoot":""}

View File

@ -15,12 +15,5 @@
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js",
"render": "file:./render.php",
"attributes": {
"title": {
"type": "string",
"default": "Restez connectés à lhistoire sociale"
}
}
"viewScript": "file:./view.js"
}

View File

@ -1,9 +1,8 @@
import { __ } from "@wordpress/i18n";
import { useBlockProps, InnerBlocks, RichText } from "@wordpress/block-editor";
import { useBlockProps, InnerBlocks } from "@wordpress/block-editor";
import "./editor.scss";
export default function Edit({ attributes, setAttributes }) {
const { title } = attributes;
export default function Edit() {
return (
<section
{...useBlockProps({
@ -13,23 +12,16 @@ export default function Edit({ attributes, setAttributes }) {
<div className="subscribe-infolettre__inner">
<div className="subscribe-infolettre__content">
<p className="block-title">infolettre</p>
<RichText
tagName="h2"
className="subscribe-infolettre__title"
placeholder="Description"
value={title}
onChange={(value) => setAttributes({ title: value })}
/>
<InnerBlocks
template={[
// [
// "core/heading",
// {
// className: "subscribe-infolettre__title",
// placeholder: "Titre",
// content: "Un titre précis ",
// },
// ],
[
"core/heading",
{
className: "subscribe-infolettre__title",
placeholder: "Titre",
content: "Un titre précis ",
},
],
[
"core/paragraph",
{

View File

@ -1,24 +0,0 @@
<?php
$wrapper_attributes = get_block_wrapper_attributes(['class' => 'subscribe-infolettre']);
$title = $attributes['title'] ?? null;
?>
<section <?php echo $wrapper_attributes; ?>>
<div class="subscribe-infolettre__inner">
<div class="subscribe-infolettre__content">
<p class="block-title">infolettre</p>
<?php if ($title) : ?>
<h2 class="subscribe-infolettre__title"><?php echo $title; ?></h2>
<?php endif; ?>
<?php echo $content; ?>
</div>
<div class="subscribe-infolettre__form">
<form action="">
<input type="text" placeholder="Nom" />
<input type="email" placeholder="Adresse email" />
<button type="submit">S'abonner</button>
</form>
</div>
</div>
</section>

View File

@ -1,5 +1,26 @@
import { InnerBlocks } from "@wordpress/block-editor";
import { useBlockProps, InnerBlocks } from "@wordpress/block-editor";
export default function save() {
return <InnerBlocks.Content />;
return (
<section
{...useBlockProps.save({
className: "subscribe-infolettre",
})}
>
<div className="subscribe-infolettre__inner">
<div className="subscribe-infolettre__content">
<p className="block-title">infolettre</p>
<InnerBlocks.Content />
</div>
<div className="subscribe-infolettre__form">
<form action="">
<input type="text" placeholder="Nom" />
<input type="email" placeholder="Adresse email" />
<button type="submit">S'abonner</button>
</form>
</div>
</div>
</section>
);
}

View File

@ -1,25 +0,0 @@
{
"name": "acf/team-authors",
"title": "Equipe d'auteurs",
"category": "dynamiques-blocks",
"multiple": false,
"icon": {
"foreground": "#8B2FF7",
"src": "groups"
},
"keywords": [
"auteurs",
"equipe",
"auteur"
],
"supports": {
"align": [
"full"
]
},
"acf": {
"mode": "auto",
"renderTemplate": "team-authors.php"
},
"align": "full"
}

View File

@ -1,78 +0,0 @@
<?php
$statuses = get_field_object('comity', get_the_ID());
$comities_field_object = get_field_object('field_6836da6d03ff6');
$comities = $comities_field_object ? $comities_field_object['choices'] : [];
$field_auteurs = get_field_object('auteurs', 'group_auteurs');
$authors = get_posts(array(
'post_type' => 'auteurs',
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC',
));
?>
<section class="team-authors content-section">
<h2 class="title-small">Équipe dynamiques</h2>
<h3 class="subtitle-big">À la croisée des plumes et des luttes</h3>
<div class="container">
<?php foreach ($comities as $comity_value => $comity_label) : ?>
<div class="comity-type">
<h3 class="comity-type__title"><?php echo $comity_label; ?></h3>
<?php $comities_related_authors = get_posts(array(
'post_type' => 'auteurs',
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'comity',
'value' => $comity_value,
'compare' => '=',
),
),
)); ?>
<ul class="comity-type__list">
<?php foreach ($comities_related_authors as $author) : ?>
<?php
$author_thumbnail = get_field('profile_thumbnail', $author->ID);
$author_description = get_field('description', $author->ID);
$author_email = get_field('email', $author->ID);
write_log($author_email);
?>
<li class="comity-type__item author-card">
<div class="author-card__thumbnail">
<?php if ($author_thumbnail) : ?>
<img src="<?php echo $author_thumbnail['url']; ?>" alt="<?php echo $author_thumbnail['alt']; ?>">
<?php else : ?>
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/placeholder-author.png" alt="Placeholder author">
<?php endif; ?>
</div>
<h4 class="author-card__name"><?php echo $author->post_title; ?></h4>
<p class="author-card__bio"><?php echo $author_description; ?></p>
<?php if ($author_email) : ?>
<a href="mailto:<?php echo $author_email; ?>" class="author-card__email cta cta--classic cta--rounded cta--has-icon cta--mailing">
<div class="cta__icon">
<?php $mail_svg_path = get_template_directory() . '/resources/img/icons/carhop-mail.svg';
if (file_exists($mail_svg_path)) {
echo file_get_contents($mail_svg_path);
} ?>
</div>
Envoyer un email
</a>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endforeach; ?>
</div>
</section>

View File

@ -21,12 +21,6 @@ return array(
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'viewScript' => 'file:./view.js',
'render' => 'file:./render.php',
'attributes' => array(
'displayType' => array(
'type' => 'string',
'default' => 'grid'
)
)
'render' => 'file:./render.php'
)
);

View File

@ -16,11 +16,5 @@
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js",
"render": "file:./render.php",
"attributes": {
"displayType": {
"type": "string",
"default": "grid"
}
}
"render": "file:./render.php"
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => 'e08b17920300a78b4ba8');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'f4b7910bbc5a69ba1629');

View File

@ -8,7 +8,7 @@
\*********************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"dynamiques-blocks/dernieres-dynamiques","version":"0.1.0","title":"Dernieres Dynamiques","category":"dynamiques-blocks","icon":"smiley","description":"Example block scaffolded with Create Block tool.","example":{},"supports":{"html":false},"textdomain":"dernieres-dynamiques","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php","attributes":{"displayType":{"type":"string","default":"grid"}}}');
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"dynamiques-blocks/dernieres-dynamiques","version":"0.1.0","title":"Dernieres Dynamiques","category":"dynamiques-blocks","icon":"smiley","description":"Example block scaffolded with Create Block tool.","example":{},"supports":{"html":false},"textdomain":"dernieres-dynamiques","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php"}');
/***/ }),
@ -26,51 +26,45 @@ __webpack_require__.r(__webpack_exports__);
/* 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 _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/dernieres-dynamiques/editor.scss");
/* 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__);
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/dernieres-dynamiques/editor.scss");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
/**
* Retrieves the translation of text.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
*/
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
*/
/**
* Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
* Those files can contain any CSS code that gets applied to the editor.
*
* @see https://www.npmjs.com/package/@wordpress/scripts#using-css
*/
function Edit({
attributes,
setAttributes
}) {
const {
displayType
} = attributes;
function onDisplayTypeChange(value) {
setAttributes({
displayType: value
});
}
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Paramètres", "dernieres-dynamiques"),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControl, {
className: "homegrade-blocks-highlight__variant",
isBlock: true,
label: "Type d'affichage des posts",
onChange: onDisplayTypeChange,
value: displayType,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, {
label: "Slider",
value: "slider"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, {
label: "Grille",
value: "grid"
})]
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
/**
* The edit function describes the structure of your block in the context of the
* editor. This represents what the editor will render when the block is used.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit
*
* @return {Element} Element to render.
*/
function Edit() {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)(),
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Dernieres Dynamiques hello from the editor!", "dernieres-dynamiques")
})]
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Dernieres Dynamiques hello from the editor!', 'dernieres-dynamiques')
});
}
@ -215,16 +209,6 @@ module.exports = window["wp"]["blocks"];
/***/ }),
/***/ "@wordpress/components":
/*!************************************!*\
!*** external ["wp","components"] ***!
\************************************/
/***/ ((module) => {
module.exports = window["wp"]["components"];
/***/ }),
/***/ "@wordpress/i18n":
/*!******************************!*\
!*** external ["wp","i18n"] ***!

View File

@ -1,9 +1,8 @@
<?php
$displayType = $attributes['displayType'] ?? 'grid';
$current_blog_id = get_current_blog_id();
switch_to_blog(2);
$args = array(
'post_type' => 'revues',
'posts_per_page' => 1,
@ -11,6 +10,9 @@ $args = array(
'order' => 'DESC',
);
$dynamiques = new WP_Query($args);
$last_issue = $dynamiques->posts[0];
@ -31,7 +33,7 @@ $issue_related_articles = new WP_Query(array(
?>
<section class="block-dernieres-dynamiques content-section ">
<section class="block-dernieres-dynamiques">
<div class="block-dernieres-dynamiques__inner">
<div class="block-dernieres-dynamiques__header">
<h2 class="block-title">
@ -81,7 +83,7 @@ $issue_related_articles = new WP_Query(array(
<div class="article-caroussel">
<?php if ($displayType === 'grid') : ?>
<?php foreach ($issue_related_articles->posts as $article) : ?>
<div class="article-card">
@ -120,16 +122,6 @@ $issue_related_articles = new WP_Query(array(
</div>
<?php endforeach; ?>
<?php else : ?>
<div class="article-caroussel__slider">
<p>sliiiiiiiidzer</p>
<?php foreach ($issue_related_articles->posts as $article) : ?>
<div class="article-card">
<?php echo get_the_post_thumbnail($article->ID, 'full'); ?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<button class="related-articles__show-all">

View File

@ -16,11 +16,5 @@
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js",
"render": "file:./render.php",
"attributes": {
"displayType": {
"type": "string",
"default": "grid"
}
}
"render": "file:./render.php"
}

View File

@ -1,43 +1,41 @@
import { __ } from "@wordpress/i18n";
import { InspectorControls, useBlockProps } from "@wordpress/block-editor";
import {
PanelBody,
CheckboxControl,
ToggleControl,
__experimentalToggleGroupControl as ToggleGroupControl,
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
} from "@wordpress/components";
import "./editor.scss";
/**
* Retrieves the translation of text.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
*/
import { __ } from '@wordpress/i18n';
export default function Edit({ attributes, setAttributes }) {
const { displayType } = attributes;
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
*/
import { useBlockProps } from '@wordpress/block-editor';
function onDisplayTypeChange(value) {
setAttributes({ displayType: value });
}
/**
* Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
* Those files can contain any CSS code that gets applied to the editor.
*
* @see https://www.npmjs.com/package/@wordpress/scripts#using-css
*/
import './editor.scss';
/**
* The edit function describes the structure of your block in the context of the
* editor. This represents what the editor will render when the block is used.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit
*
* @return {Element} Element to render.
*/
export default function Edit() {
return (
<>
<InspectorControls>
<PanelBody title={__("Paramètres", "dernieres-dynamiques")}>
<ToggleGroupControl
className="homegrade-blocks-highlight__variant"
isBlock
label="Type d'affichage des posts"
onChange={onDisplayTypeChange}
value={displayType}
>
<ToggleGroupControlOption label="Slider" value="slider" />
<ToggleGroupControlOption label="Grille" value="grid" />
</ToggleGroupControl>
</PanelBody>
</InspectorControls>
<p { ...useBlockProps() }>
{ __(
"Dernieres Dynamiques hello from the editor!",
"dernieres-dynamiques"
'Dernieres Dynamiques hello from the editor!',
'dernieres-dynamiques'
) }
</p>
</>
);
}

View File

@ -1,9 +1,8 @@
<?php
$displayType = $attributes['displayType'] ?? 'grid';
$current_blog_id = get_current_blog_id();
switch_to_blog(2);
$args = array(
'post_type' => 'revues',
'posts_per_page' => 1,
@ -11,6 +10,9 @@ $args = array(
'order' => 'DESC',
);
$dynamiques = new WP_Query($args);
$last_issue = $dynamiques->posts[0];
@ -31,7 +33,7 @@ $issue_related_articles = new WP_Query(array(
?>
<section class="block-dernieres-dynamiques content-section ">
<section class="block-dernieres-dynamiques">
<div class="block-dernieres-dynamiques__inner">
<div class="block-dernieres-dynamiques__header">
<h2 class="block-title">
@ -81,7 +83,7 @@ $issue_related_articles = new WP_Query(array(
<div class="article-caroussel">
<?php if ($displayType === 'grid') : ?>
<?php foreach ($issue_related_articles->posts as $article) : ?>
<div class="article-card">
@ -120,16 +122,6 @@ $issue_related_articles = new WP_Query(array(
</div>
<?php endforeach; ?>
<?php else : ?>
<div class="article-caroussel__slider">
<p>sliiiiiiiidzer</p>
<?php foreach ($issue_related_articles->posts as $article) : ?>
<div class="article-card">
<?php echo get_the_post_thumbnail($article->ID, 'full'); ?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<button class="related-articles__show-all">

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'f81af659be9b9ce1ef51');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '59979956efc4eccd0d52');

View File

@ -29,14 +29,42 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/explore-tags/editor.scss");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
/**
* Retrieves the translation of text.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
*/
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
*/
/**
* Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
* Those files can contain any CSS code that gets applied to the editor.
*
* @see https://www.npmjs.com/package/@wordpress/scripts#using-css
*/
/**
* The edit function describes the structure of your block in the context of the
* editor. This represents what the editor will render when the block is used.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit
*
* @return {Element} Element to render.
*/
function Edit() {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)(),
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Explore Tags hello from the editor!", "explore-tags")
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Explore Tags hello from the editor!', 'explore-tags')
});
}

File diff suppressed because one or more lines are too long

View File

@ -10,8 +10,8 @@ $tags = get_terms(array(
<section class="explore-tags">
<div class="inner">
<div class="explore-tags__titling">
<h2 class="explore-tags__title title-small">Tags</h2>
<h3 class="explore-tags__subtitle subtitle-big">Explorer <br /> par Tags</h2>
<h2 class="explore-tags__title">Tags</h2>
<h3 class="explore-tags__subtitle">Explorer <br /> par Tags</h2>
</div>
<div class="tag-list">
<?php foreach ($tags as $tag) : ?>

View File

@ -1,12 +1,38 @@
import { __ } from "@wordpress/i18n";
import { useBlockProps } from "@wordpress/block-editor";
/**
* Retrieves the translation of text.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
*/
import { __ } from '@wordpress/i18n';
import "./editor.scss";
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
*/
import { useBlockProps } from '@wordpress/block-editor';
/**
* Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
* Those files can contain any CSS code that gets applied to the editor.
*
* @see https://www.npmjs.com/package/@wordpress/scripts#using-css
*/
import './editor.scss';
/**
* The edit function describes the structure of your block in the context of the
* editor. This represents what the editor will render when the block is used.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit
*
* @return {Element} Element to render.
*/
export default function Edit() {
return (
<p { ...useBlockProps() }>
{__("Explore Tags hello from the editor!", "explore-tags")}
{ __( 'Explore Tags hello from the editor!', 'explore-tags' ) }
</p>
);
}

View File

@ -10,8 +10,8 @@ $tags = get_terms(array(
<section class="explore-tags">
<div class="inner">
<div class="explore-tags__titling">
<h2 class="explore-tags__title title-small">Tags</h2>
<h3 class="explore-tags__subtitle subtitle-big">Explorer <br /> par Tags</h2>
<h2 class="explore-tags__title">Tags</h2>
<h3 class="explore-tags__subtitle">Explorer <br /> par Tags</h2>
</div>
<div class="tag-list">
<?php foreach ($tags as $tag) : ?>

View File

@ -27,22 +27,24 @@ $query = new WP_Query(array(
<span class="content-meta__type content-meta__type--revue">Revue</span>
</div>
<div class="card-revue__content">
<h4 class="card-revue__title title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<h5 class="card-revue__edito-title edito-title">Édito</h5>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="card-revue__excerpt">
<?php the_excerpt(); ?>
</div>
</div>
<div class="card-revue__issue-thumbnail-wrapper">
<?php $post_thumbnail_id = get_the_post_thumbnail(get_the_ID(), 'full'); ?>
<div class="card-revue__issue-thumbnail">
<?php if ($post_thumbnail_id) : ?>
<?php echo $post_thumbnail_id; ?>
<?php endif; ?>
<div class="block-dernieres-dynamiques__issue-thumbnail-wrapper">
<div class="block-dernieres-dynamiques__issue-thumbnail">
<?php echo get_the_post_thumbnail($last_issue->ID, 'full'); ?>
</div>
<div class="card-background"></div>
</div>
<div class="card-revue__image">
<?php if (has_post_thumbnail()) : ?>
<?php the_post_thumbnail('medium'); ?>
<?php endif; ?>
</div>
</article>

View File

@ -27,22 +27,24 @@ $query = new WP_Query(array(
<span class="content-meta__type content-meta__type--revue">Revue</span>
</div>
<div class="card-revue__content">
<h4 class="card-revue__title title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<h5 class="card-revue__edito-title edito-title">Édito</h5>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="card-revue__excerpt">
<?php the_excerpt(); ?>
</div>
</div>
<div class="card-revue__issue-thumbnail-wrapper">
<?php $post_thumbnail_id = get_the_post_thumbnail(get_the_ID(), 'full'); ?>
<div class="card-revue__issue-thumbnail">
<?php if ($post_thumbnail_id) : ?>
<?php echo $post_thumbnail_id; ?>
<?php endif; ?>
<div class="block-dernieres-dynamiques__issue-thumbnail-wrapper">
<div class="block-dernieres-dynamiques__issue-thumbnail">
<?php echo get_the_post_thumbnail($last_issue->ID, 'full'); ?>
</div>
<div class="card-background"></div>
</div>
<div class="card-revue__image">
<?php if (has_post_thumbnail()) : ?>
<?php the_post_thumbnail('medium'); ?>
<?php endif; ?>
</div>
</article>

View File

@ -30,20 +30,10 @@ add_action('block_categories_all', 'dynamiques_add_block_categories', 25, 2);
/* ----------------------------------------------------------------
##### REQUIRE GUTENNBERG BLOCKS
##### ENQUEUE BLOCKS
------------------------------------------------------------------*/
require_once __DIR__ . '/blocks/article-container/article-container.php';
require_once __DIR__ . '/blocks/dernieres-dynamiques/dernieres-dynamiques.php';
require_once __DIR__ . '/blocks/explore-tags/explore-tags.php';
require_once __DIR__ . '/blocks/revues-precedentes/revues-precedentes.php';
/* ---------------------------
##### REGISTER ACF BLOCKS
---------------------------*/
function dynamiques_register_acf_blocks_init()
{
register_block_type(__DIR__ . '/acf-blocks/team-authors');
}
add_action('init', 'dynamiques_register_acf_blocks_init');