Compare commits
9 Commits
5dc6ea260d
...
05c48e2779
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05c48e2779 | ||
|
|
77e3a3c62e | ||
|
|
a1d9d77f43 | ||
|
|
7977652966 | ||
|
|
1c948198f6 | ||
|
|
99d17aca85 | ||
|
|
7727f3bb7e | ||
|
|
6b7afb7dad | ||
|
|
3148507053 |
|
|
@ -35,6 +35,32 @@ function carhop_create_posttype()
|
||||||
'taxonomies' => array('category'),
|
'taxonomies' => array('category'),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
register_post_type(
|
||||||
|
'equipe',
|
||||||
|
// CPT Options
|
||||||
|
array(
|
||||||
|
'labels' => array(
|
||||||
|
'name' => __('Equipe'),
|
||||||
|
'singular_name' => __('Equipe'),
|
||||||
|
'add_new' => __('Ajouter un membre'),
|
||||||
|
'add_new_item' => __('Ajouter un nouveau membre'),
|
||||||
|
'edit_item' => __('Editer le membre'),
|
||||||
|
'new_item' => __('Nouveau membre'),
|
||||||
|
'view_item' => __('Voir le membre'),
|
||||||
|
'search_items' => __('Chercher un membre'),
|
||||||
|
'not_found' => __('Pas de membre trouvé'),
|
||||||
|
'not_found_in_trash' => __('Pas de membre trouvé dans la corbeille'),
|
||||||
|
'all_items' => __('Tous les membres'),
|
||||||
|
),
|
||||||
|
'public' => true,
|
||||||
|
'has_archive' => true,
|
||||||
|
'rewrite' => array('slug' => 'equipe'),
|
||||||
|
'show_in_rest' => true,
|
||||||
|
'menu_icon' => 'data:image/svg+xml;base64,' . base64_encode('<svg xmlns="http://www.w3.org/2000/svg" width="32" height="40" fill="none" viewBox="0 0 32 40"><path d="M12,11c0-2.2,1.8-4,4-4s4,1.8,4,4-1.8,4-4,4-4-1.8-4-4ZM8,16c1.7,0,3-1.3,3-3s-1.3-3-3-3-3,1.3-3,3,1.3,3,3,3ZM24,16c1.7,0,3-1.3,3-3s-1.3-3-3-3-3,1.3-3,3,1.3,3,3,3ZM15.1,16.1c-3.5.5-6.1,3.6-6.1,7.2h0c0,1,.8,1.8,1.8,1.8h10.5c1,0,1.8-.8,1.8-1.8v-.2c0-4.2-3.7-7.5-7.9-6.9h0ZM9.2,17.1c-.4,0-.8-.1-1.2-.1-3.3,0-6,2.7-6,6s.9,2,2,2h3.5c-.3-.5-.5-1.1-.5-1.8,0-2.3.8-4.5,2.2-6.1ZM24,17c-.4,0-.8,0-1.2.1,1.4,1.6,2.2,3.7,2.2,5.9v.2c0,.6-.2,1.2-.5,1.8h3.5c1.1,0,2-.9,2-2,0-3.3-2.7-6-6-6Z"/></svg>'),
|
||||||
|
'menu_position' => 5,
|
||||||
|
'supports' => array('title', 'custom-fields'),
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
add_action('init', 'carhop_create_posttype');
|
add_action('init', 'carhop_create_posttype');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,12 @@ return array(
|
||||||
|
|
||||||
),
|
),
|
||||||
'supports' => array(
|
'supports' => array(
|
||||||
'html' => false
|
'html' => false,
|
||||||
|
'border' => array(
|
||||||
|
'color' => true,
|
||||||
|
'style' => true,
|
||||||
|
'width' => true
|
||||||
|
)
|
||||||
),
|
),
|
||||||
'textdomain' => 'carhop-blocks',
|
'textdomain' => 'carhop-blocks',
|
||||||
'editorScript' => 'file:./index.js',
|
'editorScript' => 'file:./index.js',
|
||||||
|
|
@ -194,10 +199,23 @@ return array(
|
||||||
'right'
|
'right'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'hasBackgroundColor' => array(
|
'hasBorder' => array(
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'default' => false
|
'default' => false
|
||||||
),
|
),
|
||||||
|
'blockVariant' => array(
|
||||||
|
'type' => 'string',
|
||||||
|
'default' => 'framed',
|
||||||
|
'enum' => array(
|
||||||
|
'framed',
|
||||||
|
'backgrounded',
|
||||||
|
'nude'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'borderColor' => array(
|
||||||
|
'type' => 'string',
|
||||||
|
'default' => '#136f63'
|
||||||
|
),
|
||||||
'backgroundColor' => array(
|
'backgroundColor' => array(
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'default' => '#ffffff'
|
'default' => '#ffffff'
|
||||||
|
|
@ -217,14 +235,6 @@ return array(
|
||||||
'variationA',
|
'variationA',
|
||||||
'variationB'
|
'variationB'
|
||||||
)
|
)
|
||||||
),
|
|
||||||
'backgroundOrientation' => array(
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => 'left',
|
|
||||||
'enum' => array(
|
|
||||||
'left',
|
|
||||||
'right'
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'usesContext' => array(
|
'usesContext' => array(
|
||||||
|
|
@ -596,6 +606,27 @@ return array(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
'notice-panel' => array(
|
||||||
|
'$schema' => 'https://schemas.wp.org/trunk/block.json',
|
||||||
|
'apiVersion' => 3,
|
||||||
|
'name' => 'carhop-blocks/notice-panel',
|
||||||
|
'version' => '0.1.0',
|
||||||
|
'title' => 'Encart d\'information',
|
||||||
|
'category' => 'carhop-blocks',
|
||||||
|
'icon' => 'smiley',
|
||||||
|
'description' => 'Encart d\'information pour la mise en avant d\'éléments informatifs',
|
||||||
|
'example' => array(
|
||||||
|
|
||||||
|
),
|
||||||
|
'supports' => array(
|
||||||
|
'html' => false
|
||||||
|
),
|
||||||
|
'textdomain' => 'carhop-blocks',
|
||||||
|
'editorScript' => 'file:./index.js',
|
||||||
|
'editorStyle' => 'file:./index.css',
|
||||||
|
'style' => 'file:./style-index.css',
|
||||||
|
'viewScript' => 'file:./view.js'
|
||||||
|
),
|
||||||
'our-collection' => array(
|
'our-collection' => array(
|
||||||
'$schema' => 'https://schemas.wp.org/trunk/block.json',
|
'$schema' => 'https://schemas.wp.org/trunk/block.json',
|
||||||
'apiVersion' => 3,
|
'apiVersion' => 3,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,12 @@
|
||||||
"description": "Example block scaffolded with Create Block tool.",
|
"description": "Example block scaffolded with Create Block tool.",
|
||||||
"example": {},
|
"example": {},
|
||||||
"supports": {
|
"supports": {
|
||||||
"html": false
|
"html": false,
|
||||||
|
"border": {
|
||||||
|
"color": true,
|
||||||
|
"style": true,
|
||||||
|
"width": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"textdomain": "carhop-blocks",
|
"textdomain": "carhop-blocks",
|
||||||
"editorScript": "file:./index.js",
|
"editorScript": "file:./index.js",
|
||||||
|
|
@ -65,10 +70,23 @@
|
||||||
"right"
|
"right"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"hasBackgroundColor": {
|
"hasBorder": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false
|
"default": false
|
||||||
},
|
},
|
||||||
|
"blockVariant": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "framed",
|
||||||
|
"enum": [
|
||||||
|
"framed",
|
||||||
|
"backgrounded",
|
||||||
|
"nude"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"borderColor": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "#136f63"
|
||||||
|
},
|
||||||
"backgroundColor": {
|
"backgroundColor": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "#ffffff"
|
"default": "#ffffff"
|
||||||
|
|
@ -88,14 +106,6 @@
|
||||||
"variationA",
|
"variationA",
|
||||||
"variationB"
|
"variationB"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"backgroundOrientation": {
|
|
||||||
"type": "string",
|
|
||||||
"default": "left",
|
|
||||||
"enum": [
|
|
||||||
"left",
|
|
||||||
"right"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"usesContext": [
|
"usesContext": [
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '95ff1c4d9ff66e0c99f2');
|
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => 'a3913cd7d447c34aa294');
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ var trash_default = /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODUL
|
||||||
\****************************************/
|
\****************************************/
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/chapter-section","version":"0.1.0","title":" Section Chapitre","category":"carhop-blocks","icon":"smiley","description":"Example block scaffolded with Create Block tool.","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php","attributes":{"align":{"type":"string","default":"full"},"blockWidth":{"type":"string","default":"full","enum":["full","contained"]},"coverType":{"type":"string","default":"image","enum":["classic","photoframe"]},"coverUrl":{"type":"string"},"coverAlt":{"type":"string"},"coverId":{"type":"number"},"coverSize":{"type":"string","default":"large","enum":["small","medium","grande","large"]},"disposition":{"type":"string","default":"left","enum":["left","right"]},"hasBackgroundColor":{"type":"boolean","default":false},"backgroundColor":{"type":"string","default":"#ffffff"},"hasLightBackground":{"type":"boolean","default":true},"textColor":{"type":"string","default":"#136f63"},"shapeType":{"type":"string","default":"variationA","enum":["variationA","variationB"]},"backgroundOrientation":{"type":"string","default":"left","enum":["left","right"]}},"usesContext":["postType","postId"]}');
|
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/chapter-section","version":"0.1.0","title":" Section Chapitre","category":"carhop-blocks","icon":"smiley","description":"Example block scaffolded with Create Block tool.","example":{},"supports":{"html":false,"border":{"color":true,"style":true,"width":true}},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php","attributes":{"align":{"type":"string","default":"full"},"blockWidth":{"type":"string","default":"full","enum":["full","contained"]},"coverType":{"type":"string","default":"image","enum":["classic","photoframe"]},"coverUrl":{"type":"string"},"coverAlt":{"type":"string"},"coverId":{"type":"number"},"coverSize":{"type":"string","default":"large","enum":["small","medium","grande","large"]},"disposition":{"type":"string","default":"left","enum":["left","right"]},"hasBorder":{"type":"boolean","default":false},"blockVariant":{"type":"string","default":"framed","enum":["framed","backgrounded","nude"]},"borderColor":{"type":"string","default":"#136f63"},"backgroundColor":{"type":"string","default":"#ffffff"},"hasLightBackground":{"type":"boolean","default":true},"textColor":{"type":"string","default":"#136f63"},"shapeType":{"type":"string","default":"variationA","enum":["variationA","variationB"]}},"usesContext":["postType","postId"]}');
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|
@ -90,13 +90,19 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/.pnpm/@wordpress+icons@11.2.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js");
|
/* harmony import */ var _shapeA_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shapeA.jsx */ "./src/chapter-section/shapeA.jsx");
|
||||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
/* harmony import */ var _shapeB_jsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shapeB.jsx */ "./src/chapter-section/shapeB.jsx");
|
||||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
|
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/.pnpm/@wordpress+icons@11.2.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js");
|
||||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/chapter-section/editor.scss");
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||||
/* harmony import */ var _utilities_utilities__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../_utilities/utilities */ "./_utilities/utilities.js");
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__);
|
||||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./editor.scss */ "./src/chapter-section/editor.scss");
|
||||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__);
|
/* harmony import */ var _utilities_utilities__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../_utilities/utilities */ "./_utilities/utilities.js");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -119,12 +125,12 @@ function Edit({
|
||||||
coverAlt,
|
coverAlt,
|
||||||
coverId,
|
coverId,
|
||||||
coverSize,
|
coverSize,
|
||||||
hasBackgroundColor,
|
|
||||||
backgroundColor,
|
backgroundColor,
|
||||||
backgroundOrientation,
|
|
||||||
blockWidth,
|
blockWidth,
|
||||||
textColor,
|
textColor,
|
||||||
shapeType
|
shapeType,
|
||||||
|
blockVariant,
|
||||||
|
borderColor
|
||||||
} = attributes;
|
} = attributes;
|
||||||
function onDispositionChange(disposition) {
|
function onDispositionChange(disposition) {
|
||||||
setAttributes({
|
setAttributes({
|
||||||
|
|
@ -152,40 +158,39 @@ function Edit({
|
||||||
});
|
});
|
||||||
setHasLightBackground(value);
|
setHasLightBackground(value);
|
||||||
}
|
}
|
||||||
function onHasBackgroundColorChange(value) {
|
|
||||||
setAttributes({
|
|
||||||
hasBackgroundColor: value
|
|
||||||
});
|
|
||||||
if (!value) {
|
|
||||||
setAttributes({
|
|
||||||
backgroundColor: null
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function onCoverTypeChange(value) {
|
function onCoverTypeChange(value) {
|
||||||
setAttributes({
|
setAttributes({
|
||||||
coverType: value
|
coverType: value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function onBackgroundOrientationChange(value) {
|
function onBlockVariantChange(value) {
|
||||||
setAttributes({
|
setAttributes({
|
||||||
backgroundOrientation: value
|
blockVariant: value
|
||||||
});
|
});
|
||||||
|
if (value === "framed" || value === "nude") {
|
||||||
|
setAttributes({
|
||||||
|
backgroundColor: "#fff"
|
||||||
|
});
|
||||||
|
setAttributes({
|
||||||
|
hasLightBackground: true
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function setHasLightBackground(backgroundColor) {
|
function setHasLightBackground(backgroundColor) {
|
||||||
if (!backgroundColor) return;
|
if (!backgroundColor) return;
|
||||||
const isLightBackgroundColor = (0,_utilities_utilities__WEBPACK_IMPORTED_MODULE_5__.isColorLight)(backgroundColor);
|
const isLightBackgroundColor = (0,_utilities_utilities__WEBPACK_IMPORTED_MODULE_7__.isColorLight)(backgroundColor);
|
||||||
console.log(isLightBackgroundColor);
|
|
||||||
setAttributes({
|
setAttributes({
|
||||||
hasLightBackground: isLightBackgroundColor
|
hasLightBackground: isLightBackgroundColor
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment, {
|
console.log(backgroundColor);
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
|
console.log((0,_utilities_utilities__WEBPACK_IMPORTED_MODULE_7__.isColorLight)(backgroundColor));
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment, {
|
||||||
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
|
||||||
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, {
|
||||||
className: "deligraph-blocks-components-image__panel-body",
|
className: "deligraph-blocks-components-image__panel-body",
|
||||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Largeur", "deligraph-blocks"),
|
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Aspect & Variante de bloc", "deligraph-blocks"),
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControl, {
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, {
|
||||||
className: "deligraph-blocks__variant",
|
className: "deligraph-blocks__variant",
|
||||||
isBlock: true,
|
isBlock: true,
|
||||||
label: "Largeur du bloc",
|
label: "Largeur du bloc",
|
||||||
|
|
@ -193,65 +198,130 @@ function Edit({
|
||||||
blockWidth: value
|
blockWidth: value
|
||||||
}),
|
}),
|
||||||
value: blockWidth,
|
value: blockWidth,
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
label: "Contenue",
|
label: "Contenue",
|
||||||
value: "contained"
|
value: "contained"
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
label: "Pleine largeur",
|
label: "Pleine largeur",
|
||||||
value: "full"
|
value: "full"
|
||||||
})]
|
})]
|
||||||
})
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, {
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
|
className: "deligraph-blocks__variant",
|
||||||
|
isBlock: true,
|
||||||
|
label: "Mod\xE8le de bloc",
|
||||||
|
onChange: onBlockVariantChange,
|
||||||
|
value: blockVariant,
|
||||||
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
|
label: "Nu",
|
||||||
|
value: "nude"
|
||||||
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
|
label: "Encadr\xE9",
|
||||||
|
value: "framed"
|
||||||
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
|
label: "Fond Color\xE9",
|
||||||
|
value: "backgrounded"
|
||||||
|
})]
|
||||||
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, {
|
||||||
|
className: "deligraph-blocks__variant",
|
||||||
|
isBlock: true,
|
||||||
|
label: "Disposition",
|
||||||
|
onChange: onDispositionChange,
|
||||||
|
value: disposition,
|
||||||
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
|
label: "Gauche",
|
||||||
|
value: "left"
|
||||||
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
|
label: "Droite",
|
||||||
|
value: "right"
|
||||||
|
})]
|
||||||
|
})]
|
||||||
|
}), blockVariant === "backgrounded" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, {
|
||||||
|
className: "deligraph-blocks-components-image__panel-body",
|
||||||
|
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Arrière plan", "deligraph-blocks"),
|
||||||
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, {
|
||||||
|
className: "deligraph-blocks__variant",
|
||||||
|
isBlock: true,
|
||||||
|
label: "Type de forme",
|
||||||
|
onChange: value => setAttributes({
|
||||||
|
shapeType: value
|
||||||
|
}),
|
||||||
|
value: shapeType,
|
||||||
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
|
label: "Variation A",
|
||||||
|
value: "variationA"
|
||||||
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
|
label: "Variation B",
|
||||||
|
value: "variationB"
|
||||||
|
})]
|
||||||
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ColorPalette, {
|
||||||
|
colors: colors,
|
||||||
|
value: backgroundColor,
|
||||||
|
onChange: onBackgroundColorChange
|
||||||
|
})]
|
||||||
|
}), blockVariant === "framed" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, {
|
||||||
|
className: "deligraph-blocks-components-image__panel-body",
|
||||||
|
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Bordure", "deligraph-blocks"),
|
||||||
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, {
|
||||||
|
className: "deligraph-blocks__variant",
|
||||||
|
isBlock: true,
|
||||||
|
label: "Type de forme",
|
||||||
|
onChange: value => setAttributes({
|
||||||
|
shapeType: value
|
||||||
|
}),
|
||||||
|
value: shapeType,
|
||||||
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
|
label: "Variation A",
|
||||||
|
value: "variationA"
|
||||||
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
|
label: "Variation B",
|
||||||
|
value: "variationB"
|
||||||
|
})]
|
||||||
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ColorPalette, {
|
||||||
|
colors: colors,
|
||||||
|
value: borderColor,
|
||||||
|
onChange: value => setAttributes({
|
||||||
|
borderColor: value
|
||||||
|
})
|
||||||
|
})]
|
||||||
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, {
|
||||||
className: "deligraph-blocks-components-image__panel-body",
|
className: "deligraph-blocks-components-image__panel-body",
|
||||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Image d'accompagnement", "deligraph-blocks"),
|
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Image d'accompagnement", "deligraph-blocks"),
|
||||||
children: [coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("img", {
|
initialOpen: false,
|
||||||
|
children: [coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("img", {
|
||||||
src: coverUrl,
|
src: coverUrl,
|
||||||
alt: coverAlt
|
alt: coverAlt
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div", {
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
||||||
className: "media-replace-container",
|
className: "media-replace-container",
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaReplaceFlow, {
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaReplaceFlow, {
|
||||||
mediaId: coverId,
|
mediaId: coverId,
|
||||||
mediaUrl: coverUrl,
|
mediaUrl: coverUrl,
|
||||||
allowedTypes: ["image"],
|
allowedTypes: ["image"],
|
||||||
accept: "image/*",
|
accept: "image/*",
|
||||||
onSelect: setCoverAttributes,
|
onSelect: setCoverAttributes,
|
||||||
name: !coverUrl ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Ajouter votre image manuellement", "homegrade-blocks") : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Remplacer", "homegrade-blocks")
|
name: !coverUrl ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Ajouter votre image manuellement", "homegrade-blocks") : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Remplacer", "homegrade-blocks")
|
||||||
}), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment, {
|
}), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment, {
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.Button, {
|
||||||
className: "custom-flow-button",
|
className: "custom-flow-button",
|
||||||
variant: "primary",
|
variant: "primary",
|
||||||
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"],
|
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"],
|
||||||
label: "Supprimer",
|
label: "Supprimer",
|
||||||
onClick: removeCoverAttributes
|
onClick: removeCoverAttributes
|
||||||
})
|
})
|
||||||
})]
|
})]
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControl, {
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, {
|
||||||
className: "deligraph-blocks__variant",
|
className: "deligraph-blocks__variant",
|
||||||
isBlock: true,
|
isBlock: true,
|
||||||
label: "Type d'image",
|
label: "Type d'image",
|
||||||
onChange: onCoverTypeChange,
|
onChange: onCoverTypeChange,
|
||||||
value: coverType,
|
value: coverType,
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
label: "Classique",
|
label: "Classique",
|
||||||
value: "classic"
|
value: "classic"
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
label: "Encadr\xE9e",
|
label: "Encadr\xE9e",
|
||||||
value: "photoframe"
|
value: "photoframe"
|
||||||
})]
|
})]
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControl, {
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, {
|
||||||
className: "deligraph-blocks__variant",
|
|
||||||
isBlock: true,
|
|
||||||
label: "Disposition",
|
|
||||||
onChange: onDispositionChange,
|
|
||||||
value: disposition,
|
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
|
||||||
label: "Gauche",
|
|
||||||
value: "left"
|
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
|
||||||
label: "Droite",
|
|
||||||
value: "right"
|
|
||||||
})]
|
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControl, {
|
|
||||||
className: "deligraph-blocks__variant",
|
className: "deligraph-blocks__variant",
|
||||||
isBlock: true,
|
isBlock: true,
|
||||||
label: "Taille de l'image",
|
label: "Taille de l'image",
|
||||||
|
|
@ -259,53 +329,25 @@ function Edit({
|
||||||
coverSize
|
coverSize
|
||||||
}),
|
}),
|
||||||
value: coverSize,
|
value: coverSize,
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
label: "Big",
|
label: "Big",
|
||||||
value: "large"
|
value: "large"
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
label: "Grande",
|
label: "Grande",
|
||||||
value: "grande"
|
value: "grande"
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
label: "Moyenne",
|
label: "Moyenne",
|
||||||
value: "medium"
|
value: "medium"
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, {
|
||||||
label: "Petite",
|
label: "Petite",
|
||||||
value: "small"
|
value: "small"
|
||||||
})]
|
})]
|
||||||
})]
|
})]
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, {
|
||||||
className: "deligraph-blocks-components-image__panel-body",
|
|
||||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Arrière plan", "deligraph-blocks"),
|
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.CheckboxControl, {
|
|
||||||
label: "Arri\xE8re plan color\xE9",
|
|
||||||
checked: hasBackgroundColor,
|
|
||||||
onChange: onHasBackgroundColorChange
|
|
||||||
}), hasBackgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment, {
|
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControl, {
|
|
||||||
className: "deligraph-blocks__variant",
|
|
||||||
isBlock: true,
|
|
||||||
label: "Type de forme",
|
|
||||||
onChange: value => setAttributes({
|
|
||||||
shapeType: value
|
|
||||||
}),
|
|
||||||
value: shapeType,
|
|
||||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
|
||||||
label: "Variation A",
|
|
||||||
value: "variationA"
|
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
|
||||||
label: "Variation B",
|
|
||||||
value: "variationB"
|
|
||||||
})]
|
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ColorPalette, {
|
|
||||||
colors: colors,
|
|
||||||
value: backgroundColor,
|
|
||||||
onChange: onBackgroundColorChange
|
|
||||||
})]
|
|
||||||
})]
|
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
|
|
||||||
className: "deligraph-blocks-components-image__panel-body",
|
className: "deligraph-blocks-components-image__panel-body",
|
||||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Couleur du texte", "deligraph-blocks"),
|
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Couleur du texte", "deligraph-blocks"),
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ColorPalette, {
|
initialOpen: false,
|
||||||
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ColorPalette, {
|
||||||
colors: colors,
|
colors: colors,
|
||||||
value: textColor,
|
value: textColor,
|
||||||
onChange: value => setAttributes({
|
onChange: value => setAttributes({
|
||||||
|
|
@ -313,47 +355,34 @@ function Edit({
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})]
|
})]
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("section", {
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("section", {
|
||||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
||||||
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition}
|
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} chapter-section--${blockVariant}
|
||||||
${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" : ""}
|
|
||||||
${hasLightBackground ? "chapter-section--bg-light" : "chapter-section--bg-dark"}`,
|
${hasLightBackground ? "chapter-section--bg-light" : "chapter-section--bg-dark"}`,
|
||||||
style: {
|
style: {
|
||||||
"--chapter-section-text-color": textColor ? textColor : "#136f63"
|
"--chapter-section-text-color": textColor ? textColor : "#136f63",
|
||||||
|
"--cta-current-color": blockVariant === "backgrounded" ? "inherit" : "var(--wp--preset--color--primary) !important"
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
children: [hasBackgroundColor && backgroundColor && shapeType === "variationA" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment, {
|
children: [blockVariant === "backgrounded" && backgroundColor && shapeType === "variationA" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_shapeA_jsx__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("svg", {
|
backgroundColor: backgroundColor,
|
||||||
width: "1440",
|
borderColor: "none"
|
||||||
height: "744",
|
}), blockVariant === "backgrounded" && backgroundColor && shapeType === "variationB" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_shapeB_jsx__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
||||||
viewBox: "0 0 1440 744",
|
backgroundColor: backgroundColor,
|
||||||
fill: "none",
|
borderColor: "none"
|
||||||
xmlns: "http://www.w3.org/2000/svg",
|
}), blockVariant === "framed" && backgroundColor && shapeType === "variationA" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_shapeA_jsx__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
||||||
className: `chapter-section__background chapter-section__background--${backgroundOrientation}`,
|
backgroundColor: "none",
|
||||||
preserveAspectRatio: "none",
|
borderColor: borderColor
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("path", {
|
}), blockVariant === "framed" && backgroundColor && shapeType === "variationB" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_shapeB_jsx__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
||||||
d: "M0 0H1440V686.701L0 744V0Z",
|
backgroundColor: "none",
|
||||||
fill: backgroundColor
|
borderColor: borderColor
|
||||||
})
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div", {
|
||||||
})
|
|
||||||
}), hasBackgroundColor && backgroundColor && shapeType === "variationB" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment, {
|
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.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_6__.jsx)("path", {
|
|
||||||
d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z",
|
|
||||||
fill: backgroundColor
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
|
|
||||||
className: "chapter-section__content",
|
className: "chapter-section__content",
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div", {
|
||||||
className: "chapter-section__innerblocks",
|
className: "chapter-section__innerblocks",
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
||||||
template: [["carhop-blocks/heading", {
|
template: [["carhop-blocks/heading", {
|
||||||
innerBlocks: [["core/heading", {
|
innerBlocks: [["core/heading", {
|
||||||
content: "Un titre précis "
|
content: "Un titre précis "
|
||||||
|
|
@ -366,11 +395,11 @@ function Edit({
|
||||||
allowedBlocks: ["core/heading", "core/paragraph", "core/list", "core/button", "core/buttons", "carhop-blocks/cta", "carhop-blocks/heading"]
|
allowedBlocks: ["core/heading", "core/paragraph", "core/list", "core/button", "core/buttons", "carhop-blocks/cta", "carhop-blocks/heading"]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("img", {
|
}), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("img", {
|
||||||
className: `chapter-section__cover chapter-section__cover--${coverSize} chapter-section__cover--${coverType}`,
|
className: `chapter-section__cover chapter-section__cover--${coverSize} chapter-section__cover--${coverType}`,
|
||||||
src: coverUrl,
|
src: coverUrl,
|
||||||
alt: coverAlt
|
alt: coverAlt
|
||||||
}), !coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaPlaceholder, {
|
}), !coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaPlaceholder, {
|
||||||
accept: "image/*",
|
accept: "image/*",
|
||||||
allowedTypes: ["image"],
|
allowedTypes: ["image"],
|
||||||
onSelect: setCoverAttributes,
|
onSelect: setCoverAttributes,
|
||||||
|
|
@ -445,8 +474,12 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony export */ });
|
/* harmony export */ });
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
/* harmony import */ var _shapeA_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shapeA.jsx */ "./src/chapter-section/shapeA.jsx");
|
||||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
/* harmony import */ var _shapeB_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shapeB.jsx */ "./src/chapter-section/shapeB.jsx");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function save({
|
function save({
|
||||||
|
|
@ -460,55 +493,42 @@ function save({
|
||||||
coverSize,
|
coverSize,
|
||||||
coverType,
|
coverType,
|
||||||
backgroundColor,
|
backgroundColor,
|
||||||
hasBackgroundColor,
|
|
||||||
backgroundOrientation,
|
|
||||||
blockWidth,
|
blockWidth,
|
||||||
textColor,
|
textColor,
|
||||||
shapeType
|
shapeType,
|
||||||
|
blockVariant,
|
||||||
|
borderColor
|
||||||
} = attributes;
|
} = attributes;
|
||||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section", {
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.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} chapter-section--${blockVariant}
|
||||||
${blockWidth === "full" ? "chapter-section--width-full" : "chapter-section--width-contained"}
|
${blockWidth === "full" ? "chapter-section--width-full" : "chapter-section--width-contained"}
|
||||||
${hasLightBackground ? "chapter-section--bg-light" : "chapter-section--bg-dark"}
|
|
||||||
${hasBackgroundColor && backgroundColor ? "chapter-section--has-background" : ""}`,
|
${hasLightBackground ? "chapter-section--bg-light" : "chapter-section--bg-dark"}`,
|
||||||
style: {
|
style: {
|
||||||
"--chapter-section-text-color": textColor ? textColor : "#136f63"
|
"--chapter-section-text-color": textColor ? textColor : "#136f63",
|
||||||
|
"--cta-current-color": blockVariant === "backgrounded" ? "inherit" : "var(--wp--preset--color--primary) !important"
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
children: [hasBackgroundColor && backgroundColor && shapeType === "variationA" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
|
children: [blockVariant === "backgrounded" && backgroundColor && shapeType === "variationA" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_shapeA_jsx__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {
|
backgroundColor: backgroundColor,
|
||||||
width: "1440",
|
borderColor: "none"
|
||||||
height: "744",
|
}), blockVariant === "backgrounded" && backgroundColor && shapeType === "variationB" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_shapeB_jsx__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
||||||
viewBox: "0 0 1440 744",
|
backgroundColor: backgroundColor,
|
||||||
fill: "none",
|
borderColor: "none"
|
||||||
xmlns: "http://www.w3.org/2000/svg",
|
}), blockVariant === "framed" && backgroundColor && shapeType === "variationA" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_shapeA_jsx__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
||||||
className: `chapter-section__background chapter-section__background--${backgroundOrientation}`,
|
backgroundColor: "none",
|
||||||
preserveAspectRatio: "none",
|
borderColor: borderColor
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", {
|
}), blockVariant === "framed" && backgroundColor && shapeType === "variationB" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_shapeB_jsx__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
||||||
d: "M0 0H1440V686.701L0 744V0Z",
|
backgroundColor: "none",
|
||||||
fill: backgroundColor
|
borderColor: borderColor
|
||||||
})
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
|
||||||
})
|
|
||||||
}), hasBackgroundColor && backgroundColor && shapeType === "variationB" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
|
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.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_1__.jsx)("path", {
|
|
||||||
d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z",
|
|
||||||
fill: backgroundColor
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
|
||||||
className: "chapter-section__content",
|
className: "chapter-section__content",
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
|
||||||
className: "chapter-section__innerblocks",
|
className: "chapter-section__innerblocks",
|
||||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
|
||||||
})
|
})
|
||||||
}), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img", {
|
}), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
|
||||||
className: `chapter-section__cover chapter-section__cover--${coverSize} chapter-section__cover--${coverType}`,
|
className: `chapter-section__cover chapter-section__cover--${coverSize} chapter-section__cover--${coverType}`,
|
||||||
src: coverUrl,
|
src: coverUrl,
|
||||||
alt: coverAlt
|
alt: coverAlt
|
||||||
|
|
@ -518,6 +538,96 @@ function save({
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/chapter-section/shapeA.jsx":
|
||||||
|
/*!****************************************!*\
|
||||||
|
!*** ./src/chapter-section/shapeA.jsx ***!
|
||||||
|
\****************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (/* binding */ ShapeA)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||||||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
|
|
||||||
|
|
||||||
|
function ShapeA({
|
||||||
|
backgroundOrientation,
|
||||||
|
backgroundColor,
|
||||||
|
borderColor
|
||||||
|
}) {
|
||||||
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {
|
||||||
|
width: "1440",
|
||||||
|
height: "744",
|
||||||
|
viewBox: "0 0 1440 744",
|
||||||
|
fill: "none",
|
||||||
|
xmlns: "http://www.w3.org/2000/svg",
|
||||||
|
className: `chapter-section__background chapter-section__background--${backgroundOrientation}`,
|
||||||
|
preserveAspectRatio: "none",
|
||||||
|
vectorEffect: "non-scaling-stroke",
|
||||||
|
overflow: "visible",
|
||||||
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", {
|
||||||
|
d: "M0 0H1440V686.701L0 744V0Z",
|
||||||
|
fill: backgroundColor,
|
||||||
|
stroke: borderColor,
|
||||||
|
strokeWidth: borderColor ? "2px" : "0",
|
||||||
|
style: {
|
||||||
|
strokeLinejoin: "round",
|
||||||
|
vectorEffect: "non-scaling-stroke"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/chapter-section/shapeB.jsx":
|
||||||
|
/*!****************************************!*\
|
||||||
|
!*** ./src/chapter-section/shapeB.jsx ***!
|
||||||
|
\****************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (/* binding */ ShapeB)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||||||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
|
|
||||||
|
|
||||||
|
function ShapeB({
|
||||||
|
backgroundOrientation,
|
||||||
|
backgroundColor,
|
||||||
|
borderColor
|
||||||
|
}) {
|
||||||
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {
|
||||||
|
className: `chapter-section__background chapter-section__background--${backgroundOrientation}`,
|
||||||
|
width: "1302",
|
||||||
|
height: "654",
|
||||||
|
viewBox: "0 0 1302 654",
|
||||||
|
preserveAspectRatio: "none",
|
||||||
|
vectorEffect: "non-scaling-stroke",
|
||||||
|
overflow: "visible",
|
||||||
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", {
|
||||||
|
d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z",
|
||||||
|
fill: backgroundColor,
|
||||||
|
stroke: borderColor,
|
||||||
|
strokeWidth: borderColor ? "2px" : "0",
|
||||||
|
style: {
|
||||||
|
strokeLinejoin: "round",
|
||||||
|
vectorEffect: "non-scaling-stroke"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/chapter-section/style.scss":
|
/***/ "./src/chapter-section/style.scss":
|
||||||
/*!****************************************!*\
|
/*!****************************************!*\
|
||||||
!*** ./src/chapter-section/style.scss ***!
|
!*** ./src/chapter-section/style.scss ***!
|
||||||
|
|
@ -580,6 +690,16 @@ module.exports = window["wp"]["primitives"];
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "react":
|
||||||
|
/*!************************!*\
|
||||||
|
!*** external "React" ***!
|
||||||
|
\************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["React"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ "react/jsx-runtime":
|
/***/ "react/jsx-runtime":
|
||||||
/*!**********************************!*\
|
/*!**********************************!*\
|
||||||
!*** external "ReactJSXRuntime" ***!
|
!*** external "ReactJSXRuntime" ***!
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => 'a71301736092e4bf5e5d');
|
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => 'c3dee79056580a73a99f');
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ function Edit({
|
||||||
template: [["core/paragraph", {
|
template: [["core/paragraph", {
|
||||||
placeholder: "Ajouter ici le texte"
|
placeholder: "Ajouter ici le texte"
|
||||||
}]],
|
}]],
|
||||||
allowedBlocks: ["core/heading", "core/paragraph", "core/group", "core/list", "core/button", "core/image", "core/buttons", "core/columns", "core/post-title", "core/embed", "core/quote", "core/pullquote", "core/media-text", "carhop-blocks/heading", "carhop-blocks/decorative-shapes", "acf/statistics-datas", "carhop-blocks/scroll-story-block", "carhop-blocks/cta-group", "carhop-blocks/audio-player", "ninja-forms/form", "carhop-blocks/localisation-map", "gravityforms/form", "dynamiques-blocks/sitemap", "mailpoet/subscription-form-block", "shortcode"]
|
allowedBlocks: ["core/heading", "core/paragraph", "core/group", "core/list", "core/button", "core/image", "core/buttons", "core/columns", "core/post-title", "core/embed", "core/quote", "core/pullquote", "core/media-text", "core/table", "carhop-blocks/heading", "carhop-blocks/decorative-shapes", "carhop-blocks/scroll-story-block", "carhop-blocks/cta-group", "carhop-blocks/audio-player", "carhop-blocks/localisation-map", "carhop-blocks/notice-panel", "acf/statistics-datas", "ninja-forms/form", "gravityforms/form", "dynamiques-blocks/sitemap", "mailpoet/subscription-form-block", "shortcode"]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})]
|
})]
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
19
plugins/carhop-blocks/build/notice-panel/block.json
Normal file
19
plugins/carhop-blocks/build/notice-panel/block.json
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||||
|
"apiVersion": 3,
|
||||||
|
"name": "carhop-blocks/notice-panel",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"title": "Encart d'information",
|
||||||
|
"category": "carhop-blocks",
|
||||||
|
"icon": "smiley",
|
||||||
|
"description": "Encart d'information pour la mise en avant d'éléments informatifs",
|
||||||
|
"example": {},
|
||||||
|
"supports": {
|
||||||
|
"html": false
|
||||||
|
},
|
||||||
|
"textdomain": "carhop-blocks",
|
||||||
|
"editorScript": "file:./index.js",
|
||||||
|
"editorStyle": "file:./index.css",
|
||||||
|
"style": "file:./style-index.css",
|
||||||
|
"viewScript": "file:./view.js"
|
||||||
|
}
|
||||||
4
plugins/carhop-blocks/build/notice-panel/index-rtl.css
Normal file
4
plugins/carhop-blocks/build/notice-panel/index-rtl.css
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/notice-panel/editor.scss ***!
|
||||||
|
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
|
||||||
1
plugins/carhop-blocks/build/notice-panel/index.asset.php
Normal file
1
plugins/carhop-blocks/build/notice-panel/index.asset.php
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '7aabfb46e53e3b3a191d');
|
||||||
4
plugins/carhop-blocks/build/notice-panel/index.css
Normal file
4
plugins/carhop-blocks/build/notice-panel/index.css
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/notice-panel/editor.scss ***!
|
||||||
|
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
|
||||||
371
plugins/carhop-blocks/build/notice-panel/index.js
Normal file
371
plugins/carhop-blocks/build/notice-panel/index.js
Normal file
|
|
@ -0,0 +1,371 @@
|
||||||
|
/******/ (() => { // webpackBootstrap
|
||||||
|
/******/ "use strict";
|
||||||
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
|
/***/ "./src/notice-panel/block.json":
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** ./src/notice-panel/block.json ***!
|
||||||
|
\*************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/notice-panel","version":"0.1.0","title":"Encart d\'information","category":"carhop-blocks","icon":"smiley","description":"Encart d\'information pour la mise en avant d\'éléments informatifs","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/notice-panel/edit.js":
|
||||||
|
/*!**********************************!*\
|
||||||
|
!*** ./src/notice-panel/edit.js ***!
|
||||||
|
\**********************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||||
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/notice-panel/editor.scss");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function Edit({
|
||||||
|
attributes,
|
||||||
|
setAttributes
|
||||||
|
}) {
|
||||||
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, {
|
||||||
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
|
||||||
|
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
||||||
|
className: "notice-panel"
|
||||||
|
}),
|
||||||
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
|
||||||
|
className: "notice-panel__content",
|
||||||
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
|
||||||
|
className: "icon"
|
||||||
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
|
||||||
|
className: "innerblocks",
|
||||||
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
||||||
|
template: [["core/paragraph", {
|
||||||
|
placeholder: "Ajouter ici le texte"
|
||||||
|
}]]
|
||||||
|
})
|
||||||
|
})]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/notice-panel/editor.scss":
|
||||||
|
/*!**************************************!*\
|
||||||
|
!*** ./src/notice-panel/editor.scss ***!
|
||||||
|
\**************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/notice-panel/index.js":
|
||||||
|
/*!***********************************!*\
|
||||||
|
!*** ./src/notice-panel/index.js ***!
|
||||||
|
\***********************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||||
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/notice-panel/style.scss");
|
||||||
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/notice-panel/edit.js");
|
||||||
|
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/notice-panel/save.js");
|
||||||
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/notice-panel/block.json");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||||
|
icon: {
|
||||||
|
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
|
||||||
|
width: "32",
|
||||||
|
height: "32",
|
||||||
|
viewBox: "0 0 32 32",
|
||||||
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||||
|
d: "M16 24L8 16L16 8L24 16L16 24Z"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||||
|
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||||
|
});
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/notice-panel/save.js":
|
||||||
|
/*!**********************************!*\
|
||||||
|
!*** ./src/notice-panel/save.js ***!
|
||||||
|
\**********************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (/* binding */ save)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function save({
|
||||||
|
attributes
|
||||||
|
}) {
|
||||||
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||||
|
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
|
||||||
|
className: "notice-panel"
|
||||||
|
}),
|
||||||
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||||||
|
className: "notice-panel__content",
|
||||||
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||||
|
className: "icon"
|
||||||
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||||
|
className: "innerblocks",
|
||||||
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
|
||||||
|
})]
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/notice-panel/style.scss":
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** ./src/notice-panel/style.scss ***!
|
||||||
|
\*************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/block-editor":
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** external ["wp","blockEditor"] ***!
|
||||||
|
\*************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["blockEditor"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/blocks":
|
||||||
|
/*!********************************!*\
|
||||||
|
!*** external ["wp","blocks"] ***!
|
||||||
|
\********************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["blocks"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "@wordpress/i18n":
|
||||||
|
/*!******************************!*\
|
||||||
|
!*** external ["wp","i18n"] ***!
|
||||||
|
\******************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["wp"]["i18n"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "react/jsx-runtime":
|
||||||
|
/*!**********************************!*\
|
||||||
|
!*** external "ReactJSXRuntime" ***!
|
||||||
|
\**********************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = window["ReactJSXRuntime"];
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
|
||||||
|
/******/ });
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ // The module cache
|
||||||
|
/******/ var __webpack_module_cache__ = {};
|
||||||
|
/******/
|
||||||
|
/******/ // The require function
|
||||||
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/ // Check if module is in cache
|
||||||
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||||
|
/******/ if (cachedModule !== undefined) {
|
||||||
|
/******/ return cachedModule.exports;
|
||||||
|
/******/ }
|
||||||
|
/******/ // Create a new module (and put it into the cache)
|
||||||
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||||
|
/******/ // no module.id needed
|
||||||
|
/******/ // no module.loaded needed
|
||||||
|
/******/ exports: {}
|
||||||
|
/******/ };
|
||||||
|
/******/
|
||||||
|
/******/ // Execute the module function
|
||||||
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
|
/******/ // Return the exports of the module
|
||||||
|
/******/ return module.exports;
|
||||||
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
|
/******/ __webpack_require__.m = __webpack_modules__;
|
||||||
|
/******/
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ /* webpack/runtime/chunk loaded */
|
||||||
|
/******/ (() => {
|
||||||
|
/******/ var deferred = [];
|
||||||
|
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||||
|
/******/ if(chunkIds) {
|
||||||
|
/******/ priority = priority || 0;
|
||||||
|
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||||
|
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||||
|
/******/ return;
|
||||||
|
/******/ }
|
||||||
|
/******/ var notFulfilled = Infinity;
|
||||||
|
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||||
|
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||||
|
/******/ var fulfilled = true;
|
||||||
|
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||||
|
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||||
|
/******/ chunkIds.splice(j--, 1);
|
||||||
|
/******/ } else {
|
||||||
|
/******/ fulfilled = false;
|
||||||
|
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||||
|
/******/ }
|
||||||
|
/******/ }
|
||||||
|
/******/ if(fulfilled) {
|
||||||
|
/******/ deferred.splice(i--, 1)
|
||||||
|
/******/ var r = fn();
|
||||||
|
/******/ if (r !== undefined) result = r;
|
||||||
|
/******/ }
|
||||||
|
/******/ }
|
||||||
|
/******/ return result;
|
||||||
|
/******/ };
|
||||||
|
/******/ })();
|
||||||
|
/******/
|
||||||
|
/******/ /* webpack/runtime/compat get default export */
|
||||||
|
/******/ (() => {
|
||||||
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||||
|
/******/ __webpack_require__.n = (module) => {
|
||||||
|
/******/ var getter = module && module.__esModule ?
|
||||||
|
/******/ () => (module['default']) :
|
||||||
|
/******/ () => (module);
|
||||||
|
/******/ __webpack_require__.d(getter, { a: getter });
|
||||||
|
/******/ return getter;
|
||||||
|
/******/ };
|
||||||
|
/******/ })();
|
||||||
|
/******/
|
||||||
|
/******/ /* webpack/runtime/define property getters */
|
||||||
|
/******/ (() => {
|
||||||
|
/******/ // define getter functions for harmony exports
|
||||||
|
/******/ __webpack_require__.d = (exports, definition) => {
|
||||||
|
/******/ for(var key in definition) {
|
||||||
|
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||||
|
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||||
|
/******/ }
|
||||||
|
/******/ }
|
||||||
|
/******/ };
|
||||||
|
/******/ })();
|
||||||
|
/******/
|
||||||
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||||
|
/******/ (() => {
|
||||||
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||||
|
/******/ })();
|
||||||
|
/******/
|
||||||
|
/******/ /* webpack/runtime/make namespace object */
|
||||||
|
/******/ (() => {
|
||||||
|
/******/ // define __esModule on exports
|
||||||
|
/******/ __webpack_require__.r = (exports) => {
|
||||||
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||||
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||||
|
/******/ }
|
||||||
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
|
/******/ };
|
||||||
|
/******/ })();
|
||||||
|
/******/
|
||||||
|
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||||
|
/******/ (() => {
|
||||||
|
/******/ // no baseURI
|
||||||
|
/******/
|
||||||
|
/******/ // object to store loaded and loading chunks
|
||||||
|
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||||
|
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||||
|
/******/ var installedChunks = {
|
||||||
|
/******/ "notice-panel/index": 0,
|
||||||
|
/******/ "notice-panel/style-index": 0
|
||||||
|
/******/ };
|
||||||
|
/******/
|
||||||
|
/******/ // no chunk on demand loading
|
||||||
|
/******/
|
||||||
|
/******/ // no prefetching
|
||||||
|
/******/
|
||||||
|
/******/ // no preloaded
|
||||||
|
/******/
|
||||||
|
/******/ // no HMR
|
||||||
|
/******/
|
||||||
|
/******/ // no HMR manifest
|
||||||
|
/******/
|
||||||
|
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||||
|
/******/
|
||||||
|
/******/ // install a JSONP callback for chunk loading
|
||||||
|
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||||
|
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||||
|
/******/ // add "moreModules" to the modules object,
|
||||||
|
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||||
|
/******/ var moduleId, chunkId, i = 0;
|
||||||
|
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||||
|
/******/ for(moduleId in moreModules) {
|
||||||
|
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||||
|
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||||
|
/******/ }
|
||||||
|
/******/ }
|
||||||
|
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||||
|
/******/ }
|
||||||
|
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||||
|
/******/ for(;i < chunkIds.length; i++) {
|
||||||
|
/******/ chunkId = chunkIds[i];
|
||||||
|
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||||
|
/******/ installedChunks[chunkId][0]();
|
||||||
|
/******/ }
|
||||||
|
/******/ installedChunks[chunkId] = 0;
|
||||||
|
/******/ }
|
||||||
|
/******/ return __webpack_require__.O(result);
|
||||||
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||||
|
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||||
|
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||||
|
/******/ })();
|
||||||
|
/******/
|
||||||
|
/************************************************************************/
|
||||||
|
/******/
|
||||||
|
/******/ // startup
|
||||||
|
/******/ // Load entry module and return exports
|
||||||
|
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||||
|
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["notice-panel/style-index"], () => (__webpack_require__("./src/notice-panel/index.js")))
|
||||||
|
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||||
|
/******/
|
||||||
|
/******/ })()
|
||||||
|
;
|
||||||
|
//# sourceMappingURL=index.js.map
|
||||||
1
plugins/carhop-blocks/build/notice-panel/index.js.map
Normal file
1
plugins/carhop-blocks/build/notice-panel/index.js.map
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,4 @@
|
||||||
|
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/notice-panel/style.scss ***!
|
||||||
|
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
|
||||||
4
plugins/carhop-blocks/build/notice-panel/style-index.css
Normal file
4
plugins/carhop-blocks/build/notice-panel/style-index.css
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/notice-panel/style.scss ***!
|
||||||
|
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||||
|
|
||||||
1
plugins/carhop-blocks/build/notice-panel/view.asset.php
Normal file
1
plugins/carhop-blocks/build/notice-panel/view.asset.php
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<?php return array('dependencies' => array(), 'version' => 'f6112a737b8c913b4039');
|
||||||
7
plugins/carhop-blocks/build/notice-panel/view.js
Normal file
7
plugins/carhop-blocks/build/notice-panel/view.js
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
/******/ (() => { // webpackBootstrap
|
||||||
|
/*!**********************************!*\
|
||||||
|
!*** ./src/notice-panel/view.js ***!
|
||||||
|
\**********************************/
|
||||||
|
|
||||||
|
/******/ })()
|
||||||
|
;
|
||||||
|
|
@ -9,7 +9,12 @@
|
||||||
"description": "Example block scaffolded with Create Block tool.",
|
"description": "Example block scaffolded with Create Block tool.",
|
||||||
"example": {},
|
"example": {},
|
||||||
"supports": {
|
"supports": {
|
||||||
"html": false
|
"html": false,
|
||||||
|
"border": {
|
||||||
|
"color": true,
|
||||||
|
"style": true,
|
||||||
|
"width": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"textdomain": "carhop-blocks",
|
"textdomain": "carhop-blocks",
|
||||||
"editorScript": "file:./index.js",
|
"editorScript": "file:./index.js",
|
||||||
|
|
@ -65,10 +70,23 @@
|
||||||
"right"
|
"right"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"hasBackgroundColor": {
|
"hasBorder": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false
|
"default": false
|
||||||
},
|
},
|
||||||
|
"blockVariant": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "framed",
|
||||||
|
"enum": [
|
||||||
|
"framed",
|
||||||
|
"backgrounded",
|
||||||
|
"nude"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"borderColor": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "#136f63"
|
||||||
|
},
|
||||||
"backgroundColor": {
|
"backgroundColor": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "#ffffff"
|
"default": "#ffffff"
|
||||||
|
|
@ -88,14 +106,6 @@
|
||||||
"variationA",
|
"variationA",
|
||||||
"variationB"
|
"variationB"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"backgroundOrientation": {
|
|
||||||
"type": "string",
|
|
||||||
"default": "left",
|
|
||||||
"enum": [
|
|
||||||
"left",
|
|
||||||
"right"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"usesContext": [
|
"usesContext": [
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ import {
|
||||||
MediaPlaceholder,
|
MediaPlaceholder,
|
||||||
useSetting,
|
useSetting,
|
||||||
} from "@wordpress/block-editor";
|
} from "@wordpress/block-editor";
|
||||||
|
import shapeA from "./shapeA.jsx";
|
||||||
|
import shapeB from "./shapeB.jsx";
|
||||||
import { lock, trash } from "@wordpress/icons";
|
import { lock, trash } from "@wordpress/icons";
|
||||||
import { ColorPalette } from "@wordpress/components";
|
import { ColorPalette } from "@wordpress/components";
|
||||||
import {
|
import {
|
||||||
|
|
@ -19,6 +21,8 @@ import {
|
||||||
|
|
||||||
import "./editor.scss";
|
import "./editor.scss";
|
||||||
import { isColorLight } from "../../_utilities/utilities";
|
import { isColorLight } from "../../_utilities/utilities";
|
||||||
|
import ShapeA from "./shapeA.jsx";
|
||||||
|
import ShapeB from "./shapeB.jsx";
|
||||||
|
|
||||||
export default function Edit({ attributes, setAttributes, ...props }) {
|
export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
const colors = useSetting("color.palette.theme");
|
const colors = useSetting("color.palette.theme");
|
||||||
|
|
@ -30,12 +34,13 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
coverAlt,
|
coverAlt,
|
||||||
coverId,
|
coverId,
|
||||||
coverSize,
|
coverSize,
|
||||||
hasBackgroundColor,
|
|
||||||
backgroundColor,
|
backgroundColor,
|
||||||
backgroundOrientation,
|
|
||||||
blockWidth,
|
blockWidth,
|
||||||
textColor,
|
textColor,
|
||||||
shapeType,
|
shapeType,
|
||||||
|
blockVariant,
|
||||||
|
borderColor,
|
||||||
} = attributes;
|
} = attributes;
|
||||||
|
|
||||||
function onDispositionChange(disposition) {
|
function onDispositionChange(disposition) {
|
||||||
|
|
@ -61,34 +66,37 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
setAttributes({ backgroundColor: value });
|
setAttributes({ backgroundColor: value });
|
||||||
setHasLightBackground(value);
|
setHasLightBackground(value);
|
||||||
}
|
}
|
||||||
function onHasBackgroundColorChange(value) {
|
|
||||||
setAttributes({ hasBackgroundColor: value });
|
|
||||||
if (!value) {
|
|
||||||
setAttributes({ backgroundColor: null });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function onCoverTypeChange(value) {
|
function onCoverTypeChange(value) {
|
||||||
setAttributes({ coverType: value });
|
setAttributes({ coverType: value });
|
||||||
}
|
}
|
||||||
|
|
||||||
function onBackgroundOrientationChange(value) {
|
function onBlockVariantChange(value) {
|
||||||
setAttributes({ backgroundOrientation: value });
|
setAttributes({ blockVariant: value });
|
||||||
|
|
||||||
|
if (value === "framed" || value === "nude") {
|
||||||
|
setAttributes({ backgroundColor: "#fff" });
|
||||||
|
setAttributes({ hasLightBackground: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setHasLightBackground(backgroundColor) {
|
function setHasLightBackground(backgroundColor) {
|
||||||
if (!backgroundColor) return;
|
if (!backgroundColor) return;
|
||||||
|
|
||||||
const isLightBackgroundColor = isColorLight(backgroundColor);
|
const isLightBackgroundColor = isColorLight(backgroundColor);
|
||||||
console.log(isLightBackgroundColor);
|
|
||||||
setAttributes({ hasLightBackground: isLightBackgroundColor });
|
setAttributes({ hasLightBackground: isLightBackgroundColor });
|
||||||
}
|
}
|
||||||
|
console.log(backgroundColor);
|
||||||
|
console.log(isColorLight(backgroundColor));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<InspectorControls>
|
<InspectorControls>
|
||||||
<PanelBody
|
<PanelBody
|
||||||
className="deligraph-blocks-components-image__panel-body"
|
className="deligraph-blocks-components-image__panel-body"
|
||||||
title={__("Largeur", "deligraph-blocks")}
|
title={__("Aspect & Variante de bloc", "deligraph-blocks")}
|
||||||
>
|
>
|
||||||
|
{/* Largeur du bloc */}
|
||||||
<ToggleGroupControl
|
<ToggleGroupControl
|
||||||
className="deligraph-blocks__variant"
|
className="deligraph-blocks__variant"
|
||||||
isBlock
|
isBlock
|
||||||
|
|
@ -99,10 +107,95 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
<ToggleGroupControlOption label="Contenue" value="contained" />
|
<ToggleGroupControlOption label="Contenue" value="contained" />
|
||||||
<ToggleGroupControlOption label="Pleine largeur" value="full" />
|
<ToggleGroupControlOption label="Pleine largeur" value="full" />
|
||||||
</ToggleGroupControl>
|
</ToggleGroupControl>
|
||||||
|
{/* Modèle de bloc */}
|
||||||
|
<ToggleGroupControl
|
||||||
|
className="deligraph-blocks__variant"
|
||||||
|
isBlock
|
||||||
|
label="Modèle de bloc"
|
||||||
|
onChange={onBlockVariantChange}
|
||||||
|
value={blockVariant}
|
||||||
|
>
|
||||||
|
<ToggleGroupControlOption label="Nu" value="nude" />
|
||||||
|
<ToggleGroupControlOption label="Encadré" value="framed" />
|
||||||
|
<ToggleGroupControlOption
|
||||||
|
label="Fond Coloré"
|
||||||
|
value="backgrounded"
|
||||||
|
/>
|
||||||
|
</ToggleGroupControl>
|
||||||
|
{/* Disposition */}
|
||||||
|
<ToggleGroupControl
|
||||||
|
className="deligraph-blocks__variant"
|
||||||
|
isBlock
|
||||||
|
label="Disposition"
|
||||||
|
onChange={onDispositionChange}
|
||||||
|
value={disposition}
|
||||||
|
>
|
||||||
|
<ToggleGroupControlOption label="Gauche" value="left" />
|
||||||
|
<ToggleGroupControlOption label="Droite" value="right" />
|
||||||
|
</ToggleGroupControl>
|
||||||
</PanelBody>
|
</PanelBody>
|
||||||
|
|
||||||
|
{blockVariant === "backgrounded" && (
|
||||||
|
<PanelBody
|
||||||
|
className="deligraph-blocks-components-image__panel-body"
|
||||||
|
title={__("Arrière plan", "deligraph-blocks")}
|
||||||
|
>
|
||||||
|
<ToggleGroupControl
|
||||||
|
className="deligraph-blocks__variant"
|
||||||
|
isBlock
|
||||||
|
label="Type de forme"
|
||||||
|
onChange={(value) => setAttributes({ shapeType: value })}
|
||||||
|
value={shapeType}
|
||||||
|
>
|
||||||
|
<ToggleGroupControlOption
|
||||||
|
label="Variation A"
|
||||||
|
value="variationA"
|
||||||
|
/>
|
||||||
|
<ToggleGroupControlOption
|
||||||
|
label="Variation B"
|
||||||
|
value="variationB"
|
||||||
|
/>
|
||||||
|
</ToggleGroupControl>
|
||||||
|
<ColorPalette
|
||||||
|
colors={colors}
|
||||||
|
value={backgroundColor}
|
||||||
|
onChange={onBackgroundColorChange}
|
||||||
|
/>
|
||||||
|
</PanelBody>
|
||||||
|
)}
|
||||||
|
{blockVariant === "framed" && (
|
||||||
|
<PanelBody
|
||||||
|
className="deligraph-blocks-components-image__panel-body"
|
||||||
|
title={__("Bordure", "deligraph-blocks")}
|
||||||
|
>
|
||||||
|
<ToggleGroupControl
|
||||||
|
className="deligraph-blocks__variant"
|
||||||
|
isBlock
|
||||||
|
label="Type de forme"
|
||||||
|
onChange={(value) => setAttributes({ shapeType: value })}
|
||||||
|
value={shapeType}
|
||||||
|
>
|
||||||
|
<ToggleGroupControlOption
|
||||||
|
label="Variation A"
|
||||||
|
value="variationA"
|
||||||
|
/>
|
||||||
|
<ToggleGroupControlOption
|
||||||
|
label="Variation B"
|
||||||
|
value="variationB"
|
||||||
|
/>
|
||||||
|
</ToggleGroupControl>
|
||||||
|
<ColorPalette
|
||||||
|
colors={colors}
|
||||||
|
value={borderColor}
|
||||||
|
onChange={(value) => setAttributes({ borderColor: value })}
|
||||||
|
/>
|
||||||
|
</PanelBody>
|
||||||
|
)}
|
||||||
|
|
||||||
<PanelBody
|
<PanelBody
|
||||||
className="deligraph-blocks-components-image__panel-body"
|
className="deligraph-blocks-components-image__panel-body"
|
||||||
title={__("Image d'accompagnement", "deligraph-blocks")}
|
title={__("Image d'accompagnement", "deligraph-blocks")}
|
||||||
|
initialOpen={false}
|
||||||
>
|
>
|
||||||
{coverUrl && <img src={coverUrl} alt={coverAlt} />}
|
{coverUrl && <img src={coverUrl} alt={coverAlt} />}
|
||||||
<div className="media-replace-container">
|
<div className="media-replace-container">
|
||||||
|
|
@ -141,16 +234,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
<ToggleGroupControlOption label="Classique" value="classic" />
|
<ToggleGroupControlOption label="Classique" value="classic" />
|
||||||
<ToggleGroupControlOption label="Encadrée" value="photoframe" />
|
<ToggleGroupControlOption label="Encadrée" value="photoframe" />
|
||||||
</ToggleGroupControl>
|
</ToggleGroupControl>
|
||||||
<ToggleGroupControl
|
|
||||||
className="deligraph-blocks__variant"
|
|
||||||
isBlock
|
|
||||||
label="Disposition"
|
|
||||||
onChange={onDispositionChange}
|
|
||||||
value={disposition}
|
|
||||||
>
|
|
||||||
<ToggleGroupControlOption label="Gauche" value="left" />
|
|
||||||
<ToggleGroupControlOption label="Droite" value="right" />
|
|
||||||
</ToggleGroupControl>
|
|
||||||
<ToggleGroupControl
|
<ToggleGroupControl
|
||||||
className="deligraph-blocks__variant"
|
className="deligraph-blocks__variant"
|
||||||
isBlock
|
isBlock
|
||||||
|
|
@ -165,45 +249,10 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
</ToggleGroupControl>
|
</ToggleGroupControl>
|
||||||
</PanelBody>
|
</PanelBody>
|
||||||
|
|
||||||
<PanelBody
|
|
||||||
className="deligraph-blocks-components-image__panel-body"
|
|
||||||
title={__("Arrière plan", "deligraph-blocks")}
|
|
||||||
>
|
|
||||||
<CheckboxControl
|
|
||||||
label="Arrière plan coloré"
|
|
||||||
checked={hasBackgroundColor}
|
|
||||||
onChange={onHasBackgroundColorChange}
|
|
||||||
/>
|
|
||||||
{hasBackgroundColor && (
|
|
||||||
<>
|
|
||||||
<ToggleGroupControl
|
|
||||||
className="deligraph-blocks__variant"
|
|
||||||
isBlock
|
|
||||||
label="Type de forme"
|
|
||||||
onChange={(value) => setAttributes({ shapeType: value })}
|
|
||||||
value={shapeType}
|
|
||||||
>
|
|
||||||
<ToggleGroupControlOption
|
|
||||||
label="Variation A"
|
|
||||||
value="variationA"
|
|
||||||
/>
|
|
||||||
<ToggleGroupControlOption
|
|
||||||
label="Variation B"
|
|
||||||
value="variationB"
|
|
||||||
/>
|
|
||||||
</ToggleGroupControl>
|
|
||||||
<ColorPalette
|
|
||||||
colors={colors}
|
|
||||||
value={backgroundColor}
|
|
||||||
onChange={onBackgroundColorChange}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</PanelBody>
|
|
||||||
|
|
||||||
<PanelBody
|
<PanelBody
|
||||||
className="deligraph-blocks-components-image__panel-body"
|
className="deligraph-blocks-components-image__panel-body"
|
||||||
title={__("Couleur du texte", "deligraph-blocks")}
|
title={__("Couleur du texte", "deligraph-blocks")}
|
||||||
|
initialOpen={false}
|
||||||
>
|
>
|
||||||
<ColorPalette
|
<ColorPalette
|
||||||
colors={colors}
|
colors={colors}
|
||||||
|
|
@ -214,62 +263,47 @@ export default function Edit({ attributes, setAttributes, ...props }) {
|
||||||
</InspectorControls>
|
</InspectorControls>
|
||||||
<section
|
<section
|
||||||
{...useBlockProps({
|
{...useBlockProps({
|
||||||
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition}
|
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} chapter-section--${blockVariant}
|
||||||
${
|
${
|
||||||
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"
|
hasLightBackground
|
||||||
: ""
|
? "chapter-section--bg-light"
|
||||||
}
|
: "chapter-section--bg-dark"
|
||||||
${
|
}`,
|
||||||
hasLightBackground
|
|
||||||
? "chapter-section--bg-light"
|
|
||||||
: "chapter-section--bg-dark"
|
|
||||||
}`,
|
|
||||||
|
|
||||||
style: {
|
style: {
|
||||||
"--chapter-section-text-color": textColor ? textColor : "#136f63",
|
"--chapter-section-text-color": textColor ? textColor : "#136f63",
|
||||||
|
"--cta-current-color":
|
||||||
|
blockVariant === "backgrounded"
|
||||||
|
? "inherit"
|
||||||
|
: "var(--wp--preset--color--primary) !important",
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{hasBackgroundColor &&
|
{blockVariant === "backgrounded" &&
|
||||||
backgroundColor &&
|
backgroundColor &&
|
||||||
shapeType === "variationA" && (
|
shapeType === "variationA" && (
|
||||||
<>
|
<ShapeA backgroundColor={backgroundColor} borderColor={"none"} />
|
||||||
<svg
|
|
||||||
width="1440"
|
|
||||||
height="744"
|
|
||||||
viewBox="0 0 1440 744"
|
|
||||||
fill="none"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
|
|
||||||
preserveAspectRatio="none"
|
|
||||||
>
|
|
||||||
<path d="M0 0H1440V686.701L0 744V0Z" fill={backgroundColor} />
|
|
||||||
</svg>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
{hasBackgroundColor &&
|
{blockVariant === "backgrounded" &&
|
||||||
backgroundColor &&
|
backgroundColor &&
|
||||||
shapeType === "variationB" && (
|
shapeType === "variationB" && (
|
||||||
<>
|
<ShapeB backgroundColor={backgroundColor} borderColor={"none"} />
|
||||||
<svg
|
)}
|
||||||
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
|
{blockVariant === "framed" &&
|
||||||
width="1302"
|
backgroundColor &&
|
||||||
height="654"
|
shapeType === "variationA" && (
|
||||||
viewBox="0 0 1302 654"
|
<ShapeA backgroundColor={"none"} borderColor={borderColor} />
|
||||||
preserveAspectRatio="none"
|
)}
|
||||||
>
|
{blockVariant === "framed" &&
|
||||||
<path
|
backgroundColor &&
|
||||||
d="M1302 0L0 15.8281V654L1302 642.633L1302 0Z"
|
shapeType === "variationB" && (
|
||||||
fill={backgroundColor}
|
<ShapeB backgroundColor={"none"} borderColor={borderColor} />
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
<div className="chapter-section__content">
|
<div className="chapter-section__content">
|
||||||
<div className="chapter-section__innerblocks">
|
<div className="chapter-section__innerblocks">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
|
import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
|
||||||
|
import ShapeA from "./shapeA.jsx";
|
||||||
|
import ShapeB from "./shapeB.jsx";
|
||||||
export default function save({ attributes }) {
|
export default function save({ attributes }) {
|
||||||
const {
|
const {
|
||||||
hasLightBackground,
|
hasLightBackground,
|
||||||
|
|
@ -8,64 +10,57 @@ export default function save({ attributes }) {
|
||||||
coverSize,
|
coverSize,
|
||||||
coverType,
|
coverType,
|
||||||
backgroundColor,
|
backgroundColor,
|
||||||
hasBackgroundColor,
|
|
||||||
backgroundOrientation,
|
|
||||||
blockWidth,
|
blockWidth,
|
||||||
textColor,
|
textColor,
|
||||||
shapeType,
|
shapeType,
|
||||||
|
blockVariant,
|
||||||
|
borderColor,
|
||||||
} = 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} chapter-section--${blockVariant}
|
||||||
${
|
${
|
||||||
blockWidth === "full"
|
blockWidth === "full"
|
||||||
? "chapter-section--width-full"
|
? "chapter-section--width-full"
|
||||||
: "chapter-section--width-contained"
|
: "chapter-section--width-contained"
|
||||||
}
|
}
|
||||||
${hasLightBackground ? "chapter-section--bg-light" : "chapter-section--bg-dark"}
|
|
||||||
${
|
${
|
||||||
hasBackgroundColor && backgroundColor
|
hasLightBackground
|
||||||
? "chapter-section--has-background"
|
? "chapter-section--bg-light"
|
||||||
: ""
|
: "chapter-section--bg-dark"
|
||||||
}`,
|
}`,
|
||||||
style: {
|
style: {
|
||||||
"--chapter-section-text-color": textColor ? textColor : "#136f63",
|
"--chapter-section-text-color": textColor ? textColor : "#136f63",
|
||||||
|
"--cta-current-color":
|
||||||
|
blockVariant === "backgrounded"
|
||||||
|
? "inherit"
|
||||||
|
: "var(--wp--preset--color--primary) !important",
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{hasBackgroundColor && backgroundColor && shapeType === "variationA" && (
|
{blockVariant === "backgrounded" &&
|
||||||
<>
|
backgroundColor &&
|
||||||
<svg
|
shapeType === "variationA" && (
|
||||||
width="1440"
|
<ShapeA backgroundColor={backgroundColor} borderColor={"none"} />
|
||||||
height="744"
|
)}
|
||||||
viewBox="0 0 1440 744"
|
{blockVariant === "backgrounded" &&
|
||||||
fill="none"
|
backgroundColor &&
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
shapeType === "variationB" && (
|
||||||
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
|
<ShapeB backgroundColor={backgroundColor} borderColor={"none"} />
|
||||||
preserveAspectRatio="none"
|
)}
|
||||||
>
|
{blockVariant === "framed" &&
|
||||||
<path d="M0 0H1440V686.701L0 744V0Z" fill={backgroundColor} />
|
backgroundColor &&
|
||||||
</svg>
|
shapeType === "variationA" && (
|
||||||
</>
|
<ShapeA backgroundColor={"none"} borderColor={borderColor} />
|
||||||
)}
|
)}
|
||||||
{hasBackgroundColor && backgroundColor && shapeType === "variationB" && (
|
{blockVariant === "framed" &&
|
||||||
<>
|
backgroundColor &&
|
||||||
<svg
|
shapeType === "variationB" && (
|
||||||
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
|
<ShapeB backgroundColor={"none"} borderColor={borderColor} />
|
||||||
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__content">
|
||||||
<div className="chapter-section__innerblocks">
|
<div className="chapter-section__innerblocks">
|
||||||
|
|
|
||||||
32
plugins/carhop-blocks/src/chapter-section/shapeA.jsx
Normal file
32
plugins/carhop-blocks/src/chapter-section/shapeA.jsx
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default function ShapeA({
|
||||||
|
backgroundOrientation,
|
||||||
|
backgroundColor,
|
||||||
|
borderColor,
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<svg
|
||||||
|
width="1440"
|
||||||
|
height="744"
|
||||||
|
viewBox="0 0 1440 744"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
|
||||||
|
preserveAspectRatio="none"
|
||||||
|
vectorEffect="non-scaling-stroke"
|
||||||
|
overflow="visible"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M0 0H1440V686.701L0 744V0Z"
|
||||||
|
fill={backgroundColor}
|
||||||
|
stroke={borderColor}
|
||||||
|
strokeWidth={borderColor ? "2px" : "0"}
|
||||||
|
style={{
|
||||||
|
strokeLinejoin: "round",
|
||||||
|
vectorEffect: "non-scaling-stroke",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
||||||
30
plugins/carhop-blocks/src/chapter-section/shapeB.jsx
Normal file
30
plugins/carhop-blocks/src/chapter-section/shapeB.jsx
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default function ShapeB({
|
||||||
|
backgroundOrientation,
|
||||||
|
backgroundColor,
|
||||||
|
borderColor,
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<svg
|
||||||
|
className={`chapter-section__background chapter-section__background--${backgroundOrientation}`}
|
||||||
|
width="1302"
|
||||||
|
height="654"
|
||||||
|
viewBox="0 0 1302 654"
|
||||||
|
preserveAspectRatio="none"
|
||||||
|
vectorEffect="non-scaling-stroke"
|
||||||
|
overflow="visible"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M1302 0L0 15.8281V654L1302 642.633L1302 0Z"
|
||||||
|
fill={backgroundColor}
|
||||||
|
stroke={borderColor}
|
||||||
|
strokeWidth={borderColor ? "2px" : "0"}
|
||||||
|
style={{
|
||||||
|
strokeLinejoin: "round",
|
||||||
|
vectorEffect: "non-scaling-stroke",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
||||||
19
plugins/carhop-blocks/src/notice-panel/block.json
Normal file
19
plugins/carhop-blocks/src/notice-panel/block.json
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||||
|
"apiVersion": 3,
|
||||||
|
"name": "carhop-blocks/notice-panel",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"title": "Encart d'information",
|
||||||
|
"category": "carhop-blocks",
|
||||||
|
"icon": "smiley",
|
||||||
|
"description": "Encart d'information pour la mise en avant d'éléments informatifs",
|
||||||
|
"example": {},
|
||||||
|
"supports": {
|
||||||
|
"html": false
|
||||||
|
},
|
||||||
|
"textdomain": "carhop-blocks",
|
||||||
|
"editorScript": "file:./index.js",
|
||||||
|
"editorStyle": "file:./index.css",
|
||||||
|
"style": "file:./style-index.css",
|
||||||
|
"viewScript": "file:./view.js"
|
||||||
|
}
|
||||||
26
plugins/carhop-blocks/src/notice-panel/edit.js
Normal file
26
plugins/carhop-blocks/src/notice-panel/edit.js
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
import { __ } from "@wordpress/i18n";
|
||||||
|
import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
|
||||||
|
import "./editor.scss";
|
||||||
|
|
||||||
|
export default function Edit({ attributes, setAttributes }) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div
|
||||||
|
{...useBlockProps({
|
||||||
|
className: "notice-panel",
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<div className="notice-panel__content">
|
||||||
|
<div className="icon"></div>
|
||||||
|
<div className="innerblocks">
|
||||||
|
<InnerBlocks
|
||||||
|
template={[
|
||||||
|
["core/paragraph", { placeholder: "Ajouter ici le texte" }],
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
0
plugins/carhop-blocks/src/notice-panel/editor.scss
Normal file
0
plugins/carhop-blocks/src/notice-panel/editor.scss
Normal file
18
plugins/carhop-blocks/src/notice-panel/index.js
Normal file
18
plugins/carhop-blocks/src/notice-panel/index.js
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
import { registerBlockType } from "@wordpress/blocks";
|
||||||
|
import "./style.scss";
|
||||||
|
|
||||||
|
import Edit from "./edit";
|
||||||
|
import save from "./save";
|
||||||
|
import metadata from "./block.json";
|
||||||
|
|
||||||
|
registerBlockType(metadata.name, {
|
||||||
|
icon: {
|
||||||
|
src: (
|
||||||
|
<svg width="32" height="32" viewBox="0 0 32 32">
|
||||||
|
<path d="M16 24L8 16L16 8L24 16L16 24Z" />
|
||||||
|
</svg>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
edit: Edit,
|
||||||
|
save,
|
||||||
|
});
|
||||||
21
plugins/carhop-blocks/src/notice-panel/save.js
Normal file
21
plugins/carhop-blocks/src/notice-panel/save.js
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import { useBlockProps } from "@wordpress/block-editor";
|
||||||
|
import { RichText } from "@wordpress/block-editor";
|
||||||
|
import { InnerBlocks } from "@wordpress/block-editor";
|
||||||
|
|
||||||
|
export default function save({ attributes }) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
{...useBlockProps.save({
|
||||||
|
className: "notice-panel",
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<div className="notice-panel__content">
|
||||||
|
<div className="icon"></div>
|
||||||
|
|
||||||
|
<div className="innerblocks">
|
||||||
|
<InnerBlocks.Content />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
0
plugins/carhop-blocks/src/notice-panel/style.scss
Normal file
0
plugins/carhop-blocks/src/notice-panel/style.scss
Normal file
0
plugins/carhop-blocks/src/notice-panel/view.js
Normal file
0
plugins/carhop-blocks/src/notice-panel/view.js
Normal file
|
|
@ -67,3 +67,10 @@ body {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!*********************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/uppercase/uppercase.css ***!
|
||||||
|
\*********************************************************************************************************************************************************************************/
|
||||||
|
.uppercase {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-rich-text'), 'version' => '2e5a48f579e7d22e1117');
|
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-rich-text'), 'version' => 'f02e9424e6fc43485fc9');
|
||||||
|
|
|
||||||
|
|
@ -67,5 +67,12 @@ body {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!*********************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/uppercase/uppercase.css ***!
|
||||||
|
\*********************************************************************************************************************************************************************************/
|
||||||
|
.uppercase {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*# sourceMappingURL=index.css.map*/
|
/*# sourceMappingURL=index.css.map*/
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"index.css","mappings":";;;AAAA;CACC,6BAA6B;AAC9B;AACA;CACC,iCAAiC;CACjC,kBAAkB;CAClB,YAAY;;CAEZ;EACC,mDAAmD;EACnD,WAAW;EACX,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,gCAAgC;EAChC,oBAAoB;EACpB,uBAAuB;EACvB,mBAAmB;EACnB,0BAA0B;EAC1B,gBAAgB;EAChB,gBAAgB;EAChB,iBAAiB;CAClB;AACD;;AAEA;;CAEC;EACC,0BAA0B;EAC1B,6BAA6B;EAC7B,wDAAwD;EACxD,8BAA8B;EAC9B,0BAA0B;CAC3B;AACD;;AAEA;CACC;EACC,wBAAwB;EACxB,gBAAgB;CACjB;CACA;EACC,aAAa;EACb,yBAAyB;EACzB,SAAS;EACT,gBAAgB;;EAEhB;GACC,oCAAoC;GACpC,sBAAsB;EACvB;;EAEA;GACC,8DAA8D;GAC9D,sBAAsB;EACvB;CACD;AACD;;;;;ACzDA;CACC,yBAAyB;AAC1B","sources":["webpack:///./src/footnotes/footnote.css","webpack:///./src/uppercased-small-title/uppercased-small-title.css"],"sourcesContent":["body {\r\n\tcounter-reset: footnote-index;\r\n}\r\n.footnote-reference {\r\n\tcounter-increment: footnote-index;\r\n\tposition: relative;\r\n\tcolor: unset;\r\n\r\n\t&::after {\r\n\t\tbackground-color: var(--wp--preset--color--primary);\r\n\t\tcolor: #fff;\r\n\t\twidth: 22px;\r\n\t\theight: 22px;\r\n\t\tborder-radius: 50%;\r\n\t\tcontent: counter(footnote-index);\r\n\t\tdisplay: inline-flex;\r\n\t\tjustify-content: center;\r\n\t\talign-items: center;\r\n\t\tfont-size: 11px !important;\r\n\t\tfont-weight: 600;\r\n\t\tmargin-left: 0px;\r\n\t\tmargin-right: 3px;\r\n\t}\r\n}\r\n\r\n// Editor\r\n.footnote-reference {\r\n\t.wp-block-post-content & {\r\n\t\ttext-decoration: underline;\r\n\t\ttext-decoration-style: dotted;\r\n\t\ttext-decoration-color: var(--wp--preset--color--primary);\r\n\t\ttext-decoration-thickness: 2px;\r\n\t\ttext-underline-offset: 2px;\r\n\t}\r\n}\r\n\r\n.popover_footnote_field {\r\n\t.components-popover__content {\r\n\t\tpadding: 10px !important;\r\n\t\tmin-width: 500px;\r\n\t}\r\n\t.popover_footnote_field_buttons {\r\n\t\tdisplay: flex;\r\n\t\tjustify-content: flex-end;\r\n\t\tgap: 10px;\r\n\t\tmargin-top: 10px;\r\n\r\n\t\tbutton.is-destructive {\r\n\t\t\tbackground-color: #cc1818 !important;\r\n\t\t\tcolor: #fff !important;\r\n\t\t}\r\n\r\n\t\tbutton.is-primary {\r\n\t\t\tbackground-color: var(--wp--preset--color--primary) !important;\r\n\t\t\tcolor: #fff !important;\r\n\t\t}\r\n\t}\r\n}\r\n",".uppercased-small-title {\r\n\ttext-transform: uppercase;\r\n}\r\n"],"names":[],"sourceRoot":""}
|
{"version":3,"file":"index.css","mappings":";;;AAAA;CACC,6BAA6B;AAC9B;AACA;CACC,iCAAiC;CACjC,kBAAkB;CAClB,YAAY;;CAEZ;EACC,mDAAmD;EACnD,WAAW;EACX,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,gCAAgC;EAChC,oBAAoB;EACpB,uBAAuB;EACvB,mBAAmB;EACnB,0BAA0B;EAC1B,gBAAgB;EAChB,gBAAgB;EAChB,iBAAiB;CAClB;AACD;;AAEA;;CAEC;EACC,0BAA0B;EAC1B,6BAA6B;EAC7B,wDAAwD;EACxD,8BAA8B;EAC9B,0BAA0B;CAC3B;AACD;;AAEA;CACC;EACC,wBAAwB;EACxB,gBAAgB;CACjB;CACA;EACC,aAAa;EACb,yBAAyB;EACzB,SAAS;EACT,gBAAgB;;EAEhB;GACC,oCAAoC;GACpC,sBAAsB;EACvB;;EAEA;GACC,8DAA8D;GAC9D,sBAAsB;EACvB;CACD;AACD;;;;;ACzDA;CACC,yBAAyB;AAC1B;;;;;ACFA;CACC,yBAAyB;AAC1B","sources":["webpack:///./src/footnotes/footnote.css","webpack:///./src/uppercased-small-title/uppercased-small-title.css","webpack:///./src/uppercase/uppercase.css"],"sourcesContent":["body {\r\n\tcounter-reset: footnote-index;\r\n}\r\n.footnote-reference {\r\n\tcounter-increment: footnote-index;\r\n\tposition: relative;\r\n\tcolor: unset;\r\n\r\n\t&::after {\r\n\t\tbackground-color: var(--wp--preset--color--primary);\r\n\t\tcolor: #fff;\r\n\t\twidth: 22px;\r\n\t\theight: 22px;\r\n\t\tborder-radius: 50%;\r\n\t\tcontent: counter(footnote-index);\r\n\t\tdisplay: inline-flex;\r\n\t\tjustify-content: center;\r\n\t\talign-items: center;\r\n\t\tfont-size: 11px !important;\r\n\t\tfont-weight: 600;\r\n\t\tmargin-left: 0px;\r\n\t\tmargin-right: 3px;\r\n\t}\r\n}\r\n\r\n// Editor\r\n.footnote-reference {\r\n\t.wp-block-post-content & {\r\n\t\ttext-decoration: underline;\r\n\t\ttext-decoration-style: dotted;\r\n\t\ttext-decoration-color: var(--wp--preset--color--primary);\r\n\t\ttext-decoration-thickness: 2px;\r\n\t\ttext-underline-offset: 2px;\r\n\t}\r\n}\r\n\r\n.popover_footnote_field {\r\n\t.components-popover__content {\r\n\t\tpadding: 10px !important;\r\n\t\tmin-width: 500px;\r\n\t}\r\n\t.popover_footnote_field_buttons {\r\n\t\tdisplay: flex;\r\n\t\tjustify-content: flex-end;\r\n\t\tgap: 10px;\r\n\t\tmargin-top: 10px;\r\n\r\n\t\tbutton.is-destructive {\r\n\t\t\tbackground-color: #cc1818 !important;\r\n\t\t\tcolor: #fff !important;\r\n\t\t}\r\n\r\n\t\tbutton.is-primary {\r\n\t\t\tbackground-color: var(--wp--preset--color--primary) !important;\r\n\t\t\tcolor: #fff !important;\r\n\t\t}\r\n\t}\r\n}\r\n",".uppercased-small-title {\r\n\ttext-transform: uppercase;\r\n}\r\n",".uppercase {\r\n\ttext-transform: uppercase;\r\n}\r\n"],"names":[],"sourceRoot":""}
|
||||||
|
|
@ -244,6 +244,79 @@ const FootnoteFormatButton = props => {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/uppercase/uppercase.css":
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** ./src/uppercase/uppercase.css ***!
|
||||||
|
\*************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
// extracted by mini-css-extract-plugin
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/uppercase/uppercase.js":
|
||||||
|
/*!************************************!*\
|
||||||
|
!*** ./src/uppercase/uppercase.js ***!
|
||||||
|
\************************************/
|
||||||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||||
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/rich-text */ "@wordpress/rich-text");
|
||||||
|
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__);
|
||||||
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||||
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
|
||||||
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||||
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
|
||||||
|
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/text-color.js");
|
||||||
|
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||||
|
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
|
||||||
|
/* harmony import */ var _uppercase_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./uppercase.css */ "./src/uppercase/uppercase.css");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||||
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const formatName = "carhop-format/uppercase";
|
||||||
|
const UppercaseFormatButton = props => {
|
||||||
|
const {
|
||||||
|
isActive,
|
||||||
|
value,
|
||||||
|
onChange
|
||||||
|
} = props;
|
||||||
|
function toggleUppercasedSmallTitle() {
|
||||||
|
onChange((0,_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__.toggleFormat)(value, {
|
||||||
|
type: formatName
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.BlockControls, {
|
||||||
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToolbarGroup, {
|
||||||
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToolbarButton, {
|
||||||
|
isActive: isActive,
|
||||||
|
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__["default"],
|
||||||
|
title: !isActive ? "Majuscules" : "Retirer Majuscules",
|
||||||
|
onClick: toggleUppercasedSmallTitle
|
||||||
|
})
|
||||||
|
})
|
||||||
|
});
|
||||||
|
};
|
||||||
|
(0,_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__.registerFormatType)(formatName, {
|
||||||
|
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Petit titre en majuscules", "carhop-format-types"),
|
||||||
|
tagName: "span",
|
||||||
|
className: "uppercase",
|
||||||
|
edit: UppercaseFormatButton
|
||||||
|
});
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/uppercased-small-title/uppercased-small-title.css":
|
/***/ "./src/uppercased-small-title/uppercased-small-title.css":
|
||||||
/*!***************************************************************!*\
|
/*!***************************************************************!*\
|
||||||
!*** ./src/uppercased-small-title/uppercased-small-title.css ***!
|
!*** ./src/uppercased-small-title/uppercased-small-title.css ***!
|
||||||
|
|
@ -485,6 +558,7 @@ var __webpack_exports__ = {};
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _footnotes_footnote_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./footnotes/footnote.js */ "./src/footnotes/footnote.js");
|
/* harmony import */ var _footnotes_footnote_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./footnotes/footnote.js */ "./src/footnotes/footnote.js");
|
||||||
/* harmony import */ var _uppercased_small_title_uppercased_small_title_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uppercased-small-title/uppercased-small-title.js */ "./src/uppercased-small-title/uppercased-small-title.js");
|
/* harmony import */ var _uppercased_small_title_uppercased_small_title_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uppercased-small-title/uppercased-small-title.js */ "./src/uppercased-small-title/uppercased-small-title.js");
|
||||||
|
/* harmony import */ var _uppercase_uppercase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./uppercase/uppercase.js */ "./src/uppercase/uppercase.js");
|
||||||
/**
|
/**
|
||||||
* Carhop Format Types
|
* Carhop Format Types
|
||||||
*
|
*
|
||||||
|
|
@ -494,6 +568,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
// Import all format types
|
// Import all format types
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
/******/ })()
|
/******/ })()
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -7,3 +7,4 @@
|
||||||
// Import all format types
|
// Import all format types
|
||||||
import "./footnotes/footnote.js";
|
import "./footnotes/footnote.js";
|
||||||
import "./uppercased-small-title/uppercased-small-title.js";
|
import "./uppercased-small-title/uppercased-small-title.js";
|
||||||
|
import "./uppercase/uppercase.js";
|
||||||
|
|
|
||||||
3
plugins/carhop-format-types/src/uppercase/uppercase.css
Normal file
3
plugins/carhop-format-types/src/uppercase/uppercase.css
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
.uppercase {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
44
plugins/carhop-format-types/src/uppercase/uppercase.js
Normal file
44
plugins/carhop-format-types/src/uppercase/uppercase.js
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
import { __ } from "@wordpress/i18n";
|
||||||
|
import { registerFormatType, toggleFormat } from "@wordpress/rich-text";
|
||||||
|
|
||||||
|
import { RichTextToolbarButton, BlockControls } from "@wordpress/block-editor";
|
||||||
|
import { ToolbarGroup, ToolbarButton } from "@wordpress/components";
|
||||||
|
|
||||||
|
import { textColor } from "@wordpress/icons";
|
||||||
|
import { useSelect } from "@wordpress/data";
|
||||||
|
|
||||||
|
import "./uppercase.css";
|
||||||
|
|
||||||
|
const formatName = "carhop-format/uppercase";
|
||||||
|
|
||||||
|
const UppercaseFormatButton = (props) => {
|
||||||
|
const { isActive, value, onChange } = props;
|
||||||
|
|
||||||
|
function toggleUppercasedSmallTitle() {
|
||||||
|
onChange(
|
||||||
|
toggleFormat(value, {
|
||||||
|
type: formatName,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<BlockControls>
|
||||||
|
<ToolbarGroup>
|
||||||
|
<ToolbarButton
|
||||||
|
isActive={isActive}
|
||||||
|
icon={textColor}
|
||||||
|
title={!isActive ? "Majuscules" : "Retirer Majuscules"}
|
||||||
|
onClick={toggleUppercasedSmallTitle}
|
||||||
|
/>
|
||||||
|
</ToolbarGroup>
|
||||||
|
</BlockControls>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
registerFormatType(formatName, {
|
||||||
|
title: __("Petit titre en majuscules", "carhop-format-types"),
|
||||||
|
tagName: "span",
|
||||||
|
className: "uppercase",
|
||||||
|
edit: UppercaseFormatButton,
|
||||||
|
});
|
||||||
|
|
@ -53,6 +53,17 @@ $authors = get_posts(array(
|
||||||
$author_description = get_field('description', $author->ID);
|
$author_description = get_field('description', $author->ID);
|
||||||
$author_email = get_field('email', $author->ID);
|
$author_email = get_field('email', $author->ID);
|
||||||
|
|
||||||
|
$is_carhop_member = get_field('is_carhop_member', $author->ID);
|
||||||
|
$carhop_member_id = get_field('carhop_member', $author->ID);
|
||||||
|
|
||||||
|
if ($is_carhop_member && isset($carhop_member_id)) {
|
||||||
|
switch_to_blog(1);
|
||||||
|
$author_description = get_field('description', $carhop_member_id);
|
||||||
|
$author_email = get_field('email', $carhop_member_id);
|
||||||
|
$comity = get_field('comity', $carhop_member_id);
|
||||||
|
restore_current_blog();
|
||||||
|
}
|
||||||
|
|
||||||
$is_director = $author->ID === 476 ? true : false;
|
$is_director = $author->ID === 476 ? true : false;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
@ -64,7 +75,7 @@ $authors = get_posts(array(
|
||||||
</a>
|
</a>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<a href="<?php echo get_the_permalink($author->ID); ?>">
|
<a href="<?php echo get_the_permalink($author->ID); ?>">
|
||||||
<div class="author-card__profile-picture-placeholder lol author-card__profile-picture-placeholder--<?php echo $placeholder_thumbnail_counter % 3 + 1; ?>n">
|
<div class="author-card__profile-picture-placeholder author-card__profile-picture-placeholder--<?php echo $placeholder_thumbnail_counter % 3 + 1; ?>n">
|
||||||
<!-- <img class="" src="<?php echo get_template_directory_uri(); ?>/assets/images/placeholder-author.png" alt="Placeholder author"> -->
|
<!-- <img class="" src="<?php echo get_template_directory_uri(); ?>/assets/images/placeholder-author.png" alt="Placeholder author"> -->
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$displayType = $attributes['displayType'] ?? 'grid';
|
$displayType = $attributes['displayType'] ?? 'grid';
|
||||||
|
$variantLocation = $attributes['variantLocation'] ?? 'carhop';
|
||||||
|
|
||||||
$current_blog_id = get_current_blog_id();
|
$current_blog_id = get_current_blog_id();
|
||||||
switch_to_blog(2);
|
switch_to_blog(2);
|
||||||
|
|
@ -22,7 +23,7 @@ $issue_related_articles = get_field('articles', $last_issue->ID);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<section class="block-dernieres-dynamiques content-section ">
|
<section class="block-dernieres-dynamiques content-section block-dernieres-dynamiques--<?php echo $variantLocation; ?>">
|
||||||
<div class="block-dernieres-dynamiques__inner">
|
<div class="block-dernieres-dynamiques__inner">
|
||||||
<div class="block-dernieres-dynamiques__header">
|
<div class="block-dernieres-dynamiques__header">
|
||||||
<h2 class="block-title">
|
<h2 class="block-title">
|
||||||
|
|
@ -43,7 +44,7 @@ $issue_related_articles = get_field('articles', $last_issue->ID);
|
||||||
|
|
||||||
<div class="content-meta">
|
<div class="content-meta">
|
||||||
<span class="content-meta__type content-meta__type--revue">Revue</span>
|
<span class="content-meta__type content-meta__type--revue">Revue</span>
|
||||||
<p class="content-meta__revue-issue content-meta__revue-issue--white">
|
<p class="content-meta__revue-issue <?php echo $variantLocation === 'carhop' ? 'content-meta__revue-issue--green' : 'content-meta__revue-issue--white'; ?>">
|
||||||
<span class="revue-issue-number revue-meta__label sr-only">Numéro</span>
|
<span class="revue-issue-number revue-meta__label sr-only">Numéro</span>
|
||||||
<?php echo $issueNumber; ?>
|
<?php echo $issueNumber; ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -17,5 +17,5 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@wordpress/scripts": "^30.15.0"
|
"@wordpress/scripts": "^30.15.0"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39"
|
"packageManager": "pnpm@10.22.0+sha512.bf049efe995b28f527fd2b41ae0474ce29186f7edcb3bf545087bd61fbbebb2bf75362d1307fda09c2d288e1e499787ac12d4fcb617a974718a6051f2eee741c"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$displayType = $attributes['displayType'] ?? 'grid';
|
$displayType = $attributes['displayType'] ?? 'grid';
|
||||||
|
$variantLocation = $attributes['variantLocation'] ?? 'carhop';
|
||||||
|
|
||||||
$current_blog_id = get_current_blog_id();
|
$current_blog_id = get_current_blog_id();
|
||||||
switch_to_blog(2);
|
switch_to_blog(2);
|
||||||
|
|
@ -22,7 +23,7 @@ $issue_related_articles = get_field('articles', $last_issue->ID);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<section class="block-dernieres-dynamiques content-section ">
|
<section class="block-dernieres-dynamiques content-section block-dernieres-dynamiques--<?php echo $variantLocation; ?>">
|
||||||
<div class="block-dernieres-dynamiques__inner">
|
<div class="block-dernieres-dynamiques__inner">
|
||||||
<div class="block-dernieres-dynamiques__header">
|
<div class="block-dernieres-dynamiques__header">
|
||||||
<h2 class="block-title">
|
<h2 class="block-title">
|
||||||
|
|
@ -43,7 +44,7 @@ $issue_related_articles = get_field('articles', $last_issue->ID);
|
||||||
|
|
||||||
<div class="content-meta">
|
<div class="content-meta">
|
||||||
<span class="content-meta__type content-meta__type--revue">Revue</span>
|
<span class="content-meta__type content-meta__type--revue">Revue</span>
|
||||||
<p class="content-meta__revue-issue content-meta__revue-issue--white">
|
<p class="content-meta__revue-issue <?php echo $variantLocation === 'carhop' ? 'content-meta__revue-issue--green' : 'content-meta__revue-issue--white'; ?>">
|
||||||
<span class="revue-issue-number revue-meta__label sr-only">Numéro</span>
|
<span class="revue-issue-number revue-meta__label sr-only">Numéro</span>
|
||||||
<?php echo $issueNumber; ?>
|
<?php echo $issueNumber; ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ $query = new WP_Query(array(
|
||||||
'offset' => 1,
|
'offset' => 1,
|
||||||
'post_status' => 'publish',
|
'post_status' => 'publish',
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<section class="block-revues-precedentes alignfull" <?php echo get_block_wrapper_attributes(); ?>>
|
<section class="block-revues-precedentes alignfull" <?php echo get_block_wrapper_attributes(); ?>>
|
||||||
<div class="block-revues-precedentes__inner">
|
<div class="block-revues-precedentes__inner">
|
||||||
|
|
@ -25,7 +23,6 @@ $query = new WP_Query(array(
|
||||||
<?php
|
<?php
|
||||||
$issue_number = get_field('issue_number', get_the_ID());
|
$issue_number = get_field('issue_number', get_the_ID());
|
||||||
$is_multiple_issue_number = $issue_number && is_numeric($issue_number) && strpos($issue_number, '.') !== false;
|
$is_multiple_issue_number = $issue_number && is_numeric($issue_number) && strpos($issue_number, '.') !== false;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<article class="card-revue swiper-slide">
|
<article class="card-revue swiper-slide">
|
||||||
<div class="content-meta">
|
<div class="content-meta">
|
||||||
|
|
@ -127,8 +124,6 @@ $query = new WP_Query(array(
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user