Compare commits

..

No commits in common. "c9ae38acc76f71b62f473961a13ce67e0f5bb6c4" and "8a6a3c48f16f58f3537a8b6a27f4838fd3e59bfe" have entirely different histories.

13 changed files with 774 additions and 497 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' => 'ca8961fe68bd680871dd'); <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '1c6fc2bb0489b28aa083');

View File

@ -262,8 +262,7 @@ 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)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, { children: [hasBackgroundColor && backgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("svg", {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("svg", {
className: `chapter-section__background chapter-section__background--${backgroundOrientation}`, className: `chapter-section__background chapter-section__background--${backgroundOrientation}`,
width: "1302", width: "1302",
height: "654", height: "654",
@ -273,7 +272,6 @@ function Edit({
d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z", d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z",
fill: backgroundColor 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",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
@ -391,11 +389,9 @@ 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} 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"}`,
${blockWidth === "full" ? "chapter-section--width-full" : "chapter-section--width-contained"}
${hasBackgroundColor && backgroundColor ? "chapter-section--has-background" : ""}`,
style: { style: {
"--chapter-section-text-color": textColor ? textColor : "#136f63" "--chapter-section-text-color": textColor
} }
}), }),
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,7 +201,6 @@ export default function Edit({ attributes, setAttributes, ...props }) {
})} })}
> >
{hasBackgroundColor && backgroundColor && ( {hasBackgroundColor && backgroundColor && (
<>
<svg <svg
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`} className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
width="1302" width="1302"
@ -214,7 +213,6 @@ export default function Edit({ attributes, setAttributes, ...props }) {
fill={backgroundColor} 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,23 +12,18 @@ 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 ? textColor : "#136f63", "--chapter-section-text-color": textColor,
}, },
})} })}
> >

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,7 @@ $text = isset($attributes['text']) ? $attributes['text'] : '';
$color = isset($attributes['color']) ? $attributes['color'] : 'red'; $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([ $wrapper_attributes = get_block_wrapper_attributes([
@ -21,4 +22,14 @@ $link_url = isset($link['url']) ? esc_url($link['url']) : '#';
<a href="<?php echo $link_url; ?>" <?php echo $wrapper_attributes; ?>> <a href="<?php echo $link_url; ?>" <?php echo $wrapper_attributes; ?>>
<?php echo esc_html($text); ?> <?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> </a>

View File

@ -68,9 +68,9 @@ export default function Edit({ attributes, setAttributes }) {
onChange={(text) => setAttributes({ text })} onChange={(text) => setAttributes({ text })}
allowedFormats={[]} allowedFormats={[]}
/> />
{/* <div className="icon"> <div className="icon">
<ArrowIcon style={{ "--cta-current-color": color }} /> <ArrowIcon style={{ "--cta-current-color": color }} />
</div> */} </div>
</div> </div>
</> </>
); );

View File

@ -5,6 +5,7 @@ $text = isset($attributes['text']) ? $attributes['text'] : '';
$color = isset($attributes['color']) ? $attributes['color'] : 'red'; $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([ $wrapper_attributes = get_block_wrapper_attributes([
@ -21,4 +22,14 @@ $link_url = isset($link['url']) ? esc_url($link['url']) : '#';
<a href="<?php echo $link_url; ?>" <?php echo $wrapper_attributes; ?>> <a href="<?php echo $link_url; ?>" <?php echo $wrapper_attributes; ?>>
<?php echo esc_html($text); ?> <?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> </a>

View File

@ -104,5 +104,4 @@ $query = new WP_Query(array(
<?php endif; ?> <?php endif; ?>
</div> </div>
</div>
</section> </section>

View File

@ -104,5 +104,4 @@ $query = new WP_Query(array(
<?php endif; ?> <?php endif; ?>
</div> </div>
</div>
</section> </section>