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"
}
}),
children: [hasBackgroundColor && backgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("svg", {
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",
@ -273,7 +272,6 @@ function Edit({
d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z",
fill: backgroundColor
})
})
}), /*#__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", {
@ -391,11 +389,9 @@ function save({
} = 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}
${blockWidth === "full" ? "chapter-section--width-full" : "chapter-section--width-contained"}
${hasBackgroundColor && backgroundColor ? "chapter-section--has-background" : ""}`,
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"}`,
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", {

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 && (
<>
<svg
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
width="1302"
@ -214,7 +213,6 @@ export default function Edit({ attributes, setAttributes, ...props }) {
fill={backgroundColor}
/>
</svg>
</>
)}
<div className="chapter-section__content">
<div className="chapter-section__innerblocks">

View File

@ -12,23 +12,18 @@ export default function save({ attributes }) {
blockWidth,
textColor,
} = attributes;
return (
<section
{...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"
}
${
hasBackgroundColor && backgroundColor
? "chapter-section--has-background"
: ""
}`,
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';
$svg_arrow_path = get_template_directory() . '/resources/img/carhop-fleche-lien-externe-full.svg';
$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; ?>>
<?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

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

View File

@ -5,6 +5,7 @@ $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([
@ -21,4 +22,14 @@ $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

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

View File

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