Compare commits
3 Commits
8a6a3c48f1
...
c9ae38acc7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9ae38acc7 | ||
|
|
ff22479995 | ||
|
|
b3fa948ccf |
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -262,15 +262,17 @@ function Edit({
|
|||
"--chapter-section-text-color": textColor ? textColor : "#136f63"
|
||||
}
|
||||
}),
|
||||
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
|
||||
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",
|
||||
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", {
|
||||
className: "chapter-section__content",
|
||||
|
|
@ -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
|
|
@ -201,18 +201,20 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
|||
})}
|
||||
>
|
||||
{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>
|
||||
<>
|
||||
<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">
|
||||
|
|
|
|||
|
|
@ -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" : ""
|
||||
} ${
|
||||
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",
|
||||
},
|
||||
})}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -104,4 +104,5 @@ $query = new WP_Query(array(
|
|||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -104,4 +104,5 @@ $query = new WP_Query(array(
|
|||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
Loading…
Reference in New Issue
Block a user