Compare commits

...

3 Commits

Author SHA1 Message Date
Antoine M
c9ae38acc7 FIX inner not closed
All checks were successful
continuous-integration/drone/push Build is passing
2025-10-01 12:31:20 +02:00
Antoine M
ff22479995 REFACTOR The component to handle the reusable internal-link class with animation 2025-10-01 12:31:06 +02:00
Antoine M
b3fa948ccf FIX Mistake 2025-10-01 12:30:35 +02:00
13 changed files with 497 additions and 774 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,7 +262,8 @@ function Edit({
"--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, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("svg", {
className: `chapter-section__background chapter-section__background--${backgroundOrientation}`,
width: "1302",
height: "654",
@ -272,6 +273,7 @@ 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", {
@ -389,9 +391,11 @@ 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} ${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: {
"--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", {

File diff suppressed because one or more lines are too long

View File

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

View File

@ -12,18 +12,23 @@ export default function save({ attributes }) {
blockWidth,
textColor,
} = 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}
${
blockWidth === "full"
? "chapter-section--width-full"
: "chapter-section--width-contained"
}
${
hasBackgroundColor && backgroundColor
? "chapter-section--has-background"
: ""
}`,
style: {
"--chapter-section-text-color": textColor,
"--chapter-section-text-color": textColor ? textColor : "#136f63",
},
})}
>

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,6 @@ $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([
@ -22,14 +21,4 @@ $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,7 +5,6 @@ $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([
@ -22,14 +21,4 @@ $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,4 +104,5 @@ $query = new WP_Query(array(
<?php endif; ?>
</div>
</div>
</section>

View File

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