Compare commits

...

2 Commits

Author SHA1 Message Date
Antoine M
bd82e5f92b FEATURE Ajout de la prise en charge des alignements 'wide' et 'full' pour les blocs de contenu et de titrage, et ajout d'une variante 'nude' pour le style de la boîte de contenu.
All checks were successful
continuous-integration/drone/push Build is passing
2026-05-21 15:14:02 +02:00
Antoine M
ca7d3ec89b REBUILDIND 2026-05-21 15:12:29 +02:00
373 changed files with 20821 additions and 211 deletions

View File

@ -1 +1,14 @@
.wp-block-create-block-audio-player .audio-player-preview{background:#f0f0f0;border-radius:8px;padding:16px}.wp-block-create-block-audio-player .audio-player-preview .plyr{max-width:100%}
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/audio-player/editor.scss ***!
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* Styles for the block editor
*/
.wp-block-create-block-audio-player .audio-player-preview {
padding: 16px;
background: #f0f0f0;
border-radius: 8px;
}
.wp-block-create-block-audio-player .audio-player-preview .plyr {
max-width: 100%;
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '541c6bf8ff8df32f7cab');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '10098435d07beb804e43');

View File

@ -1 +1,16 @@
.wp-block-create-block-audio-player .audio-player-preview{background:#f0f0f0;border-radius:8px;padding:16px}.wp-block-create-block-audio-player .audio-player-preview .plyr{max-width:100%}
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/audio-player/editor.scss ***!
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* Styles for the block editor
*/
.wp-block-create-block-audio-player .audio-player-preview {
padding: 16px;
background: #f0f0f0;
border-radius: 8px;
}
.wp-block-create-block-audio-player .audio-player-preview .plyr {
max-width: 100%;
}
/*# sourceMappingURL=index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"audio-player/index.css","mappings":";;;AAAA;;EAAA;AAIC;EACC;EACA;EACA;AAAF;AAGE;EACC;AADH,C","sources":["webpack://carhop-blocks/./src/audio-player/editor.scss"],"sourcesContent":["/**\n * Styles for the block editor\n */\n.wp-block-create-block-audio-player {\n\t.audio-player-preview {\n\t\tpadding: 16px;\n\t\tbackground: #f0f0f0;\n\t\tborder-radius: 8px;\n\t\t\n\t\t// Ensure Plyr player has appropriate styling in the editor\n\t\t.plyr {\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1,589 @@
(()=>{"use strict";var e,a={9650:()=>{const e=window.wp.blocks,a=window.wp.i18n,s=window.wp.blockEditor,i=window.wp.components,o=window.wp.element,l=window.wp.data,r=window.wp.coreData,t=window.ReactJSXRuntime,n=JSON.parse('{"UU":"carhop-blocks/audio-player"}');(0,e.registerBlockType)(n.UU,{edit:function({attributes:e,setAttributes:n}){const{audioUrl:c,audioId:d,title:u,caption:p}=e,h=(0,o.useRef)(null),_=(0,o.useRef)(null),{saveEntityRecord:m}=(0,l.useDispatch)(r.store),[b,w]=(0,o.useState)(!1),[x,y]=(0,o.useState)(""),v=e=>{n({caption:e}),d&&(async e=>{if(d)try{w(!0),y(""),await m("postType","attachment",{id:d,caption:e}),y((0,a.__)("Légende mise à jour dans la médiathèque.","carhop-blocks"))}catch(e){y((0,a.__)("Erreur lors de la mise à jour dans la médiathèque.","carhop-blocks"))}finally{w(!1)}})(e)},j=e=>{n({audioUrl:e.url,audioId:e.id,caption:e.caption||""})},g=e=>{n({audioUrl:e,audioId:0})};return(0,o.useEffect)(()=>{if(c&&h.current&&void 0!==window.Plyr)return _.current&&_.current.destroy(),_.current=new window.Plyr(h.current,{controls:["play-large","play","progress","current-time","mute","volume","settings"],settings:["speed"],speed:{selected:1,options:[.5,.75,1,1.25,1.5,2]}}),()=>{_.current&&(_.current.destroy(),_.current=null)}},[c]),(0,t.jsxs)("div",{...(0,s.useBlockProps)({className:"audio-player"}),children:[(0,t.jsx)(s.InspectorControls,{children:(0,t.jsxs)(i.PanelBody,{title:(0,a.__)("Informations","carhop-blocks"),initialOpen:!0,children:[(0,t.jsx)(i.TextControl,{label:(0,a.__)("Titre","carhop-blocks"),value:u,onChange:e=>n({title:e})}),(0,t.jsx)(i.TextControl,{label:(0,a.__)("Légende","carhop-blocks"),value:p,onChange:v}),d?b?(0,t.jsx)(i.Notice,{status:"info",isDismissible:!1,children:(0,a.__)("Sauvegarde…","carhop-blocks")}):x?(0,t.jsx)(i.Notice,{status:"success",isDismissible:!1,children:x}):null:(0,t.jsx)(i.Notice,{status:"info",isDismissible:!1,children:(0,a.__)("Média externe : la légende n'est pas synchronisée dans la médiathèque.","carhop-blocks")})]})}),(0,t.jsx)(s.RichText,{className:"audio-player__title",value:u,onChange:e=>n({title:e}),tagName:"h4"}),c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(s.BlockControls,{children:[(0,t.jsx)(s.MediaReplaceFlow,{mediaId:d,mediaURL:c,allowedTypes:["audio"],accept:"audio/*",onSelectURL:g,onSelect:j}),(0,t.jsx)(i.ToolbarButton,{onClick:()=>{n({audioUrl:"",audioId:0,caption:""})},children:(0,a.__)("Retirer","carhop-blocks")})]}),(0,t.jsx)("div",{className:"audio-player-preview",children:(0,t.jsx)("audio",{ref:h,className:"js-plyr",src:c,preload:"metadata",children:(0,a.__)("Votre navigateur ne supporte pas l'élément audio.","carhop-blocks")})})]}):(0,t.jsx)(s.MediaPlaceholder,{icon:"format-audio",onSelect:j,onSelectURL:g,accept:"audio/*",allowedTypes:["audio"],labels:{title:(0,a.__)("Fichier audio","carhop-blocks"),instructions:(0,a.__)("Téléchargez un fichier audio, sélectionnez-en un depuis la médiathèque ou insérez-en un depuis une URL.","carhop-blocks")}}),(0,t.jsxs)("p",{className:"audio-player__details",children:[(0,t.jsx)("span",{className:"audio-player__details__label",children:"Audio"}),(0,t.jsx)(s.RichText,{className:"audio-player__details__caption",placeholder:(0,a.__)("Renseignez ici la légende de l'audio","carhop-blocks"),value:p,onChange:e=>v(e),tagName:"span"})]})]})},save:function({attributes:e}){const{audioUrl:a,title:i,caption:o}=e;return a?(0,t.jsxs)("div",{...s.useBlockProps.save({className:"audio-player"}),children:[(0,t.jsx)(s.RichText.Content,{value:i,className:"audio-player__title",tagName:"h4"}),(0,t.jsx)("audio",{className:"js-plyr",src:a,preload:"metadata",children:"Votre navigateur ne supporte pas l'élément audio."}),(0,t.jsxs)("p",{className:"audio-player__details",children:[(0,t.jsx)("span",{className:"audio-player__details__label",children:"Audio"}),(0,t.jsx)("span",{className:"audio-player__details__caption",children:null!=o?o:""})]})]}):null}})}},s={};function i(e){var o=s[e];if(void 0!==o)return o.exports;var l=s[e]={exports:{}};return a[e](l,l.exports,i),l.exports}i.m=a,e=[],i.O=(a,s,o,l)=>{if(!s){var r=1/0;for(d=0;d<e.length;d++){for(var[s,o,l]=e[d],t=!0,n=0;n<s.length;n++)(!1&l||r>=l)&&Object.keys(i.O).every(e=>i.O[e](s[n]))?s.splice(n--,1):(t=!1,l<r&&(r=l));if(t){e.splice(d--,1);var c=o();void 0!==c&&(a=c)}}return a}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[s,o,l]},i.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={7962:0,7710:0};i.O.j=a=>0===e[a];var a=(a,s)=>{var o,l,[r,t,n]=s,c=0;if(r.some(a=>0!==e[a])){for(o in t)i.o(t,o)&&(i.m[o]=t[o]);if(n)var d=n(i)}for(a&&a(s);c<r.length;c++)l=r[c],i.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return i.O(d)},s=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];s.forEach(a.bind(null,0)),s.push=a.bind(null,s.push.bind(s))})();var o=i.O(void 0,[7710],()=>i(9650));o=i.O(o)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/audio-player/block.json":
/*!*************************************!*\
!*** ./src/audio-player/block.json ***!
\*************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/audio-player","version":"0.1.0","title":"Lecteur audio","category":"carhop-blocks","icon":{"src":"format-audio","foreground":"#136f63"},"description":"Lecteur audio pour intégrer un fichier audio dans votre contenu","example":{},"attributes":{"audioUrl":{"type":"string","default":""},"audioId":{"type":"number","default":0},"title":{"type":"string","default":"Titre du bloc audio"},"description":{"type":"string","default":""},"caption":{"type":"string","default":""}},"supports":{"html":false},"keywords":["audio","player","lecteur audio"],"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');
/***/ }),
/***/ "./src/audio-player/edit.js":
/*!**********************************!*\
!*** ./src/audio-player/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 _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* 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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data");
/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./editor.scss */ "./src/audio-player/editor.scss");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__);
function Edit({
attributes,
setAttributes
}) {
const {
audioUrl,
audioId,
title,
caption
} = attributes;
const audioRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);
const plyrInstance = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);
const {
saveEntityRecord
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.store);
const [isSavingCaption, setIsSavingCaption] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(false);
const [saveMessage, setSaveMessage] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)("");
const saveCaptionToMedia = async newCaption => {
if (!audioId) return;
try {
setIsSavingCaption(true);
setSaveMessage("");
await saveEntityRecord("postType", "attachment", {
id: audioId,
caption: newCaption
});
setSaveMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Légende mise à jour dans la médiathèque.", "carhop-blocks"));
} catch (e) {
setSaveMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Erreur lors de la mise à jour dans la médiathèque.", "carhop-blocks"));
} finally {
setIsSavingCaption(false);
}
};
const handleCaptionChange = value => {
setAttributes({
caption: value
});
if (audioId) {
void saveCaptionToMedia(value);
}
};
const onSelectAudio = media => {
setAttributes({
audioUrl: media.url,
audioId: media.id,
// Récupérer les métadonnées depuis la médiathèque
caption: media.caption || ""
});
};
const onSelectURL = url => {
setAttributes({
audioUrl: url,
audioId: 0
});
};
const onRemoveAudio = () => {
setAttributes({
audioUrl: "",
audioId: 0,
caption: ""
});
};
// Initialize Plyr in the editor
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
// Wait for Plyr to be loaded (via PHP)
if (!audioUrl || !audioRef.current || typeof window.Plyr === "undefined") {
return;
}
// Destroy previous instance if it exists
if (plyrInstance.current) {
plyrInstance.current.destroy();
}
// Create new Plyr instance
plyrInstance.current = new window.Plyr(audioRef.current, {
controls: ["play-large", "play", "progress", "current-time", "mute", "volume", "settings"],
settings: ["speed"],
speed: {
selected: 1,
options: [0.5, 0.75, 1, 1.25, 1.5, 2]
}
});
// Cleanup on unmount
return () => {
if (plyrInstance.current) {
plyrInstance.current.destroy();
plyrInstance.current = null;
}
};
}, [audioUrl]);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: "audio-player"
}),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Informations", "carhop-blocks"),
initialOpen: true,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Titre", "carhop-blocks"),
value: title,
onChange: value => setAttributes({
title: value
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Légende", "carhop-blocks"),
value: caption,
onChange: handleCaptionChange
}), audioId ? isSavingCaption ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Notice, {
status: "info",
isDismissible: false,
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Sauvegarde…", "carhop-blocks")
}) : saveMessage ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Notice, {
status: "success",
isDismissible: false,
children: saveMessage
}) : null : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Notice, {
status: "info",
isDismissible: false,
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Média externe : la légende n'est pas synchronisée dans la médiathèque.", "carhop-blocks")
})]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
className: "audio-player__title",
value: title,
onChange: value => setAttributes({
title: value
}),
tagName: "h4"
}), !audioUrl ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaPlaceholder, {
icon: "format-audio",
onSelect: onSelectAudio,
onSelectURL: onSelectURL,
accept: "audio/*",
allowedTypes: ["audio"],
labels: {
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Fichier audio", "carhop-blocks"),
instructions: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Téléchargez un fichier audio, sélectionnez-en un depuis la médiathèque ou insérez-en un depuis une URL.", "carhop-blocks")
}
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaReplaceFlow, {
mediaId: audioId,
mediaURL: audioUrl,
allowedTypes: ["audio"],
accept: "audio/*",
onSelectURL: onSelectURL,
onSelect: onSelectAudio
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToolbarButton, {
onClick: onRemoveAudio,
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Retirer", "carhop-blocks")
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
className: "audio-player-preview",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("audio", {
ref: audioRef,
className: "js-plyr",
src: audioUrl,
preload: "metadata",
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Votre navigateur ne supporte pas l'élément audio.", "carhop-blocks")
})
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("p", {
className: "audio-player__details",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("span", {
className: "audio-player__details__label",
children: "Audio"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
className: "audio-player__details__caption",
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Renseignez ici la légende de l'audio", "carhop-blocks"),
value: caption,
onChange: value => handleCaptionChange(value),
tagName: "span"
})]
})]
});
}
/***/ }),
/***/ "./src/audio-player/editor.scss":
/*!**************************************!*\
!*** ./src/audio-player/editor.scss ***!
\**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/audio-player/index.js":
/*!***********************************!*\
!*** ./src/audio-player/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/audio-player/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/audio-player/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/audio-player/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/audio-player/block.json");
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
/**
* @see ./edit.js
*/
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
/**
* @see ./save.js
*/
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
});
/***/ }),
/***/ "./src/audio-player/save.js":
/*!**********************************!*\
!*** ./src/audio-player/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
}) {
const {
audioUrl,
title,
caption
} = attributes;
if (!audioUrl) {
return null;
}
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: "audio-player"
}),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.RichText.Content, {
value: title,
className: "audio-player__title",
tagName: "h4"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("audio", {
className: "js-plyr",
src: audioUrl,
preload: "metadata",
children: "Votre navigateur ne supporte pas l'\xE9l\xE9ment audio."
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p", {
className: "audio-player__details",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
className: "audio-player__details__label",
children: "Audio"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
className: "audio-player__details__caption",
children: caption !== null && caption !== void 0 ? caption : ""
})]
})]
});
}
/***/ }),
/***/ "./src/audio-player/style.scss":
/*!*************************************!*\
!*** ./src/audio-player/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/components":
/*!************************************!*\
!*** external ["wp","components"] ***!
\************************************/
/***/ ((module) => {
module.exports = window["wp"]["components"];
/***/ }),
/***/ "@wordpress/core-data":
/*!**********************************!*\
!*** external ["wp","coreData"] ***!
\**********************************/
/***/ ((module) => {
module.exports = window["wp"]["coreData"];
/***/ }),
/***/ "@wordpress/data":
/*!******************************!*\
!*** external ["wp","data"] ***!
\******************************/
/***/ ((module) => {
module.exports = window["wp"]["data"];
/***/ }),
/***/ "@wordpress/element":
/*!*********************************!*\
!*** external ["wp","element"] ***!
\*********************************/
/***/ ((module) => {
module.exports = window["wp"]["element"];
/***/ }),
/***/ "@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 = {
/******/ "audio-player/index": 0,
/******/ "audio-player/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, ["audio-player/style-index"], () => (__webpack_require__("./src/audio-player/index.js")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -1 +1,42 @@
.wp-block-carhop-blocks-audio-player .plyr__controls{padding:2rem 0!important}.wp-block-carhop-blocks-audio-player{--plyr-color-main:var(--wp--preset--color--primary);--plyr-menu-border-color:var(--wp--preset--color--carhop-green);--plyr-menu-border-shadow-color:var(--wp--preset--color--carhop-green);--plyr-control-icon-size:20px;--plyr-audio-control-color:var(--wp--preset--color--primary);--plyr-audio-range-track-background:var( --wp--preset--color--carhop-green--200 );border:1px solid var(--wp--preset--color--primary);padding:2rem}.wp-block-carhop-blocks-audio-player button[data-plyr=mute],.wp-block-carhop-blocks-audio-player button[data-plyr=play]{border:1px solid var(--wp--preset--color--primary);border-radius:50%;padding:2rem}.wp-block-carhop-blocks-audio-player button[data-plyr=mute]{padding:1rem}.wp-block-carhop-blocks-audio-player .audio-player__title{color:var(--wp--preset--color--primary);font-size:1.5rem;font-weight:600;margin:0;text-transform:uppercase}.wp-block-carhop-blocks-audio-player .audio-player__details__label{margin-left:.5rem;text-transform:uppercase}
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/audio-player/style.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* Styles for Plyr audio player block
* These styles are applied both in the editor and on the front-end
*/
.wp-block-carhop-blocks-audio-player .plyr__controls {
padding: 2rem 0 !important;
}
.wp-block-carhop-blocks-audio-player {
--plyr-color-main: var(--wp--preset--color--primary);
--plyr-menu-border-color: var(--wp--preset--color--carhop-green);
--plyr-menu-border-shadow-color: var(--wp--preset--color--carhop-green);
--plyr-control-icon-size: 20px;
--plyr-audio-control-color: var(--wp--preset--color--primary);
--plyr-audio-range-track-background: var(
--wp--preset--color--carhop-green--200
);
border: 1px solid var(--wp--preset--color--primary);
padding: 2rem;
}
.wp-block-carhop-blocks-audio-player button[data-plyr=play],
.wp-block-carhop-blocks-audio-player button[data-plyr=mute] {
border-radius: 50%;
border: 1px solid var(--wp--preset--color--primary);
padding: 2rem;
}
.wp-block-carhop-blocks-audio-player button[data-plyr=mute] {
padding: 1rem;
}
.wp-block-carhop-blocks-audio-player .audio-player__title {
text-transform: uppercase;
font-size: 1.5rem;
font-weight: 600;
color: var(--wp--preset--color--primary);
margin: 0;
}
.wp-block-carhop-blocks-audio-player .audio-player__details__label {
margin-left: 0.5rem;
text-transform: uppercase;
}

View File

@ -1 +1,44 @@
.wp-block-carhop-blocks-audio-player .plyr__controls{padding:2rem 0!important}.wp-block-carhop-blocks-audio-player{--plyr-color-main:var(--wp--preset--color--primary);--plyr-menu-border-color:var(--wp--preset--color--carhop-green);--plyr-menu-border-shadow-color:var(--wp--preset--color--carhop-green);--plyr-control-icon-size:20px;--plyr-audio-control-color:var(--wp--preset--color--primary);--plyr-audio-range-track-background:var( --wp--preset--color--carhop-green--200 );border:1px solid var(--wp--preset--color--primary);padding:2rem}.wp-block-carhop-blocks-audio-player button[data-plyr=mute],.wp-block-carhop-blocks-audio-player button[data-plyr=play]{border:1px solid var(--wp--preset--color--primary);border-radius:50%;padding:2rem}.wp-block-carhop-blocks-audio-player button[data-plyr=mute]{padding:1rem}.wp-block-carhop-blocks-audio-player .audio-player__title{color:var(--wp--preset--color--primary);font-size:1.5rem;font-weight:600;margin:0;text-transform:uppercase}.wp-block-carhop-blocks-audio-player .audio-player__details__label{margin-right:.5rem;text-transform:uppercase}
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/audio-player/style.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* Styles for Plyr audio player block
* These styles are applied both in the editor and on the front-end
*/
.wp-block-carhop-blocks-audio-player .plyr__controls {
padding: 2rem 0 !important;
}
.wp-block-carhop-blocks-audio-player {
--plyr-color-main: var(--wp--preset--color--primary);
--plyr-menu-border-color: var(--wp--preset--color--carhop-green);
--plyr-menu-border-shadow-color: var(--wp--preset--color--carhop-green);
--plyr-control-icon-size: 20px;
--plyr-audio-control-color: var(--wp--preset--color--primary);
--plyr-audio-range-track-background: var(
--wp--preset--color--carhop-green--200
);
border: 1px solid var(--wp--preset--color--primary);
padding: 2rem;
}
.wp-block-carhop-blocks-audio-player button[data-plyr=play],
.wp-block-carhop-blocks-audio-player button[data-plyr=mute] {
border-radius: 50%;
border: 1px solid var(--wp--preset--color--primary);
padding: 2rem;
}
.wp-block-carhop-blocks-audio-player button[data-plyr=mute] {
padding: 1rem;
}
.wp-block-carhop-blocks-audio-player .audio-player__title {
text-transform: uppercase;
font-size: 1.5rem;
font-weight: 600;
color: var(--wp--preset--color--primary);
margin: 0;
}
.wp-block-carhop-blocks-audio-player .audio-player__details__label {
margin-right: 0.5rem;
text-transform: uppercase;
}
/*# sourceMappingURL=style-index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"audio-player/style-index.css","mappings":";;;AAAA;;;EAAA;AAMC;EACC;AADF;AADA;EAIC;EACA;EACA;EAGA;EACA;EAGA;;GAAA;EAGA;EACA;AAJD;AAMC;;EAEC;EACA;EACA;AAJF;AAOC;EACC;AALF;AAQC;EACC;EACA;EACA;EACA;EACA;AANF;AAUE;EACC;EACA;AARH,C","sources":["webpack://carhop-blocks/./src/audio-player/style.scss"],"sourcesContent":["/**\n * Styles for Plyr audio player block\n * These styles are applied both in the editor and on the front-end\n */\n\n.wp-block-carhop-blocks-audio-player {\n\t.plyr__controls {\n\t\tpadding: 2rem 0 !important;\n\t}\n\t--plyr-color-main: var(--wp--preset--color--primary);\n\t--plyr-menu-border-color: var(--wp--preset--color--carhop-green);\n\t--plyr-menu-border-shadow-color: var(--wp--preset--color--carhop-green);\n\t// --plyr-control-radius: 50%;\n\n\t--plyr-control-icon-size: 20px;\n\t--plyr-audio-control-color: var(--wp--preset--color--primary);\n\t// Utiliser la couleur directement depuis tailwind.config.js ligne 32\n\t// --plyr-audio-range-track-background: #9df2de;\n\t--plyr-audio-range-track-background: var(\n\t\t--wp--preset--color--carhop-green--200\n\t);\n\tborder: 1px solid var(--wp--preset--color--primary);\n\tpadding: 2rem;\n\n\tbutton[data-plyr=\"play\"],\n\tbutton[data-plyr=\"mute\"] {\n\t\tborder-radius: 50%;\n\t\tborder: 1px solid var(--wp--preset--color--primary);\n\t\tpadding: 2rem;\n\t}\n\n\tbutton[data-plyr=\"mute\"] {\n\t\tpadding: 1rem;\n\t}\n\n\t.audio-player__title {\n\t\ttext-transform: uppercase;\n\t\tfont-size: 1.5rem;\n\t\tfont-weight: 600;\n\t\tcolor: var(--wp--preset--color--primary);\n\t\tmargin: 0;\n\t}\n\n\t.audio-player__details {\n\t\t&__label {\n\t\t\tmargin-right: 0.5rem;\n\t\t\ttext-transform: uppercase;\n\t\t}\n\t}\n\n\t// Plyr container styles\n\t// .plyr {\n\t// \tborder-radius: 8px;\n\t// }\n\n\t// // Customize Plyr colors if needed\n\t// .plyr--audio .plyr__control.plyr__tab-focus,\n\t// .plyr--audio .plyr__control:hover,\n\t// .plyr--audio .plyr__control[aria-expanded=\"true\"] {\n\t// \tbackground: #21759b;\n\t// }\n\n\t// .plyr__control--overlaid {\n\t// \tbackground: rgba(33, 117, 155, 0.8);\n\t// }\n}\n\n// .plyr--full-ui input[type=\"range\"] {\n// \tcolor: red;\n// }\n\n// .plyr__control--overlaid {\n// \tbackground: rgba(red, 0.8);\n// }\n\n// .plyr--video .plyr__control.plyr__tab-focus,\n// .plyr--video .plyr__control:hover,\n// .plyr--video .plyr__control[aria-expanded=\"true\"] {\n// \tbackground: red;\n// }\n\n// .plyr__control.plyr__tab-focus {\n// \tbox-shadow: 0 0 0 5px rgba(red, 0.5);\n// }\n\n// .plyr__menu__container\n// \t.plyr__control[role=\"menuitemradio\"][aria-checked=\"true\"]::before {\n// \tbackground: red;\n// }\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '3dea0e735ae9de8a9f12');
<?php return array('dependencies' => array(), 'version' => '4d709361ee12d2d6a887');

View File

@ -1 +1,30 @@
document.addEventListener("DOMContentLoaded",()=>{"undefined"!=typeof Plyr?Array.from(document.querySelectorAll(".js-plyr")).map(e=>new Plyr(e,{controls:["play-large","play","progress","current-time","duration","mute","volume","settings"],settings:["speed"],speed:{selected:1,options:[.5,.75,1,1.25,1.5,2]}})):console.error("Plyr library not loaded")});
/******/ (() => { // webpackBootstrap
/*!**********************************!*\
!*** ./src/audio-player/view.js ***!
\**********************************/
/**
* Initializes Plyr audio player on the front-end
* Note: Plyr is loaded as a dependency via PHP (see audio-player.php)
*/
// Initialize Plyr on all audio elements with the js-plyr class
document.addEventListener("DOMContentLoaded", () => {
// Check if Plyr is available (loaded via PHP)
if (typeof Plyr === "undefined") {
/* eslint-disable no-console */
console.error("Plyr library not loaded");
/* eslint-enable no-console */
return;
}
const players = Array.from(document.querySelectorAll(".js-plyr")).map(element => new Plyr(element, {
controls: ["play-large", "play", "progress", "current-time", "duration", "mute", "volume", "settings"],
settings: ["speed"],
speed: {
selected: 1,
options: [0.5, 0.75, 1, 1.25, 1.5, 2]
}
}));
});
/******/ })()
;
//# sourceMappingURL=view.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"audio-player/view.js","mappings":";;;;AAAA;AACA;AACA;AACA;;AAEA;AACAA,QAAQ,CAACC,gBAAgB,CAAC,kBAAkB,EAAE,MAAM;EACnD;EACA,IAAI,OAAOC,IAAI,KAAK,WAAW,EAAE;IAChC;IACAC,OAAO,CAACC,KAAK,CAAC,yBAAyB,CAAC;IACxC;IACA;EACD;EAEA,MAAMC,OAAO,GAAGC,KAAK,CAACC,IAAI,CAACP,QAAQ,CAACQ,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAACC,GAAG,CACnEC,OAAO,IACP,IAAIR,IAAI,CAACQ,OAAO,EAAE;IACjBC,QAAQ,EAAE,CACT,YAAY,EACZ,MAAM,EACN,UAAU,EACV,cAAc,EACd,UAAU,EACV,MAAM,EACN,QAAQ,EACR,UAAU,CACV;IACDC,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnBC,KAAK,EAAE;MAAEC,QAAQ,EAAE,CAAC;MAAEC,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IAAE;EAC7D,CAAC,CACH,CAAC;AACF,CAAC,CAAC,C","sources":["webpack://carhop-blocks/./src/audio-player/view.js"],"sourcesContent":["/**\n * Initializes Plyr audio player on the front-end\n * Note: Plyr is loaded as a dependency via PHP (see audio-player.php)\n */\n\n// Initialize Plyr on all audio elements with the js-plyr class\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n\t// Check if Plyr is available (loaded via PHP)\n\tif (typeof Plyr === \"undefined\") {\n\t\t/* eslint-disable no-console */\n\t\tconsole.error(\"Plyr library not loaded\");\n\t\t/* eslint-enable no-console */\n\t\treturn;\n\t}\n\n\tconst players = Array.from(document.querySelectorAll(\".js-plyr\")).map(\n\t\t(element) =>\n\t\t\tnew Plyr(element, {\n\t\t\t\tcontrols: [\n\t\t\t\t\t\"play-large\",\n\t\t\t\t\t\"play\",\n\t\t\t\t\t\"progress\",\n\t\t\t\t\t\"current-time\",\n\t\t\t\t\t\"duration\",\n\t\t\t\t\t\"mute\",\n\t\t\t\t\t\"volume\",\n\t\t\t\t\t\"settings\",\n\t\t\t\t],\n\t\t\t\tsettings: [\"speed\"],\n\t\t\t\tspeed: { selected: 1, options: [0.5, 0.75, 1, 1.25, 1.5, 2] },\n\t\t\t}),\n\t);\n});\n"],"names":["document","addEventListener","Plyr","console","error","players","Array","from","querySelectorAll","map","element","controls","settings","speed","selected","options"],"ignoreList":[],"sourceRoot":""}

View File

@ -399,7 +399,11 @@ return array(
),
'supports' => array(
'html' => false
'html' => false,
'align' => array(
'wide',
'full'
)
),
'textdomain' => 'carhop-blocks',
'editorScript' => 'file:./index.js',
@ -692,7 +696,11 @@ return array(
),
'supports' => array(
'html' => false
'html' => false,
'align' => array(
'wide',
'full'
)
),
'textdomain' => 'carhop-blocks',
'editorScript' => 'file:./index.js',

View File

@ -1 +1,33 @@
.card-grid__innerblocks{display:block}.card-grid .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{display:grid;gap:1rem}.card-grid--columns-2 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(2,1fr)}.card-grid--columns-3 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(3,1fr)}.card-grid--columns-4 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(4,1fr)}.card-grid--columns-5 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(5,1fr)}.card-grid.alignwide{margin-right:auto;margin-left:auto;max-width:var(--wp--style--global--wide-size,1200px)}.card-grid.alignfull{margin-right:0;margin-left:0;max-width:none;width:100%}
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/card-grid/editor.scss ***!
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.card-grid__innerblocks {
display: block;
}
.card-grid .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
display: grid;
gap: 1rem;
}
.card-grid--columns-2 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
grid-template-columns: repeat(2, 1fr);
}
.card-grid--columns-3 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
grid-template-columns: repeat(3, 1fr);
}
.card-grid--columns-4 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
grid-template-columns: repeat(4, 1fr);
}
.card-grid--columns-5 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
grid-template-columns: repeat(5, 1fr);
}
.card-grid.alignwide {
max-width: var(--wp--style--global--wide-size, 1200px);
margin-right: auto;
margin-left: auto;
}
.card-grid.alignfull {
max-width: none;
margin-right: 0;
margin-left: 0;
width: 100%;
}

View File

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

View File

@ -1 +1,35 @@
.card-grid__innerblocks{display:block}.card-grid .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{display:grid;gap:1rem}.card-grid--columns-2 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(2,1fr)}.card-grid--columns-3 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(3,1fr)}.card-grid--columns-4 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(4,1fr)}.card-grid--columns-5 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(5,1fr)}.card-grid.alignwide{margin-left:auto;margin-right:auto;max-width:var(--wp--style--global--wide-size,1200px)}.card-grid.alignfull{margin-left:0;margin-right:0;max-width:none;width:100%}
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/card-grid/editor.scss ***!
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.card-grid__innerblocks {
display: block;
}
.card-grid .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
display: grid;
gap: 1rem;
}
.card-grid--columns-2 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
grid-template-columns: repeat(2, 1fr);
}
.card-grid--columns-3 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
grid-template-columns: repeat(3, 1fr);
}
.card-grid--columns-4 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
grid-template-columns: repeat(4, 1fr);
}
.card-grid--columns-5 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
grid-template-columns: repeat(5, 1fr);
}
.card-grid.alignwide {
max-width: var(--wp--style--global--wide-size, 1200px);
margin-left: auto;
margin-right: auto;
}
.card-grid.alignfull {
max-width: none;
margin-left: 0;
margin-right: 0;
width: 100%;
}
/*# sourceMappingURL=index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"card-grid/index.css","mappings":";;;AACC;EACC;AAAF;AAGC;EAGC;EACA;AAHF;AAKC;EAIC;AANF;AAQC;EAIC;AATF;AAWC;EAIC;AAZF;AAcC;EAIC;AAfF;AAoBA;EACC;EACA;EACA;AAjBD;AAoBA;EACC;EACA;EACA;EACA;AAjBD,C","sources":["webpack://carhop-blocks/./src/card-grid/editor.scss"],"sourcesContent":[".card-grid {\n\t&__innerblocks {\n\t\tdisplay: block;\n\t}\n\n\t.card-grid__innerblocks\n\t\t> .block-editor-inner-blocks\n\t\t> .block-editor-block-list__layout {\n\t\tdisplay: grid;\n\t\tgap: 1rem;\n\t}\n\t&--columns-2\n\t\t.card-grid__innerblocks\n\t\t> .block-editor-inner-blocks\n\t\t> .block-editor-block-list__layout {\n\t\tgrid-template-columns: repeat(2, 1fr);\n\t}\n\t&--columns-3\n\t\t.card-grid__innerblocks\n\t\t> .block-editor-inner-blocks\n\t\t> .block-editor-block-list__layout {\n\t\tgrid-template-columns: repeat(3, 1fr);\n\t}\n\t&--columns-4\n\t\t.card-grid__innerblocks\n\t\t> .block-editor-inner-blocks\n\t\t> .block-editor-block-list__layout {\n\t\tgrid-template-columns: repeat(4, 1fr);\n\t}\n\t&--columns-5\n\t\t.card-grid__innerblocks\n\t\t> .block-editor-inner-blocks\n\t\t> .block-editor-block-list__layout {\n\t\tgrid-template-columns: repeat(5, 1fr);\n\t}\n}\n\n// Styles pour les alignements dans l'éditeur\n.card-grid.alignwide {\n\tmax-width: var(--wp--style--global--wide-size, 1200px);\n\tmargin-left: auto;\n\tmargin-right: auto;\n}\n\n.card-grid.alignfull {\n\tmax-width: none;\n\tmargin-left: 0;\n\tmargin-right: 0;\n\twidth: 100%;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1,412 @@
(()=>{"use strict";var r,e={6120:()=>{const r=window.wp.blocks,e=window.wp.i18n,o=window.wp.blockEditor,l=window.wp.components,n=window.ReactJSXRuntime,s=JSON.parse('{"UU":"carhop-blocks/card-grid"}');(0,r.registerBlockType)(s.UU,{icon:{foreground:"#136f63",src:(0,n.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 100 100",children:(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"m50,99.84988l-43.14852,-24.92494l0,-49.84988l43.14852,-24.92494l43.14852,24.92494l0,49.84988l-43.14852,24.92494zm-40.75518,-26.32675l40.75518,23.52312l40.75518,-23.52312l0,-47.04625l-40.75518,-23.55731l-40.75518,23.55731l0,47.04625z"}),(0,n.jsx)("path",{d:"m50,86.13945l-31.28439,-18.05263l0,-36.13945l31.28439,-18.05263l31.28439,18.05263l0,36.13945l-31.28439,18.05263zm-13.50528,-28.344l13.50528,7.79545l13.50528,-7.79545l0,-15.59091l-13.50528,-7.79545l-13.50528,7.79545l0,15.59091z"})]})})},edit:function({attributes:r,setAttributes:s,...c}){const{columns:t,cardsWithBorder:i}=r;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(o.InspectorControls,{children:[(0,n.jsx)(l.PanelBody,{title:(0,e.__)("Nombre de colonnes","carhop-blocks"),children:(0,n.jsx)(l.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,initialPosition:3,label:"Nombre de colonnes",max:4,min:2,onChange:r=>s({columns:r})})}),(0,n.jsx)(l.PanelBody,{title:(0,e.__)("Bordure des cartes","carhop-blocks"),children:(0,n.jsx)(l.CheckboxControl,{label:"Avec bordure",checked:i,onChange:r=>s({cardsWithBorder:r})})})]}),(0,n.jsx)("section",{...(0,o.useBlockProps)({className:`card-grid card-grid--columns-${t} card-grid--cards-${i?"with-border":"without-border"}`}),children:(0,n.jsx)("div",{className:"card-grid__innerblocks",children:(0,n.jsx)(o.InnerBlocks,{template:[["carhop-blocks/content-card",{placeholder:"Ajouter ici le texte"}]],allowedBlocks:["carhop-blocks/content-card"]})})})]})},save:function({attributes:r}){const{columns:e,cardsWithBorder:l,align:s}=r;return(0,n.jsx)("section",{...o.useBlockProps.save({className:`card-grid card-grid--columns-${e} card-grid--cards-${l?"with-border":"without-border"}${s?` align${s}`:""}`}),children:(0,n.jsx)("div",{className:"card-grid__innerblocks",children:(0,n.jsx)(o.InnerBlocks.Content,{})})})}})}},o={};function l(r){var n=o[r];if(void 0!==n)return n.exports;var s=o[r]={exports:{}};return e[r](s,s.exports,l),s.exports}l.m=e,r=[],l.O=(e,o,n,s)=>{if(!o){var c=1/0;for(d=0;d<r.length;d++){for(var[o,n,s]=r[d],t=!0,i=0;i<o.length;i++)(!1&s||c>=s)&&Object.keys(l.O).every(r=>l.O[r](o[i]))?o.splice(i--,1):(t=!1,s<c&&(c=s));if(t){r.splice(d--,1);var a=n();void 0!==a&&(e=a)}}return e}s=s||0;for(var d=r.length;d>0&&r[d-1][2]>s;d--)r[d]=r[d-1];r[d]=[o,n,s]},l.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={7227:0,5235:0};l.O.j=e=>0===r[e];var e=(e,o)=>{var n,s,[c,t,i]=o,a=0;if(c.some(e=>0!==r[e])){for(n in t)l.o(t,n)&&(l.m[n]=t[n]);if(i)var d=i(l)}for(e&&e(o);a<c.length;a++)s=c[a],l.o(r,s)&&r[s]&&r[s][0](),r[s]=0;return l.O(d)},o=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})();var n=l.O(void 0,[5235],()=>l(6120));n=l.O(n)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/card-grid/block.json":
/*!**********************************!*\
!*** ./src/card-grid/block.json ***!
\**********************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/card-grid","version":"0.1.0","title":"Card Grid","category":"carhop-blocks","icon":"smiley","description":"Boite de contenu pour la mise en forme d\'éléments de contenu","example":{},"supports":{"html":false,"align":["wide","full"],"alignWide":true},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"align":{"type":"string","default":""},"columns":{"type":"number","default":3},"cardsWithBorder":{"type":"boolean","default":true}}}');
/***/ }),
/***/ "./src/card-grid/edit.js":
/*!*******************************!*\
!*** ./src/card-grid/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/card-grid/editor.scss");
/* 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 react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__);
function Edit({
attributes,
setAttributes,
...props
}) {
const {
columns,
cardsWithBorder
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Nombre de colonnes", "carhop-blocks"),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
__next40pxDefaultSize: true,
__nextHasNoMarginBottom: true,
initialPosition: 3,
label: "Nombre de colonnes",
max: 4,
min: 2,
onChange: value => setAttributes({
columns: value
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Bordure des cartes", "carhop-blocks"),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.CheckboxControl, {
label: "Avec bordure",
checked: cardsWithBorder,
onChange: value => setAttributes({
cardsWithBorder: value
})
})
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("section", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: `card-grid card-grid--columns-${columns} card-grid--cards-${cardsWithBorder ? "with-border" : "without-border"}`
}),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: "card-grid__innerblocks",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
template: [["carhop-blocks/content-card", {
placeholder: "Ajouter ici le texte"
}]],
allowedBlocks: ["carhop-blocks/content-card"]
})
})
})]
});
}
/***/ }),
/***/ "./src/card-grid/editor.scss":
/*!***********************************!*\
!*** ./src/card-grid/editor.scss ***!
\***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/card-grid/index.js":
/*!********************************!*\
!*** ./src/card-grid/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/card-grid/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/card-grid/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/card-grid/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/card-grid/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: {
foreground: "#136f63",
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
width: "40",
height: "40",
viewBox: "0 0 100 100",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("g", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
d: "m50,99.84988l-43.14852,-24.92494l0,-49.84988l43.14852,-24.92494l43.14852,24.92494l0,49.84988l-43.14852,24.92494zm-40.75518,-26.32675l40.75518,23.52312l40.75518,-23.52312l0,-47.04625l-40.75518,-23.55731l-40.75518,23.55731l0,47.04625z"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
d: "m50,86.13945l-31.28439,-18.05263l0,-36.13945l31.28439,-18.05263l31.28439,18.05263l0,36.13945l-31.28439,18.05263zm-13.50528,-28.344l13.50528,7.79545l13.50528,-7.79545l0,-15.59091l-13.50528,-7.79545l-13.50528,7.79545l0,15.59091z"
})]
})
})
},
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
});
/***/ }),
/***/ "./src/card-grid/save.js":
/*!*******************************!*\
!*** ./src/card-grid/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
}) {
const {
columns,
cardsWithBorder,
align
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("section", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: `card-grid card-grid--columns-${columns} card-grid--cards-${cardsWithBorder ? "with-border" : "without-border"}${align ? ` align${align}` : ""}`
}),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "card-grid__innerblocks",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
})
});
}
/***/ }),
/***/ "./src/card-grid/style.scss":
/*!**********************************!*\
!*** ./src/card-grid/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/components":
/*!************************************!*\
!*** external ["wp","components"] ***!
\************************************/
/***/ ((module) => {
module.exports = window["wp"]["components"];
/***/ }),
/***/ "@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 = {
/******/ "card-grid/index": 0,
/******/ "card-grid/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, ["card-grid/style-index"], () => (__webpack_require__("./src/card-grid/index.js")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -1 +1,25 @@
.card-grid__innerblocks{display:grid;gap:1rem}.card-grid--cards-with-border .content-card{border:1px solid var(--wp--preset--color--primary);padding:2rem}.card-grid--cards-without-border .content-card{border:none}.card-grid.alignwide{margin-right:auto;margin-left:auto;max-width:var(--wp--style--global--wide-size,1200px)}.card-grid.alignfull{margin-right:0;margin-left:0;max-width:none;width:100%}
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/card-grid/style.scss ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.card-grid__innerblocks {
display: grid;
gap: 1rem;
}
.card-grid--cards-with-border .content-card {
border: 1px solid var(--wp--preset--color--primary);
padding: 2rem;
}
.card-grid--cards-without-border .content-card {
border: none;
}
.card-grid.alignwide {
max-width: var(--wp--style--global--wide-size, 1200px);
margin-right: auto;
margin-left: auto;
}
.card-grid.alignfull {
max-width: none;
margin-right: 0;
margin-left: 0;
width: 100%;
}

View File

@ -1 +1,27 @@
.card-grid__innerblocks{display:grid;gap:1rem}.card-grid--cards-with-border .content-card{border:1px solid var(--wp--preset--color--primary);padding:2rem}.card-grid--cards-without-border .content-card{border:none}.card-grid.alignwide{margin-left:auto;margin-right:auto;max-width:var(--wp--style--global--wide-size,1200px)}.card-grid.alignfull{margin-left:0;margin-right:0;max-width:none;width:100%}
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/card-grid/style.scss ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.card-grid__innerblocks {
display: grid;
gap: 1rem;
}
.card-grid--cards-with-border .content-card {
border: 1px solid var(--wp--preset--color--primary);
padding: 2rem;
}
.card-grid--cards-without-border .content-card {
border: none;
}
.card-grid.alignwide {
max-width: var(--wp--style--global--wide-size, 1200px);
margin-left: auto;
margin-right: auto;
}
.card-grid.alignfull {
max-width: none;
margin-left: 0;
margin-right: 0;
width: 100%;
}
/*# sourceMappingURL=style-index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"card-grid/style-index.css","mappings":";;;AACC;EACC;EACA;AAAF;AAIE;EACC;EACA;AAFH;AAME;EACC;AAJH;AAUA;EACC;EACA;EACA;AAPD;AAUA;EACC;EACA;EACA;EACA;AAPD,C","sources":["webpack://carhop-blocks/./src/card-grid/style.scss"],"sourcesContent":[".card-grid {\r\n\t&__innerblocks {\r\n\t\tdisplay: grid;\r\n\t\tgap: 1rem;\r\n\t}\r\n\r\n\t&--cards-with-border {\r\n\t\t.content-card {\r\n\t\t\tborder: 1px solid var(--wp--preset--color--primary);\r\n\t\t\tpadding: 2rem;\r\n\t\t}\r\n\t}\r\n\t&--cards-without-border {\r\n\t\t.content-card {\r\n\t\t\tborder: none;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Styles pour les alignements\r\n.card-grid.alignwide {\r\n\tmax-width: var(--wp--style--global--wide-size, 1200px);\r\n\tmargin-left: auto;\r\n\tmargin-right: auto;\r\n}\r\n\r\n.card-grid.alignfull {\r\n\tmax-width: none;\r\n\tmargin-left: 0;\r\n\tmargin-right: 0;\r\n\twidth: 100%;\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '31d6cfe0d16ae931b73c');
<?php return array('dependencies' => array(), 'version' => '244574d0b1ab9f3ea1b5');

View File

@ -0,0 +1,7 @@
/******/ (() => { // webpackBootstrap
/*!*******************************!*\
!*** ./src/card-grid/view.js ***!
\*******************************/
/******/ })()
;

View File

@ -1 +1,11 @@
.wp-block-create-block-chapo{border:1px dotted red}
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/chapo/editor.scss ***!
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied inside the editor only.
*
* Replace them with your own styles or remove the file completely.
*/
.wp-block-create-block-chapo {
border: 1px dotted #f00;
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '74267aaa27b67396df17');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '5436f2dc2aad389de26f');

View File

@ -1 +1,13 @@
.wp-block-create-block-chapo{border:1px dotted red}
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/chapo/editor.scss ***!
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied inside the editor only.
*
* Replace them with your own styles or remove the file completely.
*/
.wp-block-create-block-chapo {
border: 1px dotted #f00;
}
/*# sourceMappingURL=index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"chapo/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://carhop-blocks/./src/chapo/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-chapo {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1,364 @@
(()=>{"use strict";var e,o={3118:()=>{const e=window.wp.blocks,o=window.wp.i18n,t=window.wp.blockEditor,r=window.ReactJSXRuntime,n=JSON.parse('{"UU":"carhop-blocks/chapo"}');(0,e.registerBlockType)(n.UU,{icon:{src:(0,r.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",children:(0,r.jsx)("path",{d:"M16 24L8 16L16 8L24 16L16 24Z"})})},edit:function({attributes:e,setAttributes:n}){const{content:a}=e,c=(0,t.useBlockProps)({className:"block-chapo"});return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(t.RichText,{...c,tagName:"p",placeholder:(0,o.__)("Un bien beau chapo","chapo"),value:a,onChange:e=>n({content:e})})})},save:function({attributes:e}){const{content:o}=e,n=t.useBlockProps.save({className:"block-chapo"});return(0,r.jsx)(t.RichText.Content,{...n,value:o,tagName:"p"})}})}},t={};function r(e){var n=t[e];if(void 0!==n)return n.exports;var a=t[e]={exports:{}};return o[e](a,a.exports,r),a.exports}r.m=o,e=[],r.O=(o,t,n,a)=>{if(!t){var c=1/0;for(p=0;p<e.length;p++){for(var[t,n,a]=e[p],s=!0,i=0;i<t.length;i++)(!1&a||c>=a)&&Object.keys(r.O).every(e=>r.O[e](t[i]))?t.splice(i--,1):(s=!1,a<c&&(c=a));if(s){e.splice(p--,1);var l=n();void 0!==l&&(o=l)}}return o}a=a||0;for(var p=e.length;p>0&&e[p-1][2]>a;p--)e[p]=e[p-1];e[p]=[t,n,a]},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={7505:0,5029:0};r.O.j=o=>0===e[o];var o=(o,t)=>{var n,a,[c,s,i]=t,l=0;if(c.some(o=>0!==e[o])){for(n in s)r.o(s,n)&&(r.m[n]=s[n]);if(i)var p=i(r)}for(o&&o(t);l<c.length;l++)a=c[l],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(p)},t=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var n=r.O(void 0,[5029],()=>r(3118));n=r.O(n)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/chapo/block.json":
/*!******************************!*\
!*** ./src/chapo/block.json ***!
\******************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/chapo","version":"0.1.0","title":"Chapo","category":"carhop-blocks","icon":"smiley","description":"Chapo pour la mise en forme supérieure d\'éléments de contenu","example":{},"supports":{"html":false,"color":{"text":true,"background":false,"link":false}},"textdomain":"chapo","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"content":{"type":"string","source":"html","selector":"p"}}}');
/***/ }),
/***/ "./src/chapo/edit.js":
/*!***************************!*\
!*** ./src/chapo/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/chapo/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
}) {
const {
content
} = attributes;
const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: "block-chapo"
});
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)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
...blockProps,
tagName: "p",
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Un bien beau chapo", "chapo"),
value: content,
onChange: content => setAttributes({
content
})
})
});
}
/***/ }),
/***/ "./src/chapo/editor.scss":
/*!*******************************!*\
!*** ./src/chapo/editor.scss ***!
\*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/chapo/index.js":
/*!****************************!*\
!*** ./src/chapo/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/chapo/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/chapo/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/chapo/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/chapo/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/chapo/save.js":
/*!***************************!*\
!*** ./src/chapo/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
}) {
const {
content
} = attributes;
const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: "block-chapo"
});
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.RichText.Content, {
...blockProps,
value: content,
tagName: "p"
});
}
/***/ }),
/***/ "./src/chapo/style.scss":
/*!******************************!*\
!*** ./src/chapo/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 = {
/******/ "chapo/index": 0,
/******/ "chapo/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, ["chapo/style-index"], () => (__webpack_require__("./src/chapo/index.js")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -1 +1,14 @@
.wp-block-create-block-chapo{background-color:#21759b;color:#fff;padding:2px}
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/chapo/style.scss ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied both on the front of your site
* and in the editor.
*
* Replace them with your own styles or remove the file completely.
*/
.wp-block-create-block-chapo {
background-color: #21759b;
color: #fff;
padding: 2px;
}

View File

@ -1 +1,16 @@
.wp-block-create-block-chapo{background-color:#21759b;color:#fff;padding:2px}
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/chapo/style.scss ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied both on the front of your site
* and in the editor.
*
* Replace them with your own styles or remove the file completely.
*/
.wp-block-create-block-chapo {
background-color: #21759b;
color: #fff;
padding: 2px;
}
/*# sourceMappingURL=style-index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"chapo/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://carhop-blocks/./src/chapo/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-chapo {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '31d6cfe0d16ae931b73c');
<?php return array('dependencies' => array(), 'version' => '8abd4bedb8bb1776a982');

View File

@ -0,0 +1,7 @@
/******/ (() => { // webpackBootstrap
/*!***************************!*\
!*** ./src/chapo/view.js ***!
\***************************/
/******/ })()
;

View File

@ -1 +1,20 @@
.wp-block-carhop-blocks-chapter-section{margin:2rem calc(50% - 50vw)}.chapter-section--bg-light,.chapter-section--bg-light .wp-block-carhop-blocks-cta{--cta-current-color:var(--wp--preset--color--carhop-green,inherit)}.chapter-section--bg-light .wp-block-carhop-blocks-cta circle,.chapter-section--bg-light .wp-block-carhop-blocks-cta path,.chapter-section--bg-light .wp-block-carhop-blocks-cta svg{stroke:var(--wp--preset--color--carhop-green,inherit)}
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/chapter-section/editor.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
}
.chapter-section--bg-light {
--cta-current-color: var(--wp--preset--color--carhop-green, inherit);
}
.chapter-section--bg-light .wp-block-carhop-blocks-cta {
--cta-current-color: var(--wp--preset--color--carhop-green, inherit);
}
.chapter-section--bg-light .wp-block-carhop-blocks-cta svg,
.chapter-section--bg-light .wp-block-carhop-blocks-cta path,
.chapter-section--bg-light .wp-block-carhop-blocks-cta circle {
stroke: var(--wp--preset--color--carhop-green, inherit);
}

View File

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

View File

@ -1 +1,22 @@
.wp-block-carhop-blocks-chapter-section{margin:2rem calc(50% - 50vw)}.chapter-section--bg-light,.chapter-section--bg-light .wp-block-carhop-blocks-cta{--cta-current-color:var(--wp--preset--color--carhop-green,inherit)}.chapter-section--bg-light .wp-block-carhop-blocks-cta circle,.chapter-section--bg-light .wp-block-carhop-blocks-cta path,.chapter-section--bg-light .wp-block-carhop-blocks-cta svg{stroke:var(--wp--preset--color--carhop-green,inherit)}
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/chapter-section/editor.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
}
.chapter-section--bg-light {
--cta-current-color: var(--wp--preset--color--carhop-green, inherit);
}
.chapter-section--bg-light .wp-block-carhop-blocks-cta {
--cta-current-color: var(--wp--preset--color--carhop-green, inherit);
}
.chapter-section--bg-light .wp-block-carhop-blocks-cta svg,
.chapter-section--bg-light .wp-block-carhop-blocks-cta path,
.chapter-section--bg-light .wp-block-carhop-blocks-cta circle {
stroke: var(--wp--preset--color--carhop-green, inherit);
}
/*# sourceMappingURL=index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"chapter-section/index.css","mappings":";;;AAAA;EACC;AACD;;AAEA;EACC;AACD;;AACC;EACC;AACF;;AAAE;;;EAGC;AAEH,C","sources":["webpack://carhop-blocks/./src/chapter-section/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-chapter-section {\n\tmargin: 2rem calc(50% - 50vw);\n}\n\n.chapter-section--bg-light {\n\t--cta-current-color: var(--wp--preset--color--carhop-green, inherit);\n\n\t.wp-block-carhop-blocks-cta {\n\t\t--cta-current-color: var(--wp--preset--color--carhop-green, inherit);\n\t\tsvg,\n\t\tpath,\n\t\tcircle {\n\t\t\tstroke: var(--wp--preset--color--carhop-green, inherit);\n\t\t}\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1,6 @@
.wp-block-carhop-blocks-chapter-section{margin:2rem calc(50% - 50vw)}
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/chapter-section/style.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
}

View File

@ -1 +1,8 @@
.wp-block-carhop-blocks-chapter-section{margin:2rem calc(50% - 50vw)}
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/chapter-section/style.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-chapter-section {
margin: 2rem calc(50% - 50vw);
}
/*# sourceMappingURL=style-index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"chapter-section/style-index.css","mappings":";;;AAAA;EACC;AACD,C","sources":["webpack://carhop-blocks/./src/chapter-section/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-chapter-section {\r\n\tmargin: 2rem calc(50% - 50vw);\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '31d6cfe0d16ae931b73c');
<?php return array('dependencies' => array(), 'version' => '1d5a917f7fd29dd5219e');

View File

@ -0,0 +1,7 @@
/******/ (() => { // webpackBootstrap
/*!*************************************!*\
!*** ./src/chapter-section/view.js ***!
\*************************************/
/******/ })()
;

View File

@ -1 +1,28 @@
.wp-block-telex-company-timeline .timeline-entry-content .timeline-description:focus,.wp-block-telex-company-timeline .timeline-entry-content .timeline-title:focus{outline:2px solid #3b82f6;outline-offset:2px}.wp-block-telex-company-timeline .timeline-entry-content .timeline-media button{margin-top:12px}.components-panel__body .components-card{margin-bottom:12px}.components-panel__body .components-card .components-card__header{border-bottom:1px solid #e2e8f0}.components-panel__body .components-card .components-card__body .components-base-control{margin-bottom:16px}.components-panel__body .components-card .components-card__body .components-base-control:last-child{margin-bottom:0}
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/company-timeline/editor.scss ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied inside the editor only.
*
* Replace them with your own styles or remove the file completely.
*/
.wp-block-telex-company-timeline .timeline-entry-content .timeline-title:focus,
.wp-block-telex-company-timeline .timeline-entry-content .timeline-description:focus {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
.wp-block-telex-company-timeline .timeline-entry-content .timeline-media button {
margin-top: 12px;
}
.components-panel__body .components-card {
margin-bottom: 12px;
}
.components-panel__body .components-card .components-card__header {
border-bottom: 1px solid #e2e8f0;
}
.components-panel__body .components-card .components-card__body .components-base-control {
margin-bottom: 16px;
}
.components-panel__body .components-card .components-card__body .components-base-control:last-child {
margin-bottom: 0;
}

View File

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

View File

@ -1 +1,30 @@
.wp-block-telex-company-timeline .timeline-entry-content .timeline-description:focus,.wp-block-telex-company-timeline .timeline-entry-content .timeline-title:focus{outline:2px solid #3b82f6;outline-offset:2px}.wp-block-telex-company-timeline .timeline-entry-content .timeline-media button{margin-top:12px}.components-panel__body .components-card{margin-bottom:12px}.components-panel__body .components-card .components-card__header{border-bottom:1px solid #e2e8f0}.components-panel__body .components-card .components-card__body .components-base-control{margin-bottom:16px}.components-panel__body .components-card .components-card__body .components-base-control:last-child{margin-bottom:0}
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/company-timeline/editor.scss ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied inside the editor only.
*
* Replace them with your own styles or remove the file completely.
*/
.wp-block-telex-company-timeline .timeline-entry-content .timeline-title:focus,
.wp-block-telex-company-timeline .timeline-entry-content .timeline-description:focus {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
.wp-block-telex-company-timeline .timeline-entry-content .timeline-media button {
margin-top: 12px;
}
.components-panel__body .components-card {
margin-bottom: 12px;
}
.components-panel__body .components-card .components-card__header {
border-bottom: 1px solid #e2e8f0;
}
.components-panel__body .components-card .components-card__body .components-base-control {
margin-bottom: 16px;
}
.components-panel__body .components-card .components-card__body .components-base-control:last-child {
margin-bottom: 0;
}
/*# sourceMappingURL=index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"company-timeline/index.css","mappings":";;;AAAA;;;;EAAA;AAUG;;EACC;EACA;AAHJ;AAQG;EACC;AANJ;AAaC;EACC;AAVF;AAYE;EACC;AAVH;AAcG;EACC;AAZJ;AAcI;EACC;AAZL,C","sources":["webpack://carhop-blocks/./src/company-timeline/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-telex-company-timeline {\n\t.timeline-entry-content {\n\t\t.timeline-title,\n\t\t.timeline-description {\n\t\t\t&:focus {\n\t\t\t\toutline: 2px solid #3b82f6;\n\t\t\t\toutline-offset: 2px;\n\t\t\t}\n\t\t}\n\n\t\t.timeline-media {\n\t\t\tbutton {\n\t\t\t\tmargin-top: 12px;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.components-panel__body {\n\t.components-card {\n\t\tmargin-bottom: 12px;\n\n\t\t.components-card__header {\n\t\t\tborder-bottom: 1px solid #e2e8f0;\n\t\t}\n\n\t\t.components-card__body {\n\t\t\t.components-base-control {\n\t\t\t\tmargin-bottom: 16px;\n\n\t\t\t\t&:last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1,172 @@
.wp-block-telex-company-timeline{display:flex;gap:60px;margin:0 auto;max-width:1200px;padding:40px 20px;position:relative}.wp-block-telex-company-timeline .timeline-sidebar{align-self:flex-start;flex:0 0 200px;height:-moz-fit-content;height:fit-content;position:sticky;top:100px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years{background:#f8f9fa;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.08);padding:24px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3{border-bottom:2px solid #e2e8f0;color:#1e293b;font-size:18px;font-weight:700;margin:0 0 20px;padding-bottom:12px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link{background:transparent;border:none;border-radius:6px;color:#64748b;cursor:pointer;display:block;font-size:16px;font-weight:600;margin-bottom:8px;padding:12px 16px;text-align:right;text-decoration:none;transition:all .3s ease;width:100%}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link:hover{background:#e2e8f0;color:#1e293b;transform:translateX(-4px)}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link.active{background:#3b82f6;box-shadow:0 4px 12px rgba(59,130,246,.3);color:#fff}.wp-block-telex-company-timeline .timeline-content{flex:1;min-width:0}.wp-block-telex-company-timeline .timeline-content .timeline-entry{margin-bottom:80px;scroll-margin-top:100px}.wp-block-telex-company-timeline .timeline-content .timeline-entry:last-child{margin-bottom:0}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker{margin-bottom:24px;padding-right:40px;position:relative}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker:before{background:#3b82f6;border-radius:50%;box-shadow:0 0 0 4px rgba(59,130,246,.2);content:"";height:24px;right:0;position:absolute;top:50%;transform:translateY(-50%);width:24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2{color:#1e293b;font-size:32px;font-weight:800;line-height:1;margin:0}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content{background:#fff;border-right:4px solid #3b82f6;border-radius:12px;box-shadow:0 4px 16px rgba(0,0,0,.1);padding:32px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title{color:#1e293b;font-size:24px;font-weight:700;margin:0 0 16px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description{color:#475569;font-size:16px;line-height:1.8;margin:0 0 24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media{margin-top:24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media img{border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);height:auto;width:100%}@media(max-width:768px){.wp-block-telex-company-timeline{flex-direction:column;gap:30px;padding:20px 15px}.wp-block-telex-company-timeline .timeline-sidebar{flex:1;position:static}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years{padding:16px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3{font-size:16px;margin-bottom:12px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link{font-size:14px;padding:10px 12px}.wp-block-telex-company-timeline .timeline-content .timeline-entry{margin-bottom:50px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker{padding-right:30px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker:before{height:18px;width:18px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2{font-size:24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content{padding:20px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title{font-size:20px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description{font-size:15px}}
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/company-timeline/style.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied both on the front of your site
* and in the editor.
*
* Replace them with your own styles or remove the file completely.
*/
.wp-block-telex-company-timeline {
display: flex;
gap: 60px;
max-width: 1200px;
margin: 0 auto;
padding: 40px 20px;
position: relative;
}
.wp-block-telex-company-timeline .timeline-sidebar {
flex: 0 0 200px;
position: sticky;
top: 100px;
height: -moz-fit-content;
height: fit-content;
align-self: flex-start;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years {
background: #f8f9fa;
border-radius: 8px;
padding: 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3 {
margin: 0 0 20px 0;
font-size: 18px;
font-weight: 700;
color: #1e293b;
border-bottom: 2px solid #e2e8f0;
padding-bottom: 12px;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link {
display: block;
padding: 12px 16px;
margin-bottom: 8px;
text-decoration: none;
color: #64748b;
font-weight: 600;
font-size: 16px;
border-radius: 6px;
transition: all 0.3s ease;
cursor: pointer;
background: transparent;
border: none;
width: 100%;
text-align: right;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link:hover {
background: #e2e8f0;
color: #1e293b;
transform: translateX(-4px);
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link.active {
background: #3b82f6;
color: white;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.wp-block-telex-company-timeline .timeline-content {
flex: 1;
min-width: 0;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry {
margin-bottom: 80px;
scroll-margin-top: 100px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry:last-child {
margin-bottom: 0;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker {
margin-bottom: 24px;
position: relative;
padding-right: 40px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker::before {
content: "";
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 24px;
height: 24px;
background: #3b82f6;
border-radius: 50%;
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2 {
margin: 0;
font-size: 32px;
font-weight: 800;
color: #1e293b;
line-height: 1;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content {
background: white;
border-radius: 12px;
padding: 32px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
border-right: 4px solid #3b82f6;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title {
margin: 0 0 16px 0;
font-size: 24px;
font-weight: 700;
color: #1e293b;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description {
margin: 0 0 24px 0;
font-size: 16px;
line-height: 1.8;
color: #475569;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media {
margin-top: 24px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media img {
width: 100%;
height: auto;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
@media (max-width: 768px) {
.wp-block-telex-company-timeline {
flex-direction: column;
gap: 30px;
padding: 20px 15px;
}
.wp-block-telex-company-timeline .timeline-sidebar {
position: static;
flex: 1;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years {
padding: 16px;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3 {
font-size: 16px;
margin-bottom: 12px;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link {
padding: 10px 12px;
font-size: 14px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry {
margin-bottom: 50px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker {
padding-right: 30px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker::before {
width: 18px;
height: 18px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2 {
font-size: 24px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content {
padding: 20px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title {
font-size: 20px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description {
font-size: 15px;
}
}

View File

@ -1 +1,174 @@
.wp-block-telex-company-timeline{display:flex;gap:60px;margin:0 auto;max-width:1200px;padding:40px 20px;position:relative}.wp-block-telex-company-timeline .timeline-sidebar{align-self:flex-start;flex:0 0 200px;height:-moz-fit-content;height:fit-content;position:sticky;top:100px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years{background:#f8f9fa;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.08);padding:24px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3{border-bottom:2px solid #e2e8f0;color:#1e293b;font-size:18px;font-weight:700;margin:0 0 20px;padding-bottom:12px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link{background:transparent;border:none;border-radius:6px;color:#64748b;cursor:pointer;display:block;font-size:16px;font-weight:600;margin-bottom:8px;padding:12px 16px;text-align:left;text-decoration:none;transition:all .3s ease;width:100%}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link:hover{background:#e2e8f0;color:#1e293b;transform:translateX(4px)}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link.active{background:#3b82f6;box-shadow:0 4px 12px rgba(59,130,246,.3);color:#fff}.wp-block-telex-company-timeline .timeline-content{flex:1;min-width:0}.wp-block-telex-company-timeline .timeline-content .timeline-entry{margin-bottom:80px;scroll-margin-top:100px}.wp-block-telex-company-timeline .timeline-content .timeline-entry:last-child{margin-bottom:0}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker{margin-bottom:24px;padding-left:40px;position:relative}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker:before{background:#3b82f6;border-radius:50%;box-shadow:0 0 0 4px rgba(59,130,246,.2);content:"";height:24px;left:0;position:absolute;top:50%;transform:translateY(-50%);width:24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2{color:#1e293b;font-size:32px;font-weight:800;line-height:1;margin:0}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content{background:#fff;border-left:4px solid #3b82f6;border-radius:12px;box-shadow:0 4px 16px rgba(0,0,0,.1);padding:32px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title{color:#1e293b;font-size:24px;font-weight:700;margin:0 0 16px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description{color:#475569;font-size:16px;line-height:1.8;margin:0 0 24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media{margin-top:24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media img{border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);height:auto;width:100%}@media(max-width:768px){.wp-block-telex-company-timeline{flex-direction:column;gap:30px;padding:20px 15px}.wp-block-telex-company-timeline .timeline-sidebar{flex:1;position:static}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years{padding:16px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3{font-size:16px;margin-bottom:12px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link{font-size:14px;padding:10px 12px}.wp-block-telex-company-timeline .timeline-content .timeline-entry{margin-bottom:50px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker{padding-left:30px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker:before{height:18px;width:18px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2{font-size:24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content{padding:20px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title{font-size:20px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description{font-size:15px}}
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/company-timeline/style.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied both on the front of your site
* and in the editor.
*
* Replace them with your own styles or remove the file completely.
*/
.wp-block-telex-company-timeline {
display: flex;
gap: 60px;
max-width: 1200px;
margin: 0 auto;
padding: 40px 20px;
position: relative;
}
.wp-block-telex-company-timeline .timeline-sidebar {
flex: 0 0 200px;
position: sticky;
top: 100px;
height: -moz-fit-content;
height: fit-content;
align-self: flex-start;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years {
background: #f8f9fa;
border-radius: 8px;
padding: 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3 {
margin: 0 0 20px 0;
font-size: 18px;
font-weight: 700;
color: #1e293b;
border-bottom: 2px solid #e2e8f0;
padding-bottom: 12px;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link {
display: block;
padding: 12px 16px;
margin-bottom: 8px;
text-decoration: none;
color: #64748b;
font-weight: 600;
font-size: 16px;
border-radius: 6px;
transition: all 0.3s ease;
cursor: pointer;
background: transparent;
border: none;
width: 100%;
text-align: left;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link:hover {
background: #e2e8f0;
color: #1e293b;
transform: translateX(4px);
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link.active {
background: #3b82f6;
color: white;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.wp-block-telex-company-timeline .timeline-content {
flex: 1;
min-width: 0;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry {
margin-bottom: 80px;
scroll-margin-top: 100px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry:last-child {
margin-bottom: 0;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker {
margin-bottom: 24px;
position: relative;
padding-left: 40px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker::before {
content: "";
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 24px;
height: 24px;
background: #3b82f6;
border-radius: 50%;
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2 {
margin: 0;
font-size: 32px;
font-weight: 800;
color: #1e293b;
line-height: 1;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content {
background: white;
border-radius: 12px;
padding: 32px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
border-left: 4px solid #3b82f6;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title {
margin: 0 0 16px 0;
font-size: 24px;
font-weight: 700;
color: #1e293b;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description {
margin: 0 0 24px 0;
font-size: 16px;
line-height: 1.8;
color: #475569;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media {
margin-top: 24px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media img {
width: 100%;
height: auto;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
@media (max-width: 768px) {
.wp-block-telex-company-timeline {
flex-direction: column;
gap: 30px;
padding: 20px 15px;
}
.wp-block-telex-company-timeline .timeline-sidebar {
position: static;
flex: 1;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years {
padding: 16px;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3 {
font-size: 16px;
margin-bottom: 12px;
}
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link {
padding: 10px 12px;
font-size: 14px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry {
margin-bottom: 50px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker {
padding-left: 30px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker::before {
width: 18px;
height: 18px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2 {
font-size: 24px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content {
padding: 20px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title {
font-size: 20px;
}
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description {
font-size: 15px;
}
}
/*# sourceMappingURL=style-index.css.map*/

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'a1724919cd300fa062bf');
<?php return array('dependencies' => array(), 'version' => '13a56f69d7eb73f33007');

View File

@ -1 +1,68 @@
document.addEventListener("DOMContentLoaded",function(){const e=document.querySelector(".wp-block-telex-company-timeline");if(!e)return;const t=e.querySelector(".timeline-sidebar"),r=e.querySelectorAll(".year-link"),n=e.querySelectorAll(".timeline-entry");if(!t||0===r.length||0===n.length)return;r.forEach(t=>{t.addEventListener("click",function(t){t.preventDefault();const r=this.getAttribute("data-year")||this.getAttribute("href").replace("#year-",""),n=e.querySelector(`[data-year="${r}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})});const o=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){const n=t.target.getAttribute("data-year");r.forEach(e=>e.classList.remove("active"));const o=e.querySelector(`.year-link[data-year="${n}"]`);o&&o.classList.add("active")}})},{root:null,rootMargin:"-20% 0px -70% 0px",threshold:0});n.forEach(e=>{o.observe(e)})});
/******/ (() => { // webpackBootstrap
/*!**************************************!*\
!*** ./src/company-timeline/view.js ***!
\**************************************/
/**
* Use this file for JavaScript code that you want to run in the front-end
* on posts/pages that contain this block.
*/
document.addEventListener('DOMContentLoaded', function () {
const timeline = document.querySelector('.wp-block-telex-company-timeline');
if (!timeline) {
return;
}
const sidebar = timeline.querySelector('.timeline-sidebar');
const yearLinks = timeline.querySelectorAll('.year-link');
const entries = timeline.querySelectorAll('.timeline-entry');
if (!sidebar || yearLinks.length === 0 || entries.length === 0) {
return;
}
// Smooth scroll to year when clicking sidebar link
yearLinks.forEach(link => {
link.addEventListener('click', function (e) {
e.preventDefault();
const year = this.getAttribute('data-year') || this.getAttribute('href').replace('#year-', '');
const targetEntry = timeline.querySelector(`[data-year="${year}"]`);
if (targetEntry) {
targetEntry.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
// Update active year on scroll
const observerOptions = {
root: null,
rootMargin: '-20% 0px -70% 0px',
threshold: 0
};
const observerCallback = entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const year = entry.target.getAttribute('data-year');
// Remove active class from all links
yearLinks.forEach(link => link.classList.remove('active'));
// Add active class to current year
const activeLink = timeline.querySelector(`.year-link[data-year="${year}"]`);
if (activeLink) {
activeLink.classList.add('active');
}
}
});
};
const observer = new IntersectionObserver(observerCallback, observerOptions);
// Observe all timeline entries
entries.forEach(entry => {
observer.observe(entry);
});
});
/******/ })()
;
//# sourceMappingURL=view.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"company-timeline/view.js","mappings":";;;;AAAA;AACA;AACA;AACA;;AAEAA,QAAQ,CAACC,gBAAgB,CAAE,kBAAkB,EAAE,YAAW;EACzD,MAAMC,QAAQ,GAAGF,QAAQ,CAACG,aAAa,CAAE,kCAAmC,CAAC;EAE7E,IAAK,CAAED,QAAQ,EAAG;IACjB;EACD;EAEA,MAAME,OAAO,GAAGF,QAAQ,CAACC,aAAa,CAAE,mBAAoB,CAAC;EAC7D,MAAME,SAAS,GAAGH,QAAQ,CAACI,gBAAgB,CAAE,YAAa,CAAC;EAC3D,MAAMC,OAAO,GAAGL,QAAQ,CAACI,gBAAgB,CAAE,iBAAkB,CAAC;EAE9D,IAAK,CAAEF,OAAO,IAAIC,SAAS,CAACG,MAAM,KAAK,CAAC,IAAID,OAAO,CAACC,MAAM,KAAK,CAAC,EAAG;IAClE;EACD;;EAEA;EACAH,SAAS,CAACI,OAAO,CAAEC,IAAI,IAAI;IAC1BA,IAAI,CAACT,gBAAgB,CAAE,OAAO,EAAE,UAAUU,CAAC,EAAG;MAC7CA,CAAC,CAACC,cAAc,CAAC,CAAC;MAClB,MAAMC,IAAI,GAAG,IAAI,CAACC,YAAY,CAAE,WAAY,CAAC,IAAI,IAAI,CAACA,YAAY,CAAE,MAAO,CAAC,CAACC,OAAO,CAAE,QAAQ,EAAE,EAAG,CAAC;MACpG,MAAMC,WAAW,GAAGd,QAAQ,CAACC,aAAa,CAAE,eAAgBU,IAAI,IAAM,CAAC;MAEvE,IAAKG,WAAW,EAAG;QAClBA,WAAW,CAACC,cAAc,CAAE;UAC3BC,QAAQ,EAAE,QAAQ;UAClBC,KAAK,EAAE;QACR,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;EACJ,CAAE,CAAC;;EAEH;EACA,MAAMC,eAAe,GAAG;IACvBC,IAAI,EAAE,IAAI;IACVC,UAAU,EAAE,mBAAmB;IAC/BC,SAAS,EAAE;EACZ,CAAC;EAED,MAAMC,gBAAgB,GAAKjB,OAAO,IAAM;IACvCA,OAAO,CAACE,OAAO,CAAEgB,KAAK,IAAI;MACzB,IAAKA,KAAK,CAACC,cAAc,EAAG;QAC3B,MAAMb,IAAI,GAAGY,KAAK,CAACE,MAAM,CAACb,YAAY,CAAE,WAAY,CAAC;;QAErD;QACAT,SAAS,CAACI,OAAO,CAAEC,IAAI,IAAIA,IAAI,CAACkB,SAAS,CAACC,MAAM,CAAE,QAAS,CAAE,CAAC;;QAE9D;QACA,MAAMC,UAAU,GAAG5B,QAAQ,CAACC,aAAa,CAAE,yBAA0BU,IAAI,IAAM,CAAC;QAChF,IAAKiB,UAAU,EAAG;UACjBA,UAAU,CAACF,SAAS,CAACG,GAAG,CAAE,QAAS,CAAC;QACrC;MACD;IACD,CAAE,CAAC;EACJ,CAAC;EAED,MAAMC,QAAQ,GAAG,IAAIC,oBAAoB,CAAET,gBAAgB,EAAEJ,eAAgB,CAAC;;EAE9E;EACAb,OAAO,CAACE,OAAO,CAAEgB,KAAK,IAAI;IACzBO,QAAQ,CAACE,OAAO,CAAET,KAAM,CAAC;EAC1B,CAAE,CAAC;AACJ,CAAE,CAAC,C","sources":["webpack://carhop-blocks/./src/company-timeline/view.js"],"sourcesContent":["/**\n * Use this file for JavaScript code that you want to run in the front-end\n * on posts/pages that contain this block.\n */\n\ndocument.addEventListener( 'DOMContentLoaded', function() {\n\tconst timeline = document.querySelector( '.wp-block-telex-company-timeline' );\n\t\n\tif ( ! timeline ) {\n\t\treturn;\n\t}\n\n\tconst sidebar = timeline.querySelector( '.timeline-sidebar' );\n\tconst yearLinks = timeline.querySelectorAll( '.year-link' );\n\tconst entries = timeline.querySelectorAll( '.timeline-entry' );\n\n\tif ( ! sidebar || yearLinks.length === 0 || entries.length === 0 ) {\n\t\treturn;\n\t}\n\n\t// Smooth scroll to year when clicking sidebar link\n\tyearLinks.forEach( link => {\n\t\tlink.addEventListener( 'click', function( e ) {\n\t\t\te.preventDefault();\n\t\t\tconst year = this.getAttribute( 'data-year' ) || this.getAttribute( 'href' ).replace( '#year-', '' );\n\t\t\tconst targetEntry = timeline.querySelector( `[data-year=\"${ year }\"]` );\n\t\t\t\n\t\t\tif ( targetEntry ) {\n\t\t\t\ttargetEntry.scrollIntoView( { \n\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\tblock: 'start'\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t} );\n\n\t// Update active year on scroll\n\tconst observerOptions = {\n\t\troot: null,\n\t\trootMargin: '-20% 0px -70% 0px',\n\t\tthreshold: 0\n\t};\n\n\tconst observerCallback = ( entries ) => {\n\t\tentries.forEach( entry => {\n\t\t\tif ( entry.isIntersecting ) {\n\t\t\t\tconst year = entry.target.getAttribute( 'data-year' );\n\t\t\t\t\n\t\t\t\t// Remove active class from all links\n\t\t\t\tyearLinks.forEach( link => link.classList.remove( 'active' ) );\n\t\t\t\t\n\t\t\t\t// Add active class to current year\n\t\t\t\tconst activeLink = timeline.querySelector( `.year-link[data-year=\"${ year }\"]` );\n\t\t\t\tif ( activeLink ) {\n\t\t\t\t\tactiveLink.classList.add( 'active' );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t};\n\n\tconst observer = new IntersectionObserver( observerCallback, observerOptions );\n\n\t// Observe all timeline entries\n\tentries.forEach( entry => {\n\t\tobserver.observe( entry );\n\t} );\n} );\n"],"names":["document","addEventListener","timeline","querySelector","sidebar","yearLinks","querySelectorAll","entries","length","forEach","link","e","preventDefault","year","getAttribute","replace","targetEntry","scrollIntoView","behavior","block","observerOptions","root","rootMargin","threshold","observerCallback","entry","isIntersecting","target","classList","remove","activeLink","add","observer","IntersectionObserver","observe"],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1,26 @@
.content-box{padding-right:2.5rem!important;padding-left:2.5rem!important}.content-box a{color:var(--content-box-text-color)!important}.editor-styles-wrapper .deligraph-blocks-chapter-section{padding-right:2.5rem!important;padding-left:2.5rem!important}.content-box .block-editor-block-list__layout>.wp-block-columns,.content-box .wp-block-columns{margin-bottom:0!important;margin-top:0!important}
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/content-box/editor.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.content-box {
padding-right: 2.5rem !important;
padding-left: 2.5rem !important;
}
.content-box--variant-nude {
padding-right: 0 !important;
padding-left: 0 !important;
}
.content-box a {
color: var(--content-box-text-color) !important;
}
.editor-styles-wrapper .deligraph-blocks-chapter-section {
padding-right: 2.5rem !important;
padding-left: 2.5rem !important;
}
.content-box .wp-block-columns {
margin-top: 0 !important;
margin-bottom: 0 !important;
}
.content-box .block-editor-block-list__layout > .wp-block-columns {
margin-top: 0 !important;
margin-bottom: 0 !important;
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '20371dc6d9e7bfcfb2c0');
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '43c5028b668a17d013bb');

View File

@ -1 +1,28 @@
.content-box{padding-left:2.5rem!important;padding-right:2.5rem!important}.content-box a{color:var(--content-box-text-color)!important}.editor-styles-wrapper .deligraph-blocks-chapter-section{padding-left:2.5rem!important;padding-right:2.5rem!important}.content-box .block-editor-block-list__layout>.wp-block-columns,.content-box .wp-block-columns{margin-bottom:0!important;margin-top:0!important}
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/content-box/editor.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.content-box {
padding-left: 2.5rem !important;
padding-right: 2.5rem !important;
}
.content-box--variant-nude {
padding-left: 0 !important;
padding-right: 0 !important;
}
.content-box a {
color: var(--content-box-text-color) !important;
}
.editor-styles-wrapper .deligraph-blocks-chapter-section {
padding-left: 2.5rem !important;
padding-right: 2.5rem !important;
}
.content-box .wp-block-columns {
margin-top: 0 !important;
margin-bottom: 0 !important;
}
.content-box .block-editor-block-list__layout > .wp-block-columns {
margin-top: 0 !important;
margin-bottom: 0 !important;
}
/*# sourceMappingURL=index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"content-box/index.css","mappings":";;;AAAA;EACC;EACA;AACD;AACC;EACC;EACA;AACF;AAEC;EACC;AAAF;AAIA;EACC;EACA;AADD;AAKC;EACC;EACA;AAFF;AAIC;EACC;EACA;AAFF,C","sources":["webpack://carhop-blocks/./src/content-box/editor.scss"],"sourcesContent":[".content-box {\n\tpadding-left: 2.5rem !important;\n\tpadding-right: 2.5rem !important;\n\n\t&--variant-nude {\n\t\tpadding-left: 0 !important;\n\t\tpadding-right: 0 !important;\n\t}\n\n\ta {\n\t\tcolor: var(--content-box-text-color) !important;\n\t}\n}\n\n.editor-styles-wrapper .deligraph-blocks-chapter-section {\n\tpadding-left: 2.5rem !important;\n\tpadding-right: 2.5rem !important;\n}\n\n.content-box {\n\t.wp-block-columns {\n\t\tmargin-top: 0 !important;\n\t\tmargin-bottom: 0 !important;\n\t}\n\t.block-editor-block-list__layout > .wp-block-columns {\n\t\tmargin-top: 0 !important;\n\t\tmargin-bottom: 0 !important;\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +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/content-box/style.scss ***!
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -1 +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/content-box/style.scss ***!
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '31d6cfe0d16ae931b73c');
<?php return array('dependencies' => array(), 'version' => '661beeb1e96b4ba1b95f');

View File

@ -0,0 +1,7 @@
/******/ (() => { // webpackBootstrap
/*!*********************************!*\
!*** ./src/content-box/view.js ***!
\*********************************/
/******/ })()
;

View File

@ -9,7 +9,11 @@
"description": "Carte de contenu pour la mise en forme d'éléments de contenu",
"example": {},
"supports": {
"html": false
"html": false,
"align": [
"wide",
"full"
]
},
"textdomain": "carhop-blocks",
"editorScript": "file:./index.js",

View File

@ -1 +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/content-card/editor.scss ***!
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

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

View File

@ -1 +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/content-card/editor.scss ***!
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -1 +1,481 @@
(()=>{"use strict";var c,o={2921:()=>{const c=window.wp.blocks,o=window.wp.i18n,r=window.wp.blockEditor,e=window.wp.components,t=window.ReactJSXRuntime,n=JSON.parse('{"UU":"carhop-blocks/content-card"}');(0,c.registerBlockType)(n.UU,{icon:{foreground:"#136f63",src:(0,t.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",children:(0,t.jsx)("g",{children:(0,t.jsx)("path",{d:"M1,5c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM3,0H1C.4,0,0,.4,0,1v2c0,.6.4,1,1,1s1-.4,1-1v-1h1c.6,0,1-.4,1-1s-.4-1-1-1ZM6,2h2c.6,0,1-.4,1-1s-.4-1-1-1h-2c-.6,0-1,.4-1,1s.4,1,1,1ZM1,10c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM6,7v4c0,.6.4,1,1,1h4c.6,0,1-.4,1-1v-4c0-.6-.4-1-1-1h-4c-.6,0-1,.4-1,1ZM12,16h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1ZM17,9c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM17,4c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM17,14c-.6,0-1,.4-1,1v1h-1c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1v-2c0-.6-.4-1-1-1ZM7,16h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1ZM13,0h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1Z"})})})},edit:function({attributes:c,setAttributes:n,...s}){(0,r.useSetting)("color.palette.theme");const{hasBackgroundColor:a,backgroundColor:l,textColor:h,hasLightBackground:i,hasBorder:d}=c;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.InspectorControls,{children:(0,t.jsx)(e.PanelBody,{className:"deligraph-blocks-components-image__panel-body",title:(0,o.__)("Options","carhop-blocks"),children:(0,t.jsx)(e.CheckboxControl,{label:"Bordure",checked:d,onChange:c=>n({hasBorder:c})})})}),(0,t.jsx)("div",{...(0,r.useBlockProps)({className:`content-card ${i?"content-card--bg-light":"content-card--bg-dark"} ${d?"content-card--has-border":""}`,style:{"--content-card-text-color":null!=h?h:"inherit","--content-card-background-color":a?l:"transparent"}}),children:(0,t.jsx)("div",{className:"content-card__innerblocks",children:(0,t.jsx)(r.InnerBlocks,{template:[["core/paragraph",{placeholder:"Ajouter ici le texte"}]],allowedBlocks:["core/heading","core/paragraph","core/group","core/list","core/button","core/buttons","carhop-blocks/heading","carhop-blocks/cta-group","carhop-blocks/cta"]})})})]})},save:function({attributes:c}){const{backgroundColor:o,textColor:e,hasLightBackground:n,hasBackgroundColor:s,hasBorder:a}=c;return(0,t.jsx)("div",{...r.useBlockProps.save({className:`content-card ${n?"content-card--bg-light":"content-card--bg-dark"} ${a?"content-card--has-border":""}`,style:{"--content-card-text-color":null!=e?e:"inherit","--content-card-background-color":s?o:"transparent"}}),children:(0,t.jsx)("div",{className:"content-card__innerblocks",children:(0,t.jsx)(r.InnerBlocks.Content,{})})})}})}},r={};function e(c){var t=r[c];if(void 0!==t)return t.exports;var n=r[c]={exports:{}};return o[c](n,n.exports,e),n.exports}e.m=o,c=[],e.O=(o,r,t,n)=>{if(!r){var s=1/0;for(i=0;i<c.length;i++){for(var[r,t,n]=c[i],a=!0,l=0;l<r.length;l++)(!1&n||s>=n)&&Object.keys(e.O).every(c=>e.O[c](r[l]))?r.splice(l--,1):(a=!1,n<s&&(s=n));if(a){c.splice(i--,1);var h=t();void 0!==h&&(o=h)}}return o}n=n||0;for(var i=c.length;i>0&&c[i-1][2]>n;i--)c[i]=c[i-1];c[i]=[r,t,n]},e.o=(c,o)=>Object.prototype.hasOwnProperty.call(c,o),(()=>{var c={892:0,7684:0};e.O.j=o=>0===c[o];var o=(o,r)=>{var t,n,[s,a,l]=r,h=0;if(s.some(o=>0!==c[o])){for(t in a)e.o(a,t)&&(e.m[t]=a[t]);if(l)var i=l(e)}for(o&&o(r);h<s.length;h++)n=s[h],e.o(c,n)&&c[n]&&c[n][0](),c[n]=0;return e.O(i)},r=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];r.forEach(o.bind(null,0)),r.push=o.bind(null,r.push.bind(r))})();var t=e.O(void 0,[7684],()=>e(2921));t=e.O(t)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./_utilities/utilities.js":
/*!*********************************!*\
!*** ./_utilities/utilities.js ***!
\*********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ isColorLight: () => (/* binding */ isColorLight)
/* harmony export */ });
// Fonction pour déterminer si une couleur est claire ou sombre
function isColorLight(color) {
// Si pas de couleur, considérer comme claire
if (!color) return true;
// Convertir hex en RGB
let hex = color.replace("#", "");
if (hex.length === 3) {
hex = hex.split("").map(char => char + char).join("");
}
const r = parseInt(hex.substr(0, 2), 16);
const g = parseInt(hex.substr(2, 2), 16);
const b = parseInt(hex.substr(4, 2), 16);
// Calculer la luminance relative (formule standard)
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
// Si luminance > 0.5, la couleur est claire
return luminance > 0.5;
}
/***/ }),
/***/ "./src/content-card/block.json":
/*!*************************************!*\
!*** ./src/content-card/block.json ***!
\*************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/content-card","version":"0.1.0","title":"Content Card","category":"carhop-blocks","icon":"smiley","description":"Carte de contenu pour la mise en forme d\'éléments de contenu","example":{},"supports":{"html":false,"align":["wide","full"]},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"hasBorder":{"type":"boolean","default":true},"hasBackgroundColor":{"type":"boolean","default":false},"backgroundColor":{"type":"string","default":"#136f63"},"hasLightBackground":{"type":"boolean","default":true},"textColor":{"type":"string","default":"#136f63"}}}');
/***/ }),
/***/ "./src/content-card/edit.js":
/*!**********************************!*\
!*** ./src/content-card/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/content-card/editor.scss");
/* harmony import */ var _utilities_utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../_utilities/utilities */ "./_utilities/utilities.js");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* 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__);
function Edit({
attributes,
setAttributes,
...props
}) {
const colors = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useSetting)("color.palette.theme");
const {
hasBackgroundColor,
backgroundColor,
textColor,
hasLightBackground,
hasBorder
} = attributes;
function onBackgroundColorChange(value) {
if (value === undefined) {
setAttributes({
hasBackgroundColor: false
});
setAttributes({
backgroundColor: "transparent"
});
}
const isLightBackgroundColor = (0,_utilities_utilities__WEBPACK_IMPORTED_MODULE_3__.isColorLight)(backgroundColor);
setAttributes({
hasLightBackground: isLightBackgroundColor
});
setAttributes({
backgroundColor: value
});
}
function onHasBackgroundColorChange(value) {
setAttributes({
hasBackgroundColor: value
});
if (!value) {
setAttributes({
backgroundColor: null
});
}
}
function onTextColorChange(value) {
setAttributes({
textColor: value
});
}
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
className: "deligraph-blocks-components-image__panel-body",
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Options", "carhop-blocks"),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.CheckboxControl, {
label: "Bordure",
checked: hasBorder,
onChange: value => setAttributes({
hasBorder: value
})
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: `content-card ${hasLightBackground ? "content-card--bg-light" : "content-card--bg-dark"} ${hasBorder ? "content-card--has-border" : ""}`,
style: {
"--content-card-text-color": textColor !== null && textColor !== void 0 ? textColor : "inherit",
"--content-card-background-color": hasBackgroundColor ? backgroundColor : "transparent"
}
}),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
className: "content-card__innerblocks",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
template: [["core/paragraph", {
placeholder: "Ajouter ici le texte"
}]],
allowedBlocks: ["core/heading", "core/paragraph", "core/group", "core/list", "core/button", "core/buttons", "carhop-blocks/heading", "carhop-blocks/cta-group", "carhop-blocks/cta"]
})
})
})]
});
}
/***/ }),
/***/ "./src/content-card/editor.scss":
/*!**************************************!*\
!*** ./src/content-card/editor.scss ***!
\**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/content-card/index.js":
/*!***********************************!*\
!*** ./src/content-card/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/content-card/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/content-card/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/content-card/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/content-card/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: {
foreground: "#136f63",
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
width: "18",
height: "18",
viewBox: "0 0 18 18",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("g", {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
d: "M1,5c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM3,0H1C.4,0,0,.4,0,1v2c0,.6.4,1,1,1s1-.4,1-1v-1h1c.6,0,1-.4,1-1s-.4-1-1-1ZM6,2h2c.6,0,1-.4,1-1s-.4-1-1-1h-2c-.6,0-1,.4-1,1s.4,1,1,1ZM1,10c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM6,7v4c0,.6.4,1,1,1h4c.6,0,1-.4,1-1v-4c0-.6-.4-1-1-1h-4c-.6,0-1,.4-1,1ZM12,16h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1ZM17,9c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM17,4c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM17,14c-.6,0-1,.4-1,1v1h-1c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1v-2c0-.6-.4-1-1-1ZM7,16h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1ZM13,0h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1Z"
})
})
})
},
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
});
/***/ }),
/***/ "./src/content-card/save.js":
/*!**********************************!*\
!*** ./src/content-card/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 _utilities_utilities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_utilities/utilities */ "./_utilities/utilities.js");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
function save({
attributes
}) {
const {
backgroundColor,
textColor,
hasLightBackground,
hasBackgroundColor,
hasBorder
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: `content-card ${hasLightBackground ? "content-card--bg-light" : "content-card--bg-dark"} ${hasBorder ? "content-card--has-border" : ""}`,
style: {
"--content-card-text-color": textColor !== null && textColor !== void 0 ? textColor : "inherit",
"--content-card-background-color": hasBackgroundColor ? backgroundColor : "transparent"
}
}),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
className: "content-card__innerblocks",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
})
});
}
/***/ }),
/***/ "./src/content-card/style.scss":
/*!*************************************!*\
!*** ./src/content-card/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/components":
/*!************************************!*\
!*** external ["wp","components"] ***!
\************************************/
/***/ ((module) => {
module.exports = window["wp"]["components"];
/***/ }),
/***/ "@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 = {
/******/ "content-card/index": 0,
/******/ "content-card/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, ["content-card/style-index"], () => (__webpack_require__("./src/content-card/index.js")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -1 +1,29 @@
.content-card{word-break:break-word}.content-card h1.wp-block-heading,.content-card h2.wp-block-heading,.content-card h3.wp-block-heading,.content-card h4.wp-block-heading,.content-card h5.wp-block-heading,.content-card h6.wp-block-heading{color:var(--content-card-text-color);font-size:1.25rem;font-weight:700;margin-bottom:0;margin-top:0;text-transform:uppercase}.content-card *,.content-card p{color:var(--content-card-text-color)}.content-card li{font-weight:300;list-style:disc;margin-bottom:.5rem;margin-right:1rem}
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/content-card/style.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.content-card {
word-break: break-word;
}
.content-card h1.wp-block-heading,
.content-card h2.wp-block-heading,
.content-card h3.wp-block-heading,
.content-card h4.wp-block-heading,
.content-card h5.wp-block-heading,
.content-card h6.wp-block-heading {
margin-top: 0;
margin-bottom: 0;
font-size: 1.25rem;
text-transform: uppercase;
font-weight: 700;
color: var(--content-card-text-color);
}
.content-card *,
.content-card p {
color: var(--content-card-text-color);
}
.content-card li {
list-style: disc;
margin-right: 1rem;
margin-bottom: 0.5rem;
font-weight: 300;
}

View File

@ -1 +1,31 @@
.content-card{word-break:break-word}.content-card h1.wp-block-heading,.content-card h2.wp-block-heading,.content-card h3.wp-block-heading,.content-card h4.wp-block-heading,.content-card h5.wp-block-heading,.content-card h6.wp-block-heading{color:var(--content-card-text-color);font-size:1.25rem;font-weight:700;margin-bottom:0;margin-top:0;text-transform:uppercase}.content-card *,.content-card p{color:var(--content-card-text-color)}.content-card li{font-weight:300;list-style:disc;margin-bottom:.5rem;margin-left:1rem}
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/content-card/style.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.content-card {
word-break: break-word;
}
.content-card h1.wp-block-heading,
.content-card h2.wp-block-heading,
.content-card h3.wp-block-heading,
.content-card h4.wp-block-heading,
.content-card h5.wp-block-heading,
.content-card h6.wp-block-heading {
margin-top: 0;
margin-bottom: 0;
font-size: 1.25rem;
text-transform: uppercase;
font-weight: 700;
color: var(--content-card-text-color);
}
.content-card *,
.content-card p {
color: var(--content-card-text-color);
}
.content-card li {
list-style: disc;
margin-left: 1rem;
margin-bottom: 0.5rem;
font-weight: 300;
}
/*# sourceMappingURL=style-index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"content-card/style-index.css","mappings":";;;AAAA;EACC;AACD;AACC;;;;;;EAMC;EACA;EACA;EACA;EACA;EACA;AACF;AACC;;EAEC;AACF;AAEC;EACC;EACA;EACA;EACA;AAAF,C","sources":["webpack://carhop-blocks/./src/content-card/style.scss"],"sourcesContent":[".content-card {\r\n\tword-break: break-word;\r\n\r\n\th1.wp-block-heading,\r\n\th2.wp-block-heading,\r\n\th3.wp-block-heading,\r\n\th4.wp-block-heading,\r\n\th5.wp-block-heading,\r\n\th6.wp-block-heading {\r\n\t\tmargin-top: 0;\r\n\t\tmargin-bottom: 0;\r\n\t\tfont-size: 1.25rem;\r\n\t\ttext-transform: uppercase;\r\n\t\tfont-weight: 700;\r\n\t\tcolor: var(--content-card-text-color);\r\n\t}\r\n\t*,\r\n\tp {\r\n\t\tcolor: var(--content-card-text-color);\r\n\t}\r\n\r\n\tli {\r\n\t\tlist-style: disc;\r\n\t\tmargin-left: 1rem;\r\n\t\tmargin-bottom: 0.5rem;\r\n\t\tfont-weight: 300;\r\n\t}\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '31d6cfe0d16ae931b73c');
<?php return array('dependencies' => array(), 'version' => '4a5689093a882319430a');

View File

@ -0,0 +1,7 @@
/******/ (() => { // webpackBootstrap
/*!**********************************!*\
!*** ./src/content-card/view.js ***!
\**********************************/
/******/ })()
;

View File

@ -1 +1,32 @@
.wp-block-carhop-blocks-cta{align-items:center;color:var(--cta-current-color);display:block;display:flex;gap:10px;line-height:normal;padding:2px;width:-moz-fit-content;width:fit-content}.wp-block-carhop-blocks-cta .icon svg{height:30px;width:30px}.wp-block-carhop-blocks-cta .icon svg circle,.wp-block-carhop-blocks-cta .icon svg path{stroke:var(--cta-current-color)}.wp-block-carhop-blocks-cta.align--left{margin-right:0}.wp-block-carhop-blocks-cta.align--right{margin-right:auto;margin-left:0}.wp-block-carhop-blocks-cta.align--center{margin:0 auto}
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/cta-group/editor.scss ***!
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta {
color: var(--cta-current-color);
padding: 2px;
display: block;
width: -moz-fit-content;
width: fit-content;
display: flex;
align-items: center;
gap: 10px;
line-height: normal;
}
.wp-block-carhop-blocks-cta .icon svg {
width: 30px;
height: 30px;
}
.wp-block-carhop-blocks-cta .icon svg path,
.wp-block-carhop-blocks-cta .icon svg circle {
stroke: var(--cta-current-color);
}
.wp-block-carhop-blocks-cta.align--left {
margin-right: 0;
}
.wp-block-carhop-blocks-cta.align--right {
margin-left: 0;
margin-right: auto;
}
.wp-block-carhop-blocks-cta.align--center {
margin: 0 auto;
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '86a5bab98ad368d15051');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '327b775bbed225dbef04');

View File

@ -1 +1,34 @@
.wp-block-carhop-blocks-cta{align-items:center;color:var(--cta-current-color);display:block;display:flex;gap:10px;line-height:normal;padding:2px;width:-moz-fit-content;width:fit-content}.wp-block-carhop-blocks-cta .icon svg{height:30px;width:30px}.wp-block-carhop-blocks-cta .icon svg circle,.wp-block-carhop-blocks-cta .icon svg path{stroke:var(--cta-current-color)}.wp-block-carhop-blocks-cta.align--left{margin-left:0}.wp-block-carhop-blocks-cta.align--right{margin-left:auto;margin-right:0}.wp-block-carhop-blocks-cta.align--center{margin:0 auto}
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/cta-group/editor.scss ***!
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta {
color: var(--cta-current-color);
padding: 2px;
display: block;
width: -moz-fit-content;
width: fit-content;
display: flex;
align-items: center;
gap: 10px;
line-height: normal;
}
.wp-block-carhop-blocks-cta .icon svg {
width: 30px;
height: 30px;
}
.wp-block-carhop-blocks-cta .icon svg path,
.wp-block-carhop-blocks-cta .icon svg circle {
stroke: var(--cta-current-color);
}
.wp-block-carhop-blocks-cta.align--left {
margin-left: 0;
}
.wp-block-carhop-blocks-cta.align--right {
margin-right: 0;
margin-left: auto;
}
.wp-block-carhop-blocks-cta.align--center {
margin: 0 auto;
}
/*# sourceMappingURL=index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"cta-group/index.css","mappings":";;;AAAA;EACC;EAEA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;AAAD;AAGE;EACC;EACA;AADH;AAGE;;EAEC;AADH;AAKC;EACC;AAHF;AAKC;EACC;EACA;AAHF;AAKC;EACC;AAHF,C","sources":["webpack://carhop-blocks/./src/cta-group/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tcolor: var(--cta-current-color);\n\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tstroke: var(--cta-current-color);\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1,384 @@
(()=>{"use strict";var r,o={8903:()=>{const r=window.wp.blocks,o=(window.wp.i18n,window.wp.blockEditor),e=window.ReactJSXRuntime,t=JSON.parse('{"UU":"carhop-blocks/cta-group"}');(0,r.registerBlockType)(t.UU,{icon:{src:(0,e.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",children:[(0,e.jsxs)("g",{children:[(0,e.jsx)("path",{d:"M21.15,10.59l-9.38,10.02",stroke:"#136f63",fill:"none",strokeWidth:"3"}),(0,e.jsx)("path",{d:"M21.15,21.4v-10.81h-10.32",stroke:"#136f63",fill:"none",strokeWidth:"3"})]}),(0,e.jsx)("circle",{cx:"16",cy:"16",r:"15",stroke:"#136f63",fill:"none",strokeWidth:"3"})]})},edit:function({attributes:r,setAttributes:t}){const{align:s}=r;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o.BlockControls,{children:(0,e.jsx)(o.AlignmentToolbar,{value:s,onChange:r=>t({align:r})})}),(0,e.jsx)("div",{...(0,o.useBlockProps)({className:`cta-group cta-group--align-${s}`}),children:(0,e.jsx)(o.InnerBlocks,{allowedBlocks:["carhop-blocks/cta"],template:[["carhop-blocks/cta"]]})})]})},save:function({attributes:r}){const{align:t}=r;return(0,e.jsx)("div",{...o.useBlockProps.save({className:`cta-group cta-group--align-${t}`}),children:(0,e.jsx)(o.InnerBlocks.Content,{})})}})}},e={};function t(r){var s=e[r];if(void 0!==s)return s.exports;var n=e[r]={exports:{}};return o[r](n,n.exports,t),n.exports}t.m=o,r=[],t.O=(o,e,s,n)=>{if(!e){var l=1/0;for(h=0;h<r.length;h++){for(var[e,s,n]=r[h],i=!0,c=0;c<e.length;c++)(!1&n||l>=n)&&Object.keys(t.O).every(r=>t.O[r](e[c]))?e.splice(c--,1):(i=!1,n<l&&(l=n));if(i){r.splice(h--,1);var a=s();void 0!==a&&(o=a)}}return o}n=n||0;for(var h=r.length;h>0&&r[h-1][2]>n;h--)r[h]=r[h-1];r[h]=[e,s,n]},t.o=(r,o)=>Object.prototype.hasOwnProperty.call(r,o),(()=>{var r={1252:0,9276:0};t.O.j=o=>0===r[o];var o=(o,e)=>{var s,n,[l,i,c]=e,a=0;if(l.some(o=>0!==r[o])){for(s in i)t.o(i,s)&&(t.m[s]=i[s]);if(c)var h=c(t)}for(o&&o(e);a<l.length;a++)n=l[a],t.o(r,n)&&r[n]&&r[n][0](),r[n]=0;return t.O(h)},e=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];e.forEach(o.bind(null,0)),e.push=o.bind(null,e.push.bind(e))})();var s=t.O(void 0,[9276],()=>t(8903));s=t.O(s)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/cta-group/block.json":
/*!**********************************!*\
!*** ./src/cta-group/block.json ***!
\**********************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/cta-group","version":"0.1.0","title":"Groupe de CTA","category":"carhop-blocks","icon":"smiley","description":"Pour intégrer Un groupe de call to action","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"align":{"type":"string","default":"left"}}}');
/***/ }),
/***/ "./src/cta-group/edit.js":
/*!*******************************!*\
!*** ./src/cta-group/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/cta-group/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
}) {
const {
align
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.AlignmentToolbar, {
value: align,
onChange: value => setAttributes({
align: value
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: `cta-group cta-group--align-${align}`
}),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
allowedBlocks: ["carhop-blocks/cta"],
template: [["carhop-blocks/cta"]]
})
})]
});
}
/***/ }),
/***/ "./src/cta-group/editor.scss":
/*!***********************************!*\
!*** ./src/cta-group/editor.scss ***!
\***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/cta-group/index.js":
/*!********************************!*\
!*** ./src/cta-group/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/cta-group/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/cta-group/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/cta-group/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/cta-group/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__.jsxs)("svg", {
width: "32",
height: "32",
viewBox: "0 0 32 32",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("g", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
d: "M21.15,10.59l-9.38,10.02",
stroke: "#136f63",
fill: "none",
strokeWidth: "3"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
d: "M21.15,21.4v-10.81h-10.32",
stroke: "#136f63",
fill: "none",
strokeWidth: "3"
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("circle", {
cx: "16",
cy: "16",
r: "15",
stroke: "#136f63",
fill: "none",
strokeWidth: "3"
})]
})
},
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
});
/***/ }),
/***/ "./src/cta-group/save.js":
/*!*******************************!*\
!*** ./src/cta-group/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
}) {
const {
align
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: `cta-group cta-group--align-${align}`
}),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
});
}
/***/ }),
/***/ "./src/cta-group/style.scss":
/*!**********************************!*\
!*** ./src/cta-group/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 = {
/******/ "cta-group/index": 0,
/******/ "cta-group/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, ["cta-group/style-index"], () => (__webpack_require__("./src/cta-group/index.js")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -1 +1,28 @@
.cta-group{align-items:center;display:flex;flex-wrap:wrap;gap:2rem;justify-content:center;row-gap:1rem}@media(max-width:768px){.cta-group{row-gap:1.5rem}}.cta-group .wp-block-carhop-blocks-cta{margin:0!important}.cta-group--align-left{justify-content:flex-start}.cta-group--align-center{justify-content:center}.cta-group--align-right{justify-content:flex-end}
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/cta-group/style.scss ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.cta-group {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 2rem;
row-gap: 1rem;
}
@media (max-width: 768px) {
.cta-group {
row-gap: 1.5rem;
}
}
.cta-group .wp-block-carhop-blocks-cta {
margin: 0 !important;
}
.cta-group--align-left {
justify-content: flex-start;
}
.cta-group--align-center {
justify-content: center;
}
.cta-group--align-right {
justify-content: flex-end;
}

View File

@ -1 +1,30 @@
.cta-group{align-items:center;display:flex;flex-wrap:wrap;gap:2rem;justify-content:center;row-gap:1rem}@media(max-width:768px){.cta-group{row-gap:1.5rem}}.cta-group .wp-block-carhop-blocks-cta{margin:0!important}.cta-group--align-left{justify-content:flex-start}.cta-group--align-center{justify-content:center}.cta-group--align-right{justify-content:flex-end}
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/cta-group/style.scss ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.cta-group {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 2rem;
row-gap: 1rem;
}
@media (max-width: 768px) {
.cta-group {
row-gap: 1.5rem;
}
}
.cta-group .wp-block-carhop-blocks-cta {
margin: 0 !important;
}
.cta-group--align-left {
justify-content: flex-start;
}
.cta-group--align-center {
justify-content: center;
}
.cta-group--align-right {
justify-content: flex-end;
}
/*# sourceMappingURL=style-index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"cta-group/style-index.css","mappings":";;;AAAA;EACC;EACA;EACA;EACA;EACA;EACA;AACD;AACC;EARD;IASE;EAEA;AACF;AAAC;EACC;AAEF;AACC;EACC;AACF;AAEC;EACC;AAAF;AAGC;EACC;AADF,C","sources":["webpack://carhop-blocks/./src/cta-group/style.scss"],"sourcesContent":[".cta-group {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: center;\n\talign-items: center;\n\tgap: 2rem;\n\trow-gap: 1rem;\n\n\t@media (max-width: 768px) {\n\t\trow-gap: 1.5rem;\n\t}\n\n\t.wp-block-carhop-blocks-cta {\n\t\tmargin: 0 !important;\n\t}\n\n\t&--align-left {\n\t\tjustify-content: flex-start;\n\t}\n\n\t&--align-center {\n\t\tjustify-content: center;\n\t}\n\n\t&--align-right {\n\t\tjustify-content: flex-end;\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '31d6cfe0d16ae931b73c');
<?php return array('dependencies' => array(), 'version' => 'ccd49c9bbe6df7667cf6');

View File

@ -0,0 +1,7 @@
/******/ (() => { // webpackBootstrap
/*!*******************************!*\
!*** ./src/cta-group/view.js ***!
\*******************************/
/******/ })()
;

View File

@ -1 +1,35 @@
.wp-block-carhop-blocks-cta a{color:var(--cta-current-color)!important;margin-bottom:0!important;padding-bottom:0!important}.wp-block-carhop-blocks-cta{align-items:center;display:flex!important;gap:10px;line-height:normal;padding:2px;width:-moz-fit-content;width:fit-content}.wp-block-carhop-blocks-cta .icon svg{height:30px;width:30px}.wp-block-carhop-blocks-cta .icon svg circle,.wp-block-carhop-blocks-cta .icon svg path{stroke:currentColor}.wp-block-carhop-blocks-cta.align--left{margin-right:0}.wp-block-carhop-blocks-cta.align--right{margin-right:auto;margin-left:0}.wp-block-carhop-blocks-cta.align--center{margin:0 auto}
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/cta/editor.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta a {
color: var(--cta-current-color) !important;
padding-bottom: 0 !important;
margin-bottom: 0 !important;
}
.wp-block-carhop-blocks-cta {
padding: 2px;
width: -moz-fit-content;
width: fit-content;
display: flex !important;
align-items: center;
gap: 10px;
line-height: normal;
}
.wp-block-carhop-blocks-cta .icon svg {
width: 30px;
height: 30px;
}
.wp-block-carhop-blocks-cta .icon svg path,
.wp-block-carhop-blocks-cta .icon svg circle {
stroke: currentColor;
}
.wp-block-carhop-blocks-cta.align--left {
margin-right: 0;
}
.wp-block-carhop-blocks-cta.align--right {
margin-left: 0;
margin-right: auto;
}
.wp-block-carhop-blocks-cta.align--center {
margin: 0 auto;
}

View File

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

View File

@ -1 +1,37 @@
.wp-block-carhop-blocks-cta a{color:var(--cta-current-color)!important;margin-bottom:0!important;padding-bottom:0!important}.wp-block-carhop-blocks-cta{align-items:center;display:flex!important;gap:10px;line-height:normal;padding:2px;width:-moz-fit-content;width:fit-content}.wp-block-carhop-blocks-cta .icon svg{height:30px;width:30px}.wp-block-carhop-blocks-cta .icon svg circle,.wp-block-carhop-blocks-cta .icon svg path{stroke:currentColor}.wp-block-carhop-blocks-cta.align--left{margin-left:0}.wp-block-carhop-blocks-cta.align--right{margin-left:auto;margin-right:0}.wp-block-carhop-blocks-cta.align--center{margin:0 auto}
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/cta/editor.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta a {
color: var(--cta-current-color) !important;
padding-bottom: 0 !important;
margin-bottom: 0 !important;
}
.wp-block-carhop-blocks-cta {
padding: 2px;
width: -moz-fit-content;
width: fit-content;
display: flex !important;
align-items: center;
gap: 10px;
line-height: normal;
}
.wp-block-carhop-blocks-cta .icon svg {
width: 30px;
height: 30px;
}
.wp-block-carhop-blocks-cta .icon svg path,
.wp-block-carhop-blocks-cta .icon svg circle {
stroke: currentColor;
}
.wp-block-carhop-blocks-cta.align--left {
margin-left: 0;
}
.wp-block-carhop-blocks-cta.align--right {
margin-right: 0;
margin-left: auto;
}
.wp-block-carhop-blocks-cta.align--center {
margin: 0 auto;
}
/*# sourceMappingURL=index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"cta/index.css","mappings":";;;AAEC;EACC;EACA;EACA;AADF;AAJA;EAOC;EAEA;EAAA;EACA;EACA;EACA;EACA;AADD;AAIE;EACC;EACA;AAFH;AAIE;;EAEC;AAFH;AAOC;EACC;AALF;AAOC;EACC;EACA;AALF;AAOC;EACC;AALF,C","sources":["webpack://carhop-blocks/./src/cta/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\t// color: var(--cta-current-color);\n\ta {\n\t\tcolor: var(--cta-current-color) !important;\n\t\tpadding-bottom: 0 !important;\n\t\tmargin-bottom: 0 !important;\n\t}\n\tpadding: 2px;\n\n\twidth: fit-content;\n\tdisplay: flex !important;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tstroke: currentColor;\n\t\t\t// stroke: var(--cta-current-color);\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1,552 @@
(()=>{"use strict";var e,r={2841:()=>{const e=window.wp.blocks,r=(window.wp.i18n,window.wp.blockEditor),t=window.wp.components,n=window.React;var o,l;function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i.apply(null,arguments)}var s,a,c=function(e){return n.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 32 32"},e),o||(o=n.createElement("g",{fill:"none",stroke:"currentColor",strokeWidth:2},n.createElement("path",{d:"m21.15 10.59-9.38 10.02M21.15 21.4V10.59H10.83"}))),l||(l=n.createElement("circle",{cx:16,cy:16,r:15,fill:"none",stroke:"currentColor",strokeWidth:2})))};function h(){return h=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},h.apply(null,arguments)}var u=function(e){return n.createElement("svg",h({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 32 32"},e),s||(s=n.createElement("circle",{cx:16,cy:16,r:15,fill:"none",stroke:"currentColor",strokeWidth:2})),a||(a=n.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 9v11m-5-3 5 6 5-6"})))};const d=window.ReactJSXRuntime,p=JSON.parse('{"UU":"carhop-blocks/cta"}');(0,e.registerBlockType)(p.UU,{icon:{src:(0,d.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",children:[(0,d.jsxs)("g",{children:[(0,d.jsx)("path",{d:"M21.15,10.59l-9.38,10.02",stroke:"#136f63",fill:"none",strokeWidth:"3"}),(0,d.jsx)("path",{d:"M21.15,21.4v-10.81h-10.32",stroke:"#136f63",fill:"none",strokeWidth:"3"})]}),(0,d.jsx)("circle",{cx:"16",cy:"16",r:"15",stroke:"#136f63",fill:"none",strokeWidth:"3"})]})},edit:function({attributes:e,setAttributes:n}){const{color:o,link:l}=e,i=(0,r.useSetting)("color.palette.theme"),s="string"==typeof l?.url&&l.url.startsWith("#");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r.BlockControls,{children:(0,d.jsx)(r.AlignmentToolbar,{value:e.align,onChange:e=>n({align:e})})}),(0,d.jsx)(r.InspectorControls,{children:(0,d.jsxs)(t.PanelBody,{title:"Lien",initialOpen:!0,children:[(0,d.jsx)("div",{children:(0,d.jsx)(r.__experimentalLinkControl,{value:e.link,label:"Lien",onSelect:e=>{},onChange:e=>{var r;(r=e)?(r.url&&(r.title=r.url),n({link:r})):n({link:void 0})}},"link-control")}),(0,d.jsx)(t.PanelBody,{title:"Couleur",initialOpen:!0,children:(0,d.jsx)(t.PanelRow,{children:(0,d.jsx)(t.ColorPalette,{value:o,onChange:e=>{!function(e){n({color:e})}(e)},colors:i,disableCustomColors:!0})})})]})}),(0,d.jsxs)("div",{...(0,r.useBlockProps)({className:`cta align--${e.align}${s?" cta--hash-link":""}`,style:{"--cta-current-color":o}}),children:[(0,d.jsx)(r.RichText,{tagName:"a",placeholder:"Ajouter un lien",value:e.text,onChange:e=>n({text:e}),allowedFormats:[]}),s?(0,d.jsx)(u,{style:{color:o}}):(0,d.jsx)(c,{style:{color:o}})]})]})},save:function({attributes:e}){}})}},t={};function n(e){var o=t[e];if(void 0!==o)return o.exports;var l=t[e]={exports:{}};return r[e](l,l.exports,n),l.exports}n.m=r,e=[],n.O=(r,t,o,l)=>{if(!t){var i=1/0;for(h=0;h<e.length;h++){for(var[t,o,l]=e[h],s=!0,a=0;a<t.length;a++)(!1&l||i>=l)&&Object.keys(n.O).every(e=>n.O[e](t[a]))?t.splice(a--,1):(s=!1,l<i&&(i=l));if(s){e.splice(h--,1);var c=o();void 0!==c&&(r=c)}}return r}l=l||0;for(var h=e.length;h>0&&e[h-1][2]>l;h--)e[h]=e[h-1];e[h]=[t,o,l]},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={7010:0,3350:0};n.O.j=r=>0===e[r];var r=(r,t)=>{var o,l,[i,s,a]=t,c=0;if(i.some(r=>0!==e[r])){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(a)var h=a(n)}for(r&&r(t);c<i.length;c++)l=i[c],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(h)},t=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var o=n.O(void 0,[3350],()=>n(2841));o=n.O(o)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/cta/block.json":
/*!****************************!*\
!*** ./src/cta/block.json ***!
\****************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/cta","version":"0.1.0","title":"Cta","category":"carhop-blocks","icon":"smiley","description":"Un bouton de lien","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":{"text":{"type":"string","default":"Call to action"},"link":{"type":"object"},"align":{"type":"string","default":"left"},"color":{"type":"string","default":null}}}');
/***/ }),
/***/ "./src/cta/edit.js":
/*!*************************!*\
!*** ./src/cta/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 _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/cta/editor.scss");
/* harmony import */ var _img_carhop_fleche_lien_externe_full_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./img/carhop-fleche-lien-externe-full.svg */ "./src/cta/img/carhop-fleche-lien-externe-full.svg");
/* harmony import */ var _img_carhop_fleche_ancre_page_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./img/carhop-fleche-ancre-page.svg */ "./src/cta/img/carhop-fleche-ancre-page.svg");
/* 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__);
function Edit({
attributes,
setAttributes
}) {
const {
color,
link
} = attributes;
const colors = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useSetting)("color.palette.theme");
const isHashLink = typeof link?.url === "string" && link.url.startsWith("#");
function handleColorChange(value) {
setAttributes({
color: value
});
}
function handleLinkChange(newLink) {
if (!newLink) {
setAttributes({
link: undefined
});
return;
}
if (newLink.url) {
newLink.title = newLink.url;
}
setAttributes({
link: newLink
});
}
return /*#__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__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.AlignmentToolbar, {
value: attributes.align,
onChange: value => setAttributes({
align: value
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
title: "Lien",
initialOpen: true,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.__experimentalLinkControl, {
value: attributes.link,
label: "Lien",
onSelect: value => {},
onChange: newlink => {
handleLinkChange(newlink);
}
}, "link-control")
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
title: "Couleur",
initialOpen: true,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ColorPalette, {
value: color,
onChange: value => {
handleColorChange(value);
},
colors: colors,
disableCustomColors: true
})
})
})]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: `cta align--${attributes.align}${isHashLink ? " cta--hash-link" : ""}`,
style: {
"--cta-current-color": color
}
}),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
tagName: "a",
placeholder: "Ajouter un lien",
value: attributes.text,
onChange: text => setAttributes({
text
}),
allowedFormats: []
}), isHashLink ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_img_carhop_fleche_ancre_page_svg__WEBPACK_IMPORTED_MODULE_5__.ReactComponent, {
style: {
color
}
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_img_carhop_fleche_lien_externe_full_svg__WEBPACK_IMPORTED_MODULE_4__.ReactComponent, {
style: {
color
}
})]
})]
});
}
/***/ }),
/***/ "./src/cta/editor.scss":
/*!*****************************!*\
!*** ./src/cta/editor.scss ***!
\*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/cta/img/carhop-fleche-ancre-page.svg":
/*!**************************************************!*\
!*** ./src/cta/img/carhop-fleche-ancre-page.svg ***!
\**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ ReactComponent: () => (/* binding */ SvgCarhopFlecheAncrePage),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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__);
var _circle, _path;
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
var SvgCarhopFlecheAncrePage = function SvgCarhopFlecheAncrePage(props) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
xmlns: "http://www.w3.org/2000/svg",
"aria-hidden": "true",
viewBox: "0 0 32 32"
}, props), _circle || (_circle = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("circle", {
cx: 16,
cy: 16,
r: 15,
fill: "none",
stroke: "currentColor",
strokeWidth: 2
})), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
fill: "none",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 2,
d: "M16 9v11m-5-3 5 6 5-6"
})));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgZm9jdXNhYmxlPSJmYWxzZSIgYXJpYS1oaWRkZW49InRydWUiPg0KCTxjaXJjbGUgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgY3g9IjE2IiBjeT0iMTYiIHI9IjE1Ii8+DQoJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTYgOXYxMU0xMSAxN2w1IDYgNS02Ii8+DQo8L3N2Zz4NCg==");
/***/ }),
/***/ "./src/cta/img/carhop-fleche-lien-externe-full.svg":
/*!*********************************************************!*\
!*** ./src/cta/img/carhop-fleche-lien-externe-full.svg ***!
\*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ ReactComponent: () => (/* binding */ SvgCarhopFlecheLienExterneFull),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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__);
var _g, _circle;
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
var SvgCarhopFlecheLienExterneFull = function SvgCarhopFlecheLienExterneFull(props) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
xmlns: "http://www.w3.org/2000/svg",
"aria-hidden": "true",
viewBox: "0 0 32 32"
}, props), _g || (_g = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("g", {
fill: "none",
stroke: "currentColor",
strokeWidth: 2
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
d: "m21.15 10.59-9.38 10.02M21.15 21.4V10.59H10.83"
}))), _circle || (_circle = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("circle", {
cx: 16,
cy: 16,
r: 15,
fill: "none",
stroke: "currentColor",
strokeWidth: 2
})));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgZm9jdXNhYmxlPSJmYWxzZSIgYXJpYS1oaWRkZW49InRydWUiPgoJPGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiI+CgkJPHBhdGggZD0iTTIxLjE1LDEwLjU5bC05LjM4LDEwLjAyIi8+CgkJPHBhdGggZD0iTTIxLjE1LDIxLjR2LTEwLjgxaC0xMC4zMiIvPgoJPC9nPgoJPGNpcmNsZSBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiLz4KPC9zdmc+Cg==");
/***/ }),
/***/ "./src/cta/index.js":
/*!**************************!*\
!*** ./src/cta/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/cta/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/cta/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/cta/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/cta/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__.jsxs)("svg", {
width: "32",
height: "32",
viewBox: "0 0 32 32",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("g", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
d: "M21.15,10.59l-9.38,10.02",
stroke: "#136f63",
fill: "none",
strokeWidth: "3"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
d: "M21.15,21.4v-10.81h-10.32",
stroke: "#136f63",
fill: "none",
strokeWidth: "3"
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("circle", {
cx: "16",
cy: "16",
r: "15",
stroke: "#136f63",
fill: "none",
strokeWidth: "3"
})]
})
},
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
});
/***/ }),
/***/ "./src/cta/save.js":
/*!*************************!*\
!*** ./src/cta/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 _img_carhop_fleche_lien_externe_full_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./img/carhop-fleche-lien-externe-full.svg */ "./src/cta/img/carhop-fleche-lien-externe-full.svg");
function save({
attributes
}) {
return;
}
/***/ }),
/***/ "./src/cta/style.scss":
/*!****************************!*\
!*** ./src/cta/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/components":
/*!************************************!*\
!*** external ["wp","components"] ***!
\************************************/
/***/ ((module) => {
module.exports = window["wp"]["components"];
/***/ }),
/***/ "@wordpress/i18n":
/*!******************************!*\
!*** external ["wp","i18n"] ***!
\******************************/
/***/ ((module) => {
module.exports = window["wp"]["i18n"];
/***/ }),
/***/ "react":
/*!************************!*\
!*** external "React" ***!
\************************/
/***/ ((module) => {
module.exports = window["React"];
/***/ }),
/***/ "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 = {
/******/ "cta/index": 0,
/******/ "cta/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, ["cta/style-index"], () => (__webpack_require__("./src/cta/index.js")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -1 +1,39 @@
.wp-block-carhop-blocks-cta{align-items:center;color:var(--cta-current-color,currentColor);display:block;display:flex;font-weight:600;gap:10px;line-height:normal;margin-top:20px;padding:2px;width:-moz-fit-content;width:fit-content}.wp-block-carhop-blocks-cta a{text-decoration:none}.wp-block-carhop-blocks-cta .icon svg{height:30px;width:30px}.wp-block-carhop-blocks-cta .icon svg circle,.wp-block-carhop-blocks-cta .icon svg path{fill:transparent;stroke:var(--cta-current-color);stroke-width:2}.wp-block-carhop-blocks-cta.align--left{margin-right:0}.wp-block-carhop-blocks-cta.align--right{margin-right:auto;margin-left:0}.wp-block-carhop-blocks-cta.align--center{margin:0 auto}
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/cta/style.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta {
margin-top: 20px;
color: var(--cta-current-color, currentColor);
padding: 2px;
display: block;
width: -moz-fit-content;
width: fit-content;
display: flex;
align-items: center;
gap: 10px;
line-height: normal;
font-weight: 600;
}
.wp-block-carhop-blocks-cta a {
text-decoration: none;
}
.wp-block-carhop-blocks-cta .icon svg {
width: 30px;
height: 30px;
}
.wp-block-carhop-blocks-cta .icon svg path,
.wp-block-carhop-blocks-cta .icon svg circle {
fill: transparent;
stroke: var(--cta-current-color);
stroke-width: 2;
}
.wp-block-carhop-blocks-cta.align--left {
margin-right: 0;
}
.wp-block-carhop-blocks-cta.align--right {
margin-left: 0;
margin-right: auto;
}
.wp-block-carhop-blocks-cta.align--center {
margin: 0 auto;
}

View File

@ -1 +1,41 @@
.wp-block-carhop-blocks-cta{align-items:center;color:var(--cta-current-color,currentColor);display:block;display:flex;font-weight:600;gap:10px;line-height:normal;margin-top:20px;padding:2px;width:-moz-fit-content;width:fit-content}.wp-block-carhop-blocks-cta a{text-decoration:none}.wp-block-carhop-blocks-cta .icon svg{height:30px;width:30px}.wp-block-carhop-blocks-cta .icon svg circle,.wp-block-carhop-blocks-cta .icon svg path{fill:transparent;stroke:var(--cta-current-color);stroke-width:2}.wp-block-carhop-blocks-cta.align--left{margin-left:0}.wp-block-carhop-blocks-cta.align--right{margin-left:auto;margin-right:0}.wp-block-carhop-blocks-cta.align--center{margin:0 auto}
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/cta/style.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta {
margin-top: 20px;
color: var(--cta-current-color, currentColor);
padding: 2px;
display: block;
width: -moz-fit-content;
width: fit-content;
display: flex;
align-items: center;
gap: 10px;
line-height: normal;
font-weight: 600;
}
.wp-block-carhop-blocks-cta a {
text-decoration: none;
}
.wp-block-carhop-blocks-cta .icon svg {
width: 30px;
height: 30px;
}
.wp-block-carhop-blocks-cta .icon svg path,
.wp-block-carhop-blocks-cta .icon svg circle {
fill: transparent;
stroke: var(--cta-current-color);
stroke-width: 2;
}
.wp-block-carhop-blocks-cta.align--left {
margin-left: 0;
}
.wp-block-carhop-blocks-cta.align--right {
margin-right: 0;
margin-left: auto;
}
.wp-block-carhop-blocks-cta.align--center {
margin: 0 auto;
}
/*# sourceMappingURL=style-index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"cta/style-index.css","mappings":";;;AAAA;EACC;EACA;EAEA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;EAEA;AADD;AAGC;EACC;AADF;AAIE;EACC;EACA;AAFH;AAIE;;EAEC;EACA;EACA;AAFH;AAMC;EACC;AAJF;AAMC;EACC;EACA;AAJF;AAMC;EACC;AAJF,C","sources":["webpack://carhop-blocks/./src/cta/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tmargin-top: 20px;\n\tcolor: var(--cta-current-color, currentColor);\n\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\tfont-weight: 600;\n\n\ta {\n\t\ttext-decoration: none;\n\t}\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tfill: transparent;\n\t\t\tstroke: var(--cta-current-color);\n\t\t\tstroke-width: 2;\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '31d6cfe0d16ae931b73c');
<?php return array('dependencies' => array(), 'version' => 'ad0dec3bccf0322bf235');

Some files were not shown because too many files have changed in this diff Show More