FIX Mistake

This commit is contained in:
Antoine M 2025-10-01 12:30:35 +02:00
parent 8a6a3c48f1
commit b3fa948ccf
5 changed files with 44 additions and 33 deletions

View File

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

View File

@ -262,15 +262,17 @@ function Edit({
"--chapter-section-text-color": textColor ? textColor : "#136f63" "--chapter-section-text-color": textColor ? textColor : "#136f63"
} }
}), }),
children: [hasBackgroundColor && backgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("svg", { children: [hasBackgroundColor && backgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {
className: `chapter-section__background chapter-section__background--${backgroundOrientation}`, children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("svg", {
width: "1302", className: `chapter-section__background chapter-section__background--${backgroundOrientation}`,
height: "654", width: "1302",
viewBox: "0 0 1302 654", height: "654",
preserveAspectRatio: "none", viewBox: "0 0 1302 654",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("path", { preserveAspectRatio: "none",
d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("path", {
fill: backgroundColor d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z",
fill: backgroundColor
})
}) })
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: "chapter-section__content", className: "chapter-section__content",
@ -389,9 +391,11 @@ function save({
} = attributes; } = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section", { return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({ ..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} ${backgroundColor ? "chapter-section--has-background" : ""} ${blockWidth === "full" ? "chapter-section--width-full" : "chapter-section--width-contained"}`, className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition}
${blockWidth === "full" ? "chapter-section--width-full" : "chapter-section--width-contained"}
${hasBackgroundColor && backgroundColor ? "chapter-section--has-background" : ""}`,
style: { style: {
"--chapter-section-text-color": textColor "--chapter-section-text-color": textColor ? textColor : "#136f63"
} }
}), }),
children: [hasBackgroundColor && backgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", { children: [hasBackgroundColor && backgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {

File diff suppressed because one or more lines are too long

View File

@ -201,18 +201,20 @@ export default function Edit({ attributes, setAttributes, ...props }) {
})} })}
> >
{hasBackgroundColor && backgroundColor && ( {hasBackgroundColor && backgroundColor && (
<svg <>
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`} <svg
width="1302" className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
height="654" width="1302"
viewBox="0 0 1302 654" height="654"
preserveAspectRatio="none" viewBox="0 0 1302 654"
> preserveAspectRatio="none"
<path >
d="M1302 0L0 15.8281V654L1302 642.633L1302 0Z" <path
fill={backgroundColor} d="M1302 0L0 15.8281V654L1302 642.633L1302 0Z"
/> fill={backgroundColor}
</svg> />
</svg>
</>
)} )}
<div className="chapter-section__content"> <div className="chapter-section__content">
<div className="chapter-section__innerblocks"> <div className="chapter-section__innerblocks">

View File

@ -12,18 +12,23 @@ export default function save({ attributes }) {
blockWidth, blockWidth,
textColor, textColor,
} = attributes; } = attributes;
return ( return (
<section <section
{...useBlockProps.save({ {...useBlockProps.save({
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} ${ className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition}
backgroundColor ? "chapter-section--has-background" : "" ${
} ${ blockWidth === "full"
blockWidth === "full" ? "chapter-section--width-full"
? "chapter-section--width-full" : "chapter-section--width-contained"
: "chapter-section--width-contained" }
}`, ${
hasBackgroundColor && backgroundColor
? "chapter-section--has-background"
: ""
}`,
style: { style: {
"--chapter-section-text-color": textColor, "--chapter-section-text-color": textColor ? textColor : "#136f63",
}, },
})} })}
> >