Compare commits

...

8 Commits

Author SHA1 Message Date
Antoine M
f049f853f0 FEATURE Adding CTA and CTA group blocks to chapter section editor
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-04 16:59:28 +01:00
Antoine M
7a1d6087e7 FEATURE Adding new block types to the content box editor 2025-12-04 16:58:37 +01:00
Antoine M
0e6a01205f FEATURE handlign a cover ratio variant 2025-12-04 16:58:11 +01:00
Antoine M
bf417b4e59 FEATURE temporarely keeping this demonsrtration block 2025-12-04 16:57:48 +01:00
Antoine M
d99a296280 FEATURE ibntroducing the story timeline blocks 2025-12-04 16:57:09 +01:00
Antoine M
61503f2753 FEATURE Adding numbering variant 2025-12-04 16:56:05 +01:00
Antoine M
6b1a2ba54e rebuilding 2025-12-04 16:55:11 +01:00
Antoine M
d3095286b7 FEATURE Introducing timeline and timline-step blocks 2025-12-04 16:54:40 +01:00
136 changed files with 6046 additions and 51 deletions

View File

@ -242,6 +242,77 @@ return array(
'postId'
)
),
'company-timeline' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'telex/block-company-timeline',
'version' => '0.1.0',
'title' => 'Company Timeline',
'category' => 'design',
'icon' => 'calendar-alt',
'description' => 'Display company milestones with a fixed sidebar navigation and scroll-based highlighting',
'keywords' => array(
'timeline',
'history',
'milestones',
'chronology',
'events'
),
'attributes' => array(
'entries' => array(
'type' => 'array',
'default' => array(
array(
'year' => '2020',
'title' => 'Company Founded',
'description' => 'Our journey began with a vision to make a difference.',
'imageUrl' => '',
'imageId' => 0
)
)
)
),
'example' => array(
'attributes' => array(
'entries' => array(
array(
'year' => '2010',
'title' => 'The Beginning',
'description' => 'Founded with a mission to innovate.',
'imageUrl' => '',
'imageId' => 0
),
array(
'year' => '2015',
'title' => 'Major Milestone',
'description' => 'Reached 1 million customers worldwide.',
'imageUrl' => '',
'imageId' => 0
),
array(
'year' => '2020',
'title' => 'Global Expansion',
'description' => 'Opened offices in 25 countries.',
'imageUrl' => '',
'imageId' => 0
)
)
)
),
'supports' => array(
'html' => false,
'anchor' => true,
'align' => array(
'wide',
'full'
)
),
'textdomain' => 'company-timeline',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'viewScript' => 'file:./view.js'
),
'content-box' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
@ -528,6 +599,125 @@ return array(
)
)
),
'highlight-timeline' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'carhop-blocks/highlight-timeline',
'version' => '0.1.0',
'title' => 'Highlight Timeline',
'category' => 'carhop-blocks',
'icon' => 'smiley',
'description' => 'Highlight Timeline pour la mise en forme d\'une timeline avec des éléments en surbrillance',
'example' => array(
),
'supports' => array(
'html' => false
),
'textdomain' => 'highlight-timeline',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'viewScript' => 'file:./view.js',
'render' => 'file:./render.php'
),
'highlight-timeline-step' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'carhop-blocks/highlight-timeline-step',
'version' => '0.1.0',
'title' => 'Étape de timeline',
'category' => 'carhop-blocks',
'icon' => 'calendar',
'description' => 'Étape de timeline pour la mise en forme d\'une étape de timeline',
'example' => array(
),
'parent' => array(
'carhop-blocks/highlight-timeline'
),
'supports' => array(
'html' => false
),
'textdomain' => 'carhop-blocks',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'viewScript' => 'file:./view.js',
'attributes' => array(
'year' => array(
'type' => 'number',
'default' => 2025
)
)
),
'image-stack' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'carhop-blocks/image-stack',
'version' => '0.1.0',
'title' => 'Image Stack (Focal Point)',
'category' => 'carhop-blocks',
'icon' => 'images-alt2',
'description' => 'Layer multiple images with individual focal point positioning.',
'example' => array(
'attributes' => array(
'images' => array(
array(
'id' => 1,
'url' => 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4',
'alt' => 'Mountain landscape',
'focalPoint' => array(
'x' => 0.5,
'y' => 0.3
),
'scale' => 0.8
),
array(
'id' => 2,
'url' => 'https://images.unsplash.com/photo-1511884642898-4c92249e20b6',
'alt' => 'Forest scene',
'focalPoint' => array(
'x' => 0.7,
'y' => 0.6
),
'scale' => 0.6
)
),
'height' => 400
)
),
'attributes' => array(
'images' => array(
'type' => 'array',
'default' => array(
),
'items' => array(
'type' => 'object'
)
),
'height' => array(
'type' => 'number',
'default' => 400
)
),
'supports' => array(
'html' => false,
'align' => array(
'wide',
'full'
),
'spacing' => array(
'margin' => true,
'padding' => true
)
),
'textdomain' => 'image-stack',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css'
),
'latest-news' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
@ -597,6 +787,22 @@ return array(
'type' => 'boolean',
'default' => true
),
'aspectRatio' => array(
'type' => 'string',
'default' => 'auto',
'enum' => array(
'auto',
'1/1',
'4/3',
'3/4',
'3/2',
'2/3',
'16/9',
'21/9',
'9/16',
'9/21'
)
),
'coverPosition' => array(
'type' => 'string',
'default' => 'right',
@ -712,7 +918,65 @@ return array(
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'viewScript' => 'file:./view.js'
'viewScript' => 'file:./view.js',
'attributes' => array(
'hasNumbering' => array(
'type' => 'boolean',
'default' => false
)
)
),
'story-timeline' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'carhop-blocks/story-timeline',
'version' => '0.1.0',
'title' => 'Timeline',
'category' => 'carhop-blocks',
'icon' => 'calendar-alt',
'description' => 'Boite de timeline pour la mise en forme d\'une timeline',
'example' => array(
),
'supports' => array(
'html' => false
),
'textdomain' => 'carhop-blocks',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'viewScript' => 'file:./view.js',
'render' => 'file:./render.php'
),
'story-timeline-step' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'carhop-blocks/story-timeline-step',
'version' => '0.1.0',
'title' => 'Étape de timeline',
'category' => 'carhop-blocks',
'icon' => 'calendar',
'description' => 'Étape de timeline pour la mise en forme d\'une étape de timeline',
'example' => array(
),
'parent' => array(
'carhop-blocks/story-timeline'
),
'supports' => array(
'html' => false
),
'textdomain' => 'carhop-blocks',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'viewScript' => 'file:./view.js',
'attributes' => array(
'year' => array(
'type' => 'number',
'default' => 2025
)
)
),
'subscribe-infolettre' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',

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' => '20310519f99c6d7fbfc4');
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => 'e29ac5fb21b7bc27f5c0');

View File

@ -390,7 +390,7 @@ function Edit({
placeholder: "Chapter Title",
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue augue, sagittis quis mauris in, consequat vehicula est. Aliquam quis nulla ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras bibendum eget lorem eget aliquet. Fusce vel consequat neque. "
}]],
allowedBlocks: ["core/heading", "core/paragraph", "core/list", "core/button", "core/buttons", "carhop-blocks/cta", "carhop-blocks/heading"]
allowedBlocks: ["core/heading", "core/paragraph", "core/list", "core/button", "core/buttons", "carhop-blocks/heading", "carhop-blocks/cta", "carhop-blocks/cta-group"]
})
})
}), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("img", {
@ -502,7 +502,7 @@ function save({
className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} chapter-section--${blockVariant}
${blockWidth === "full" ? "chapter-section--width-full" : "chapter-section--width-contained"}
${hasLightBackground ? "chapter-section--bg-light" : "chapter-section--bg-dark"}`,
${hasLightBackground ? "chapter-section--bg-light" : " "}`,
style: {
"--chapter-section-text-color": textColor ? textColor : "#136f63",
"--cta-current-color": blockVariant === "backgrounded" ? "inherit" : "var(--wp--preset--color--primary) !important"

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,71 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "telex/block-company-timeline",
"version": "0.1.0",
"title": "Company Timeline",
"category": "design",
"icon": "calendar-alt",
"description": "Display company milestones with a fixed sidebar navigation and scroll-based highlighting",
"keywords": [
"timeline",
"history",
"milestones",
"chronology",
"events"
],
"attributes": {
"entries": {
"type": "array",
"default": [
{
"year": "2020",
"title": "Company Founded",
"description": "Our journey began with a vision to make a difference.",
"imageUrl": "",
"imageId": 0
}
]
}
},
"example": {
"attributes": {
"entries": [
{
"year": "2010",
"title": "The Beginning",
"description": "Founded with a mission to innovate.",
"imageUrl": "",
"imageId": 0
},
{
"year": "2015",
"title": "Major Milestone",
"description": "Reached 1 million customers worldwide.",
"imageUrl": "",
"imageId": 0
},
{
"year": "2020",
"title": "Global Expansion",
"description": "Opened offices in 25 countries.",
"imageUrl": "",
"imageId": 0
}
]
}
},
"supports": {
"html": false,
"anchor": true,
"align": [
"wide",
"full"
]
},
"textdomain": "company-timeline",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js"
}

View File

@ -0,0 +1,28 @@
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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

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

View File

@ -0,0 +1,30 @@
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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":""}

View File

@ -0,0 +1,603 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/company-timeline/block.json":
/*!*****************************************!*\
!*** ./src/company-timeline/block.json ***!
\*****************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"telex/block-company-timeline","version":"0.1.0","title":"Company Timeline","category":"design","icon":"calendar-alt","description":"Display company milestones with a fixed sidebar navigation and scroll-based highlighting","keywords":["timeline","history","milestones","chronology","events"],"attributes":{"entries":{"type":"array","default":[{"year":"2020","title":"Company Founded","description":"Our journey began with a vision to make a difference.","imageUrl":"","imageId":0}]}},"example":{"attributes":{"entries":[{"year":"2010","title":"The Beginning","description":"Founded with a mission to innovate.","imageUrl":"","imageId":0},{"year":"2015","title":"Major Milestone","description":"Reached 1 million customers worldwide.","imageUrl":"","imageId":0},{"year":"2020","title":"Global Expansion","description":"Opened offices in 25 countries.","imageUrl":"","imageId":0}]}},"supports":{"html":false,"anchor":true,"align":["wide","full"]},"textdomain":"company-timeline","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');
/***/ }),
/***/ "./src/company-timeline/edit.js":
/*!**************************************!*\
!*** ./src/company-timeline/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 _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/company-timeline/editor.scss");
/* 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
}) {
const {
entries
} = attributes;
const [selectedYear, setSelectedYear] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(null);
const addEntry = () => {
const newEntries = [...entries, {
year: new Date().getFullYear().toString(),
title: "",
description: "",
imageUrl: "",
imageId: 0
}];
setAttributes({
entries: newEntries
});
};
const updateEntry = (index, field, value) => {
const newEntries = [...entries];
newEntries[index] = {
...newEntries[index],
[field]: value
};
setAttributes({
entries: newEntries
});
};
const removeEntry = index => {
const newEntries = entries.filter((_, i) => i !== index);
setAttributes({
entries: newEntries
});
};
const sortedEntries = [...entries].sort((a, b) => parseInt(a.year) - parseInt(b.year));
const years = [...new Set(sortedEntries.map(entry => entry.year))];
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__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Timeline Entries", "company-timeline"),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
variant: "primary",
onClick: addEntry,
style: {
marginBottom: "16px"
},
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Add Timeline Entry", "company-timeline")
}), sortedEntries.map((entry, index) => {
const originalIndex = entries.findIndex(e => e.year === entry.year && e.title === entry.title && e.description === entry.description);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Card, {
style: {
marginBottom: "12px"
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CardHeader, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("strong", {
children: entry.year || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("New Entry", "company-timeline")
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CardBody, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Year", "company-timeline"),
value: entry.year,
onChange: value => updateEntry(originalIndex, "year", value),
type: "number"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
isDestructive: true,
onClick: () => removeEntry(originalIndex),
style: {
marginTop: "8px"
},
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Remove Entry", "company-timeline")
})]
})]
}, index);
})]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)(),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
className: "wp-block-telex-company-timeline",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
className: "timeline-sidebar",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
className: "timeline-years",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("h3", {
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Timeline", "company-timeline")
}), years.map(year => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("button", {
className: `year-link ${selectedYear === year ? "active" : ""}`,
onClick: () => setSelectedYear(year),
children: year
}, year))]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
className: "timeline-content",
children: sortedEntries.map((entry, index) => {
const originalIndex = entries.findIndex(e => e.year === entry.year && e.title === entry.title && e.description === entry.description);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
className: "timeline-entry",
"data-year": entry.year,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
className: "timeline-year-marker",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("h2", {
children: entry.year
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
className: "timeline-entry-content",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
tagName: "h3",
value: entry.title,
onChange: value => updateEntry(originalIndex, "title", value),
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Enter milestone title...", "company-timeline"),
className: "timeline-title"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
tagName: "p",
value: entry.description,
onChange: value => updateEntry(originalIndex, "description", value),
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Enter milestone description...", "company-timeline"),
className: "timeline-description"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaUploadCheck, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaUpload, {
onSelect: media => {
updateEntry(originalIndex, "imageUrl", media.url);
updateEntry(originalIndex, "imageId", media.id);
},
allowedTypes: ["image"],
value: entry.imageId,
render: ({
open
}) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
className: "timeline-media",
children: entry.imageUrl ? /*#__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)("img", {
src: entry.imageUrl,
alt: entry.title
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
isDestructive: true,
onClick: () => {
updateEntry(originalIndex, "imageUrl", "");
updateEntry(originalIndex, "imageId", 0);
},
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Remove Image", "company-timeline")
})]
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
onClick: open,
variant: "secondary",
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Add Image", "company-timeline")
})
})
})
})]
})]
}, index);
})
})]
})
})]
});
}
/***/ }),
/***/ "./src/company-timeline/editor.scss":
/*!******************************************!*\
!*** ./src/company-timeline/editor.scss ***!
\******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/company-timeline/index.js":
/*!***************************************!*\
!*** ./src/company-timeline/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/company-timeline/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/company-timeline/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/company-timeline/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/company-timeline/block.json");
/**
* Registers a new block provided a unique name and an object defining its behavior.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
*/
/**
* Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
* All files containing `style` keyword are bundled together. The code used
* gets applied both to the front of your site and to the editor.
*
* @see https://www.npmjs.com/package/@wordpress/scripts#using-css
*/
/**
* Internal dependencies
*/
/**
* Every block starts by registering a new block type definition.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
*/
(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/company-timeline/save.js":
/*!**************************************!*\
!*** ./src/company-timeline/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__);
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
*/
/**
* The save function defines the way in which the different attributes should
* be combined into the final markup, which is then serialized by the block
* editor into `post_content`.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save
*
* @param {Object} props Block properties
* @return {Element} Element to render.
*/
function save({
attributes
}) {
const {
entries
} = attributes;
const sortedEntries = [...entries].sort((a, b) => parseInt(a.year) - parseInt(b.year));
const years = [...new Set(sortedEntries.map(entry => entry.year))];
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save(),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
className: "wp-block-telex-company-timeline",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "timeline-sidebar",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
className: "timeline-years",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h3", {
children: "Timeline"
}), years.map(year => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a", {
href: `#year-${year}`,
className: "year-link",
"data-year": year,
children: year
}, year))]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "timeline-content",
children: sortedEntries.map((entry, index) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
className: "timeline-entry",
id: `year-${entry.year}`,
"data-year": entry.year,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "timeline-year-marker",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h2", {
children: entry.year
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
className: "timeline-entry-content",
children: [entry.title && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.RichText.Content, {
tagName: "h3",
value: entry.title,
className: "timeline-title"
}), entry.description && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.RichText.Content, {
tagName: "p",
value: entry.description,
className: "timeline-description"
}), entry.imageUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "timeline-media",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img", {
src: entry.imageUrl,
alt: entry.title || ''
})
})]
})]
}, index))
})]
})
});
}
/***/ }),
/***/ "./src/company-timeline/style.scss":
/*!*****************************************!*\
!*** ./src/company-timeline/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/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 = {
/******/ "company-timeline/index": 0,
/******/ "company-timeline/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, ["company-timeline/style-index"], () => (__webpack_require__("./src/company-timeline/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

@ -0,0 +1,172 @@
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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

@ -0,0 +1,174 @@
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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

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

View File

@ -0,0 +1,68 @@
/******/ (() => { // 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 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '45f49839a2c1b3f6bfdc');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '2abc1cc8d49f9b6ba159');

View File

@ -91,7 +91,7 @@ function Edit({
blockVariant,
blockWidth
} = attributes;
console.log(blockWidth);
// Détecter le type de post actuel
const postType = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(select => {
return select("core/editor").getCurrentPostType();
@ -232,7 +232,7 @@ function Edit({
template: [["core/paragraph", {
placeholder: "Ajouter ici le texte"
}]],
allowedBlocks: ["core/heading", "core/paragraph", "core/group", "core/list", "core/button", "core/image", "core/buttons", "core/columns", "core/post-title", "core/embed", "core/quote", "core/pullquote", "core/media-text", "core/table", "carhop-blocks/heading", "carhop-blocks/decorative-shapes", "carhop-blocks/scroll-story-block", "carhop-blocks/cta-group", "carhop-blocks/audio-player", "carhop-blocks/localisation-map", "carhop-blocks/notice-panel", "acf/statistics-datas", "ninja-forms/form", "gravityforms/form", "dynamiques-blocks/sitemap", "mailpoet/subscription-form-block", "shortcode"]
allowedBlocks: ["core/heading", "core/paragraph", "core/group", "core/list", "core/button", "core/image", "core/buttons", "core/columns", "core/post-title", "core/embed", "core/quote", "core/pullquote", "core/media-text", "core/table", "carhop-blocks/chapter-section", "carhop-blocks/heading", "carhop-blocks/decorative-shapes", "carhop-blocks/scroll-story-block", "carhop-blocks/cta", "carhop-blocks/cta-group", "carhop-blocks/audio-player", "carhop-blocks/localisation-map", "carhop-blocks/notice-panel", "carhop-blocks/story-timeline", "carhop-blocks/highlight-timeline", "acf/statistics-datas", "ninja-forms/form", "gravityforms/form", "dynamiques-blocks/sitemap", "mailpoet/subscription-form-block", "shortcode"]
})
})
})]

File diff suppressed because one or more lines are too long

View File

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

View File

@ -70,19 +70,19 @@ function Edit({
})]
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("section", {
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: `carhop-heading carhop-heading--hierarchy-${hierarchy}`
}),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: "carhop-heading__innerblocks",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
template: [["core/paragraph", {
placeholder: "Saisir le sous-titre supérieur",
content: "Sous-titre supérieur"
}], ["core/heading", {
template: [["core/heading", {
placeholder: "Saisir le titre",
content: "Titre"
}], ["core/paragraph", {
placeholder: "Saisir le sous-titre supérieur",
content: "Sous-titre"
}]],
allowedBlocks: ["core/heading", "core/paragraph", "core/post-title"]
})
@ -172,7 +172,7 @@ function save({
const {
hierarchy
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("section", {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: `carhop-heading carhop-heading--hierarchy-${hierarchy}`
}),

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,28 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "carhop-blocks/highlight-timeline-step",
"version": "0.1.0",
"title": "Étape de timeline",
"category": "carhop-blocks",
"icon": "calendar",
"description": "Étape de timeline pour la mise en forme d'une étape de timeline",
"example": {},
"parent": [
"carhop-blocks/highlight-timeline"
],
"supports": {
"html": false
},
"textdomain": "carhop-blocks",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js",
"attributes": {
"year": {
"type": "number",
"default": 2025
}
}
}

View File

@ -0,0 +1,4 @@
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/highlight-timeline-step/editor.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

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

View File

@ -0,0 +1,4 @@
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/highlight-timeline-step/editor.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -0,0 +1,464 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/highlight-timeline-step/block.json":
/*!************************************************!*\
!*** ./src/highlight-timeline-step/block.json ***!
\************************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/highlight-timeline-step","version":"0.1.0","title":"Étape de timeline","category":"carhop-blocks","icon":"calendar","description":"Étape de timeline pour la mise en forme d\'une étape de timeline","example":{},"parent":["carhop-blocks/highlight-timeline"],"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"year":{"type":"number","default":2025}}}');
/***/ }),
/***/ "./src/highlight-timeline-step/edit.js":
/*!*********************************************!*\
!*** ./src/highlight-timeline-step/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/highlight-timeline-step/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 _timelineYearBackground__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./timelineYearBackground */ "./src/highlight-timeline-step/timelineYearBackground.jsx");
/* 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 {
year
} = attributes;
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_3__.PanelBody, {
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Étape de timeline", "carhop-blocks"),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalNumberControl, {
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Année", "carhop-blocks"),
value: year,
onChange: value => {
const n = parseInt(value, 10);
setAttributes({
year: Number.isFinite(n) ? n : undefined
});
}
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: `highlight-timeline-step`,
id: `year-${year}`
}),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
className: "highlight-timeline-step__year",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("p", {
className: "highlight-timeline-step__year-text",
children: year
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_timelineYearBackground__WEBPACK_IMPORTED_MODULE_4__["default"], {})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
className: "highlight-timeline-step__innerblocks",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
allowedBlocks: ["core/heading", "core/paragraph", "core/group", "core/list", "core/button", "core/image", "core/buttons", "core/columns", "core/post-title", "core/embed", "core/quote", "core/pullquote", "core/media-text", "core/table", "carhop-blocks/image-stack", "carhop-blocks/heading", "carhop-blocks/decorative-shapes", "carhop-blocks/scroll-highlight-block", "carhop-blocks/cta-group", "carhop-blocks/audio-player", "carhop-blocks/localisation-map", "carhop-blocks/notice-panel", "acf/statistics-datas", "ninja-forms/form", "gravityforms/form", "dynamiques-blocks/sitemap", "mailpoet/subscription-form-block", "shortcode"]
})
})]
})]
});
}
/***/ }),
/***/ "./src/highlight-timeline-step/editor.scss":
/*!*************************************************!*\
!*** ./src/highlight-timeline-step/editor.scss ***!
\*************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/highlight-timeline-step/index.js":
/*!**********************************************!*\
!*** ./src/highlight-timeline-step/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/highlight-timeline-step/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/highlight-timeline-step/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/highlight-timeline-step/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/highlight-timeline-step/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: "100",
height: "100",
viewBox: "0 0 100 100",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("g", {
stroke: "null",
id: "svg_10",
class: "fills",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
stroke: "null",
d: "m3.74998,19.74151c0,-8.82607 7.16546,-15.99153 15.99153,-15.99153l60.51698,0c8.82607,0 15.99153,7.16546 15.99153,15.99153l0,60.51698c0,8.82607 -7.16546,15.99153 -15.99153,15.99153l-60.51698,0c-8.82607,0 -15.99153,-7.16546 -15.99153,-15.99153l0,-60.51698zm22.57628,3.44915l0,53.61867l23.67374,-18.7148l23.67374,18.7148l0,-53.61867l-47.34748,0z"
})
})
})
},
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
});
/***/ }),
/***/ "./src/highlight-timeline-step/save.js":
/*!*********************************************!*\
!*** ./src/highlight-timeline-step/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 _timelineYearBackground__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timelineYearBackground */ "./src/highlight-timeline-step/timelineYearBackground.jsx");
/* 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 {
year
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: `highlight-timeline-step swiper-slide`,
id: `year-${year}`
}),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
className: "highlight-timeline-step__year",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("p", {
className: "highlight-timeline-step__year-text",
children: year
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_timelineYearBackground__WEBPACK_IMPORTED_MODULE_1__["default"], {})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
className: "highlight-timeline-step__innerblocks",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
})]
});
}
/***/ }),
/***/ "./src/highlight-timeline-step/style.scss":
/*!************************************************!*\
!*** ./src/highlight-timeline-step/style.scss ***!
\************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/highlight-timeline-step/timelineYearBackground.jsx":
/*!****************************************************************!*\
!*** ./src/highlight-timeline-step/timelineYearBackground.jsx ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ ShapeA)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
function ShapeA({}) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "highlight-timeline-step__year-background",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "772.1",
height: "653.3",
viewBox: "0 0 772.1 653.3",
preserveAspectRatio: "none",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("polygon", {
preserveAspectRatio: "none",
points: "14.2 10.6 762.1 53.5 757.9 642.7 10.1 599.8 14.2 10.6",
vectorEffect: "non-scaling-stroke"
})
})
});
}
/***/ }),
/***/ "@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 = {
/******/ "highlight-timeline-step/index": 0,
/******/ "highlight-timeline-step/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, ["highlight-timeline-step/style-index"], () => (__webpack_require__("./src/highlight-timeline-step/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

@ -0,0 +1,33 @@
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/highlight-timeline-step/style.scss ***!
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.highlight-timeline-step__year {
position: relative;
}
.highlight-timeline-step__year > * {
z-index: 1;
}
.highlight-timeline-step__year .highlight-timeline-step__year-background {
position: absolute;
top: 10px;
left: 10px;
bottom: 10px;
right: 10px;
z-index: 0;
overflow: visible;
}
.highlight-timeline-step__year .highlight-timeline-step__year-background svg {
overflow: visible;
width: 100%;
height: 100%;
}
.highlight-timeline-step__year .highlight-timeline-step__year-background svg polygon {
overflow: visible;
fill: #efe8ff;
stroke: white;
stroke-width: 20px;
vector-effect: non-scaling-stroke;
}
.highlight-timeline-step__year .highlight-timeline-step__year-text {
line-height: 1 !important;
}

View File

@ -0,0 +1,35 @@
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/highlight-timeline-step/style.scss ***!
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.highlight-timeline-step__year {
position: relative;
}
.highlight-timeline-step__year > * {
z-index: 1;
}
.highlight-timeline-step__year .highlight-timeline-step__year-background {
position: absolute;
top: 10px;
right: 10px;
bottom: 10px;
left: 10px;
z-index: 0;
overflow: visible;
}
.highlight-timeline-step__year .highlight-timeline-step__year-background svg {
overflow: visible;
width: 100%;
height: 100%;
}
.highlight-timeline-step__year .highlight-timeline-step__year-background svg polygon {
overflow: visible;
fill: #efe8ff;
stroke: white;
stroke-width: 20px;
vector-effect: non-scaling-stroke;
}
.highlight-timeline-step__year .highlight-timeline-step__year-text {
line-height: 1 !important;
}
/*# sourceMappingURL=style-index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"highlight-timeline-step/style-index.css","mappings":";;;AAAA;EACC;AACD;AACC;EACC;AACF;AACC;EACC;EACA;EACA;EACA;EACA;EACA;EACA;AACF;AACE;EACC;EACA;EACA;AACH;AACG;EACC;EACA;EACA;EACA;EACA;AACJ;AAIC;EACC;AAFF,C","sources":["webpack://carhop-blocks/./src/highlight-timeline-step/style.scss"],"sourcesContent":[".highlight-timeline-step__year {\r\n\tposition: relative;\r\n\r\n\t> * {\r\n\t\tz-index: 1;\r\n\t}\r\n\t.highlight-timeline-step__year-background {\r\n\t\tposition: absolute;\r\n\t\ttop: 10px;\r\n\t\tright: 10px;\r\n\t\tbottom: 10px;\r\n\t\tleft: 10px;\r\n\t\tz-index: 0;\r\n\t\toverflow: visible;\r\n\r\n\t\tsvg {\r\n\t\t\toverflow: visible;\r\n\t\t\twidth: 100%;\r\n\t\t\theight: 100%;\r\n\r\n\t\t\tpolygon {\r\n\t\t\t\toverflow: visible;\r\n\t\t\t\tfill: #efe8ff;\r\n\t\t\t\tstroke: white;\r\n\t\t\t\tstroke-width: 20px;\r\n\t\t\t\tvector-effect: non-scaling-stroke;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.highlight-timeline-step__year-text {\r\n\t\tline-height: 1 !important;\r\n\t}\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'cd52b0854d10abf915ff');

View File

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

View File

@ -0,0 +1,20 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "carhop-blocks/highlight-timeline",
"version": "0.1.0",
"title": "Highlight Timeline",
"category": "carhop-blocks",
"icon": "smiley",
"description": "Highlight Timeline pour la mise en forme d'une timeline avec des éléments en surbrillance",
"example": {},
"supports": {
"html": false
},
"textdomain": "highlight-timeline",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js",
"render": "file:./render.php"
}

View File

@ -0,0 +1,4 @@
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/highlight-timeline/editor.scss ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

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

View File

@ -0,0 +1,4 @@
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/highlight-timeline/editor.scss ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -0,0 +1,374 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/highlight-timeline/block.json":
/*!*******************************************!*\
!*** ./src/highlight-timeline/block.json ***!
\*******************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/highlight-timeline","version":"0.1.0","title":"Highlight Timeline","category":"carhop-blocks","icon":"smiley","description":"Highlight Timeline pour la mise en forme d\'une timeline avec des éléments en surbrillance","example":{},"supports":{"html":false},"textdomain":"highlight-timeline","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php"}');
/***/ }),
/***/ "./src/highlight-timeline/edit.js":
/*!****************************************!*\
!*** ./src/highlight-timeline/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/highlight-timeline/editor.scss");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__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 years = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(select => {
const {
getBlocks
} = select("core/block-editor");
const childBlocks = getBlocks(props.clientId) || [];
return childBlocks.filter(b => b.name === "carhop-blocks/highlight-timeline-step").map(b => b.attributes?.year).filter(y => y !== undefined && y !== null && y !== "");
}, [props.clientId]);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: "highlight-timeline"
}),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: "highlight-timeline__innerblocks",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
allowedBlocks: ["carhop-blocks/highlight-timeline-step"]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("ul", {
className: "highlight-timeline__years",
children: years.map((y, idx) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("li", {
className: "story-timeline__year",
children: y
}, idx))
})]
});
}
/***/ }),
/***/ "./src/highlight-timeline/editor.scss":
/*!********************************************!*\
!*** ./src/highlight-timeline/editor.scss ***!
\********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/highlight-timeline/index.js":
/*!*****************************************!*\
!*** ./src/highlight-timeline/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/highlight-timeline/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/highlight-timeline/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/highlight-timeline/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/highlight-timeline/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/highlight-timeline/save.js":
/*!****************************************!*\
!*** ./src/highlight-timeline/save.js ***!
\****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ save)
/* harmony export */ });
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
function save({
attributes
}) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {});
}
/***/ }),
/***/ "./src/highlight-timeline/style.scss":
/*!*******************************************!*\
!*** ./src/highlight-timeline/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/data":
/*!******************************!*\
!*** external ["wp","data"] ***!
\******************************/
/***/ ((module) => {
module.exports = window["wp"]["data"];
/***/ }),
/***/ "@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 = {
/******/ "highlight-timeline/index": 0,
/******/ "highlight-timeline/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, ["highlight-timeline/style-index"], () => (__webpack_require__("./src/highlight-timeline/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

@ -0,0 +1,33 @@
<?php
$wrapper_attributes = get_block_wrapper_attributes(array('class' => 'highlight-timeline'));
$years = array();
if (isset($block) && is_object($block) && ! empty($block->inner_blocks)) {
foreach ($block->inner_blocks as $inner_block) {
if (isset($inner_block->name) && $inner_block->name === 'carhop-blocks/highlight-timeline-step') {
$y = isset($inner_block->attributes['year']) ? $inner_block->attributes['year'] : null;
if ($y !== null && $y !== '') {
$years[] = $y;
}
}
}
}
?>
<section <?php echo $wrapper_attributes; ?>>
<div class="highlight-timeline__innerblocks swiper highlight-timeline-swiper" id="<?php echo esc_attr($years[0]); ?>">
<div class="swiper-wrapper">
<?php echo $content; ?>
</div>
</div>
<div class="swiper-pagination"></div>
<div class="swiper-controls">
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
</section>

View File

@ -0,0 +1,15 @@
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/highlight-timeline/style.scss ***!
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.highlight-timeline__years {
width: 100%;
display: flex;
gap: 20px;
}
.highlight-timeline__years li {
color: #fff;
flex-grow: 1;
text-align: center;
list-style: none !important;
border-bottom: 1px solid #fff;
}

View File

@ -0,0 +1,17 @@
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/highlight-timeline/style.scss ***!
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.highlight-timeline__years {
width: 100%;
display: flex;
gap: 20px;
}
.highlight-timeline__years li {
color: #fff;
flex-grow: 1;
text-align: center;
list-style: none !important;
border-bottom: 1px solid #fff;
}
/*# sourceMappingURL=style-index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"highlight-timeline/style-index.css","mappings":";;;AACC;EACC;EAEA;EAEA;AAFF;AAGE;EACC;EACA;EACA;EACA;EACA;AADH,C","sources":["webpack://carhop-blocks/./src/highlight-timeline/style.scss"],"sourcesContent":[".highlight-timeline {\n\t&__years {\n\t\twidth: 100%;\n\n\t\tdisplay: flex;\n\n\t\tgap: 20px;\n\t\tli {\n\t\t\tcolor: #fff;\n\t\t\tflex-grow: 1;\n\t\t\ttext-align: center;\n\t\t\tlist-style: none !important;\n\t\t\tborder-bottom: 1px solid #fff;\n\t\t}\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'a09fa316f558ee9dec16');

View File

@ -0,0 +1,62 @@
/******/ (() => { // webpackBootstrap
/*!****************************************!*\
!*** ./src/highlight-timeline/view.js ***!
\****************************************/
function initiateSwiper() {
const currentBlock = document.querySelector(".wp-block-carhop-blocks-highlight-timeline");
if (!currentBlock) return;
// const swiperFraction = currentBlock.querySelector(
// ".swiper-pagination-fraction"
// );
const slides = currentBlock.querySelectorAll(".swiper-slide");
const slideCount = slides.length;
const years = Array.from(slides).map(slide => {
const yearEl = slide.querySelector(".highlight-timeline-step__year");
if (yearEl && yearEl.textContent) {
return yearEl.textContent.trim();
}
const id = slide.id || "";
const match = id.match(/^year-(.+)$/);
return match ? match[1] : "";
});
highlightTimelineSwiper = new Swiper(".highlight-timeline-swiper", {
slidesPerView: 1,
spaceBetween: 30,
loop: true,
grabCursor: true,
keyboard: {
enabled: true,
onlyInViewport: true
},
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev"
},
mousewheel: {
enabled: true,
forceToAxis: true,
// Force le scroll dans l'axe du slider
sensitivity: 1,
// Sensibilité du scroll (1 = normal)
releaseOnEdges: false // Continue le scroll même aux bords
},
pagination: {
el: ".swiper-pagination",
clickable: true,
renderBullet: function (index, className) {
var _years$index;
return `<button class="${className}">${(_years$index = years[index]) !== null && _years$index !== void 0 ? _years$index : ""}</button>`;
}
}
});
}
window.addEventListener("DOMContentLoaded", event => {
initiateSwiper();
// swiperCheckBreakpoints();
// window.addEventListener("resize", swiperCheckBreakpoints);
});
/******/ })()
;
//# sourceMappingURL=view.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"highlight-timeline/view.js","mappings":";;;;AAAA,SAASA,cAAcA,CAAA,EAAG;EACzB,MAAMC,YAAY,GAAGC,QAAQ,CAACC,aAAa,CAC1C,4CACD,CAAC;EACD,IAAI,CAACF,YAAY,EAAE;;EAEnB;EACA;EACA;EACA,MAAMG,MAAM,GAAGH,YAAY,CAACI,gBAAgB,CAAC,eAAe,CAAC;EAC7D,MAAMC,UAAU,GAAGF,MAAM,CAACG,MAAM;EAChC,MAAMC,KAAK,GAAGC,KAAK,CAACC,IAAI,CAACN,MAAM,CAAC,CAACO,GAAG,CAAEC,KAAK,IAAK;IAC/C,MAAMC,MAAM,GAAGD,KAAK,CAACT,aAAa,CAAC,gCAAgC,CAAC;IACpE,IAAIU,MAAM,IAAIA,MAAM,CAACC,WAAW,EAAE;MACjC,OAAOD,MAAM,CAACC,WAAW,CAACC,IAAI,CAAC,CAAC;IACjC;IACA,MAAMC,EAAE,GAAGJ,KAAK,CAACI,EAAE,IAAI,EAAE;IACzB,MAAMC,KAAK,GAAGD,EAAE,CAACC,KAAK,CAAC,aAAa,CAAC;IACrC,OAAOA,KAAK,GAAGA,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE;EAC7B,CAAC,CAAC;EAEFC,uBAAuB,GAAG,IAAIC,MAAM,CAAC,4BAA4B,EAAE;IAClEC,aAAa,EAAE,CAAC;IAChBC,YAAY,EAAE,EAAE;IAChBC,IAAI,EAAE,IAAI;IACVC,UAAU,EAAE,IAAI;IAChBC,QAAQ,EAAE;MACTC,OAAO,EAAE,IAAI;MACbC,cAAc,EAAE;IACjB,CAAC;IACDC,UAAU,EAAE;MACXC,MAAM,EAAE,qBAAqB;MAC7BC,MAAM,EAAE;IACT,CAAC;IACDC,UAAU,EAAE;MACXL,OAAO,EAAE,IAAI;MACbM,WAAW,EAAE,IAAI;MAAE;MACnBC,WAAW,EAAE,CAAC;MAAE;MAChBC,cAAc,EAAE,KAAK,CAAE;IACxB,CAAC;IACDC,UAAU,EAAE;MACXC,EAAE,EAAE,oBAAoB;MACxBC,SAAS,EAAE,IAAI;MACfC,YAAY,EAAE,SAAAA,CAAUC,KAAK,EAAEC,SAAS,EAAE;QAAA,IAAAC,YAAA;QACzC,OAAO,kBAAkBD,SAAS,MAAAC,YAAA,GAAKhC,KAAK,CAAC8B,KAAK,CAAC,cAAAE,YAAA,cAAAA,YAAA,GAAI,EAAE,WAAW;MACrE;IACD;EACD,CAAC,CAAC;AACH;AAEAC,MAAM,CAACC,gBAAgB,CAAC,kBAAkB,EAAGC,KAAK,IAAK;EACtD3C,cAAc,CAAC,CAAC;;EAEhB;EACA;AACD,CAAC,CAAC,C","sources":["webpack://carhop-blocks/./src/highlight-timeline/view.js"],"sourcesContent":["function initiateSwiper() {\n\tconst currentBlock = document.querySelector(\n\t\t\".wp-block-carhop-blocks-highlight-timeline\"\n\t);\n\tif (!currentBlock) return;\n\n\t// const swiperFraction = currentBlock.querySelector(\n\t// \t\".swiper-pagination-fraction\"\n\t// );\n\tconst slides = currentBlock.querySelectorAll(\".swiper-slide\");\n\tconst slideCount = slides.length;\n\tconst years = Array.from(slides).map((slide) => {\n\t\tconst yearEl = slide.querySelector(\".highlight-timeline-step__year\");\n\t\tif (yearEl && yearEl.textContent) {\n\t\t\treturn yearEl.textContent.trim();\n\t\t}\n\t\tconst id = slide.id || \"\";\n\t\tconst match = id.match(/^year-(.+)$/);\n\t\treturn match ? match[1] : \"\";\n\t});\n\n\thighlightTimelineSwiper = new Swiper(\".highlight-timeline-swiper\", {\n\t\tslidesPerView: 1,\n\t\tspaceBetween: 30,\n\t\tloop: true,\n\t\tgrabCursor: true,\n\t\tkeyboard: {\n\t\t\tenabled: true,\n\t\t\tonlyInViewport: true,\n\t\t},\n\t\tnavigation: {\n\t\t\tnextEl: \".swiper-button-next\",\n\t\t\tprevEl: \".swiper-button-prev\",\n\t\t},\n\t\tmousewheel: {\n\t\t\tenabled: true,\n\t\t\tforceToAxis: true, // Force le scroll dans l'axe du slider\n\t\t\tsensitivity: 1, // Sensibilité du scroll (1 = normal)\n\t\t\treleaseOnEdges: false, // Continue le scroll même aux bords\n\t\t},\n\t\tpagination: {\n\t\t\tel: \".swiper-pagination\",\n\t\t\tclickable: true,\n\t\t\trenderBullet: function (index, className) {\n\t\t\t\treturn `<button class=\"${className}\">${years[index] ?? \"\"}</button>`;\n\t\t\t},\n\t\t},\n\t});\n}\n\nwindow.addEventListener(\"DOMContentLoaded\", (event) => {\n\tinitiateSwiper();\n\n\t// swiperCheckBreakpoints();\n\t// window.addEventListener(\"resize\", swiperCheckBreakpoints);\n});\n"],"names":["initiateSwiper","currentBlock","document","querySelector","slides","querySelectorAll","slideCount","length","years","Array","from","map","slide","yearEl","textContent","trim","id","match","highlightTimelineSwiper","Swiper","slidesPerView","spaceBetween","loop","grabCursor","keyboard","enabled","onlyInViewport","navigation","nextEl","prevEl","mousewheel","forceToAxis","sensitivity","releaseOnEdges","pagination","el","clickable","renderBullet","index","className","_years$index","window","addEventListener","event"],"ignoreList":[],"sourceRoot":""}

View File

@ -0,0 +1,65 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "carhop-blocks/image-stack",
"version": "0.1.0",
"title": "Image Stack (Focal Point)",
"category": "carhop-blocks",
"icon": "images-alt2",
"description": "Layer multiple images with individual focal point positioning.",
"example": {
"attributes": {
"images": [
{
"id": 1,
"url": "https://images.unsplash.com/photo-1506905925346-21bda4d32df4",
"alt": "Mountain landscape",
"focalPoint": {
"x": 0.5,
"y": 0.3
},
"scale": 0.8
},
{
"id": 2,
"url": "https://images.unsplash.com/photo-1511884642898-4c92249e20b6",
"alt": "Forest scene",
"focalPoint": {
"x": 0.7,
"y": 0.6
},
"scale": 0.6
}
],
"height": 400
}
},
"attributes": {
"images": {
"type": "array",
"default": [],
"items": {
"type": "object"
}
},
"height": {
"type": "number",
"default": 400
}
},
"supports": {
"html": false,
"align": [
"wide",
"full"
],
"spacing": {
"margin": true,
"padding": true
}
},
"textdomain": "image-stack",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css"
}

View File

@ -0,0 +1,51 @@
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/image-stack/editor.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied inside the editor only.
*/
.wp-block-carhop-blocks-image-stack {
overflow: visible;
}
.wp-block-carhop-blocks-image-stack .image-stack-placeholder {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: rgba(240, 240, 240, 0.5);
background-color: red;
border: 2px dashed #ccc;
}
.wp-block-carhop-blocks-image-stack .image-stack-item {
cursor: pointer;
transition: opacity 0.2s ease;
}
.wp-block-carhop-blocks-image-stack .image-stack-item:hover {
opacity: 0.9;
}
.wp-block-carhop-blocks-image-stack .image-stack-item.is-selected {
outline: 3px solid #007cba;
outline-offset: -3px;
z-index: 10;
}
.image-stack-image-preview {
margin-bottom: 16px;
}
.image-stack-image-preview img {
width: 100%;
height: auto;
display: block;
border-radius: 4px;
}
.image-stack-image-controls {
display: flex;
gap: 8px;
margin-top: 16px;
flex-wrap: wrap;
}
.image-stack-image-controls .components-button {
flex: 1;
min-width: 80px;
justify-content: center;
}

View File

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

View File

@ -0,0 +1,53 @@
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/image-stack/editor.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied inside the editor only.
*/
.wp-block-carhop-blocks-image-stack {
overflow: visible;
}
.wp-block-carhop-blocks-image-stack .image-stack-placeholder {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: rgba(240, 240, 240, 0.5);
background-color: red;
border: 2px dashed #ccc;
}
.wp-block-carhop-blocks-image-stack .image-stack-item {
cursor: pointer;
transition: opacity 0.2s ease;
}
.wp-block-carhop-blocks-image-stack .image-stack-item:hover {
opacity: 0.9;
}
.wp-block-carhop-blocks-image-stack .image-stack-item.is-selected {
outline: 3px solid #007cba;
outline-offset: -3px;
z-index: 10;
}
.image-stack-image-preview {
margin-bottom: 16px;
}
.image-stack-image-preview img {
width: 100%;
height: auto;
display: block;
border-radius: 4px;
}
.image-stack-image-controls {
display: flex;
gap: 8px;
margin-top: 16px;
flex-wrap: wrap;
}
.image-stack-image-controls .components-button {
flex: 1;
min-width: 80px;
justify-content: center;
}
/*# sourceMappingURL=index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"image-stack/index.css","mappings":";;;AAAA;;EAAA;AAIA;EACC;AAAD;AACC;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;AAEC;EACC;EACA;AAAF;AAEE;EACC;AAAH;AAGE;EACC;EACA;EACA;AADH;AAMA;EACC;AAHD;AAKC;EACC;EACA;EACA;EACA;AAHF;AAOA;EACC;EACA;EACA;EACA;AAJD;AAMC;EACC;EACA;EACA;AAJF,C","sources":["webpack://carhop-blocks/./src/image-stack/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n */\n\n.wp-block-carhop-blocks-image-stack {\n\toverflow: visible;\n\t.image-stack-placeholder {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tbackground-color: rgba(240, 240, 240, 0.5);\n\t\tbackground-color: red;\n\t\tborder: 2px dashed #ccc;\n\t}\n\n\t.image-stack-item {\n\t\tcursor: pointer;\n\t\ttransition: opacity 0.2s ease;\n\n\t\t&:hover {\n\t\t\topacity: 0.9;\n\t\t}\n\n\t\t&.is-selected {\n\t\t\toutline: 3px solid #007cba;\n\t\t\toutline-offset: -3px;\n\t\t\tz-index: 10;\n\t\t}\n\t}\n}\n\n.image-stack-image-preview {\n\tmargin-bottom: 16px;\n\n\timg {\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tdisplay: block;\n\t\tborder-radius: 4px;\n\t}\n}\n\n.image-stack-image-controls {\n\tdisplay: flex;\n\tgap: 8px;\n\tmargin-top: 16px;\n\tflex-wrap: wrap;\n\n\t.components-button {\n\t\tflex: 1;\n\t\tmin-width: 80px;\n\t\tjustify-content: center;\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -0,0 +1,602 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/image-stack/block.json":
/*!************************************!*\
!*** ./src/image-stack/block.json ***!
\************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/image-stack","version":"0.1.0","title":"Image Stack (Focal Point)","category":"carhop-blocks","icon":"images-alt2","description":"Layer multiple images with individual focal point positioning.","example":{"attributes":{"images":[{"id":1,"url":"https://images.unsplash.com/photo-1506905925346-21bda4d32df4","alt":"Mountain landscape","focalPoint":{"x":0.5,"y":0.3},"scale":0.8},{"id":2,"url":"https://images.unsplash.com/photo-1511884642898-4c92249e20b6","alt":"Forest scene","focalPoint":{"x":0.7,"y":0.6},"scale":0.6}],"height":400}},"attributes":{"images":{"type":"array","default":[],"items":{"type":"object"}},"height":{"type":"number","default":400}},"supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true,"padding":true}},"textdomain":"image-stack","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');
/***/ }),
/***/ "./src/image-stack/edit.js":
/*!*********************************!*\
!*** ./src/image-stack/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 _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/image-stack/editor.scss");
/* 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
}) {
const {
images,
height
} = attributes;
const [selectedImageIndex, setSelectedImageIndex] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(null);
const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)();
const onSelectImages = media => {
const newImages = media.map(img => ({
id: img.id,
url: img.url,
alt: img.alt || "",
focalPoint: {
x: 0.5,
y: 0.5
},
scale: 0.8,
rotation: 0
}));
setAttributes({
images: [...images, ...newImages]
});
};
const updateImageFocalPoint = (index, focalPoint) => {
const newImages = [...images];
newImages[index] = {
...newImages[index],
focalPoint
};
setAttributes({
images: newImages
});
};
const updateImageScale = (index, scale) => {
const newImages = [...images];
newImages[index] = {
...newImages[index],
scale
};
setAttributes({
images: newImages
});
};
const updateImageRotation = (index, rotation) => {
const newImages = [...images];
newImages[index] = {
...newImages[index],
rotation
};
setAttributes({
images: newImages
});
};
const removeImage = index => {
const newImages = images.filter((_, i) => i !== index);
setAttributes({
images: newImages
});
if (selectedImageIndex === index) {
setSelectedImageIndex(null);
}
};
const moveImage = (index, direction) => {
const newImages = [...images];
const newIndex = index + direction;
if (newIndex >= 0 && newIndex < images.length) {
[newImages[index], newImages[newIndex]] = [newImages[newIndex], newImages[index]];
setAttributes({
images: newImages
});
setSelectedImageIndex(newIndex);
}
};
const getImageStyle = image => {
const focalPoint = image.focalPoint || {
x: 0.5,
y: 0.5
};
const scale = image.scale || 0.8;
const rotation = image.rotation || 0;
return {
left: `${focalPoint.x * 100}%`,
top: `${focalPoint.y * 100}%`,
transform: ` rotate(${rotation}deg) scale(${scale})`
};
};
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__.BlockControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToolbarGroup, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaUploadCheck, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaUpload, {
onSelect: onSelectImages,
allowedTypes: ["image"],
multiple: true,
gallery: true,
value: images.map(img => img.id),
render: ({
open
}) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToolbarButton, {
onClick: open,
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Add Images", "image-stack")
})
})
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Container Settings", "image-stack"),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Container Height", "image-stack"),
value: height,
onChange: value => setAttributes({
height: value
}),
min: 200,
max: 800,
step: 10
})
}), images.length > 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Images", "image-stack"),
initialOpen: true,
children: images.map((image, index) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
title: `${(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Image", "image-stack")} ${index + 1}`,
initialOpen: selectedImageIndex === index,
onToggle: () => setSelectedImageIndex(selectedImageIndex === index ? null : index),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
className: "image-stack-image-preview",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("img", {
src: image.url,
alt: image.alt
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.FocalPointPicker, {
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Focal Point", "image-stack"),
url: image.url,
value: image.focalPoint || {
x: 0.5,
y: 0.5
},
onChange: focalPoint => updateImageFocalPoint(index, focalPoint)
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Scale", "image-stack"),
value: image.scale || 0.8,
onChange: scale => updateImageScale(index, scale),
min: 0.1,
max: 3,
step: 0.05
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Rotation (deg)", "image-stack"),
value: image.rotation || 0,
onChange: rotation => updateImageRotation(index, rotation),
min: -180,
max: 180,
step: 1
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
className: "image-stack-image-controls",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
isSecondary: true,
isSmall: true,
disabled: index === 0,
onClick: () => moveImage(index, -1),
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("↑ Move Up", "image-stack")
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
isSecondary: true,
isSmall: true,
disabled: index === images.length - 1,
onClick: () => moveImage(index, 1),
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("↓ Move Down", "image-stack")
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
isDestructive: true,
isSmall: true,
onClick: () => removeImage(index),
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Remove", "image-stack")
})]
})]
}, image.id))
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
...blockProps,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
className: "image-stack-container",
style: {
height: `${height}px`
},
children: [images.length === 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
className: "image-stack-placeholder",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaUploadCheck, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaUpload, {
onSelect: onSelectImages,
allowedTypes: ["image"],
multiple: true,
gallery: true,
render: ({
open
}) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
variant: "primary",
onClick: open,
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Ajouter une Image", "image-stack")
})
})
})
}), images.map((image, index) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
className: `image-stack-item ${selectedImageIndex === index ? "is-selected" : ""}`,
onClick: () => setSelectedImageIndex(index),
role: "button",
tabIndex: 0,
onKeyDown: e => {
if (e.key === "Enter" || e.key === " ") {
setSelectedImageIndex(index);
}
},
style: getImageStyle(image),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("img", {
src: image.url,
alt: image.alt
})
}, image.id))]
})
})]
});
}
/***/ }),
/***/ "./src/image-stack/editor.scss":
/*!*************************************!*\
!*** ./src/image-stack/editor.scss ***!
\*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/image-stack/index.js":
/*!**********************************!*\
!*** ./src/image-stack/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/image-stack/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/image-stack/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/image-stack/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/image-stack/block.json");
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
});
/***/ }),
/***/ "./src/image-stack/save.js":
/*!*********************************!*\
!*** ./src/image-stack/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 {
images,
height
} = attributes;
const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save();
const getImageStyle = image => {
const focalPoint = image.focalPoint || {
x: 0.5,
y: 0.5
};
const scale = image.scale || 0.8;
const rotation = image.rotation || 0;
return {
left: `${focalPoint.x * 100}%`,
top: `${focalPoint.y * 100}%`,
transform: `rotate(${rotation}deg) scale(${scale})`
};
};
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
...blockProps,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "image-stack-container",
style: {
height: `${height}px`
},
children: images.map(image => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "image-stack-item",
style: getImageStyle(image),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img", {
src: image.url,
alt: image.alt
})
}, image.id))
})
});
}
/***/ }),
/***/ "./src/image-stack/style.scss":
/*!************************************!*\
!*** ./src/image-stack/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/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 = {
/******/ "image-stack/index": 0,
/******/ "image-stack/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, ["image-stack/style-index"], () => (__webpack_require__("./src/image-stack/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

@ -0,0 +1,22 @@
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/image-stack/style.scss ***!
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied both on the front of your site
* and in the editor.
*/
.wp-block-carhop-blocks-image-stack .image-stack-container {
position: relative;
width: 100%;
overflow: visible;
}
.wp-block-carhop-blocks-image-stack .image-stack-item {
position: absolute;
}
.wp-block-carhop-blocks-image-stack .image-stack-item img {
width: 100%;
height: 100%;
-o-object-fit: contain;
object-fit: contain;
display: block;
}

View File

@ -0,0 +1,24 @@
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** 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/image-stack/style.scss ***!
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/**
* The following styles get applied both on the front of your site
* and in the editor.
*/
.wp-block-carhop-blocks-image-stack .image-stack-container {
position: relative;
width: 100%;
overflow: visible;
}
.wp-block-carhop-blocks-image-stack .image-stack-item {
position: absolute;
}
.wp-block-carhop-blocks-image-stack .image-stack-item img {
width: 100%;
height: 100%;
-o-object-fit: contain;
object-fit: contain;
display: block;
}
/*# sourceMappingURL=style-index.css.map*/

View File

@ -0,0 +1 @@
{"version":3,"file":"image-stack/style-index.css","mappings":";;;AAAA;;;EAAA;AAMC;EACC;EACA;EACA;AADF;AAIC;EACC;AAFF;AAIE;EACC;EACA;EACA;KAAA;EACA;AAFH,C","sources":["webpack://carhop-blocks/./src/image-stack/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n */\n\n.wp-block-carhop-blocks-image-stack {\n\t.image-stack-container {\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t}\n\n\t.image-stack-item {\n\t\tposition: absolute;\n\n\t\timg {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tobject-fit: contain;\n\t\t\tdisplay: block;\n\t\t}\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -21,6 +21,22 @@
"type": "boolean",
"default": true
},
"aspectRatio": {
"type": "string",
"default": "auto",
"enum": [
"auto",
"1/1",
"4/3",
"3/4",
"3/2",
"2/3",
"16/9",
"21/9",
"9/16",
"9/21"
]
},
"coverPosition": {
"type": "string",
"default": "right",

View File

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

View File

@ -52,10 +52,12 @@ __webpack_require__.r(__webpack_exports__);
function Cover({
coverUrl,
coverAlt,
onSelect
onSelect,
aspectRatio
}) {
const ratioClass = aspectRatio && aspectRatio !== "auto" ? ` narrative-card__cover--ratio-${String(aspectRatio).replace(/[/:]/g, "-")}` : "";
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
className: "narrative-card__cover",
className: `narrative-card__cover${ratioClass}`,
children: [coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img", {
src: coverUrl,
alt: coverAlt
@ -77,7 +79,7 @@ function Cover({
\***************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/narrative-card","version":"0.1.0","title":"Carte narrative","category":"carhop-blocks","icon":"smiley","description":"Une carte narrative","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":{"hasCover":{"type":"boolean","default":true},"coverPosition":{"type":"string","default":"right","enum":["left","right"]},"coverId":{"type":"number"},"coverUrl":{"type":"string"},"coverAlt":{"type":"string"},"blackWhiteCoverFilter":{"type":"boolean","default":true}}}');
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/narrative-card","version":"0.1.0","title":"Carte narrative","category":"carhop-blocks","icon":"smiley","description":"Une carte narrative","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":{"hasCover":{"type":"boolean","default":true},"aspectRatio":{"type":"string","default":"auto","enum":["auto","1/1","4/3","3/4","3/2","2/3","16/9","21/9","9/16","9/21"]},"coverPosition":{"type":"string","default":"right","enum":["left","right"]},"coverId":{"type":"number"},"coverUrl":{"type":"string"},"coverAlt":{"type":"string"},"blackWhiteCoverFilter":{"type":"boolean","default":true}}}');
/***/ }),
@ -119,7 +121,8 @@ function Edit({
coverAlt,
coverPosition,
hasCover,
blackWhiteCoverFilter
blackWhiteCoverFilter,
aspectRatio
} = attributes;
const colors = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useSetting)("color.palette.theme");
function setCoverAttributes(cover) {
@ -186,6 +189,44 @@ function Edit({
label: "Droite",
value: "right"
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Proportion", "carhop-blocks"),
value: aspectRatio || "auto",
options: [{
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Auto", "carhop-blocks"),
value: "auto"
}, {
label: "1:1",
value: "1/1"
}, {
label: "4:3",
value: "4/3"
}, {
label: "3:4",
value: "3/4"
}, {
label: "3:2",
value: "3/2"
}, {
label: "2:3",
value: "2/3"
}, {
label: "16:9",
value: "16/9"
}, {
label: "21:9",
value: "21/9"
}, {
label: "9:16",
value: "9/16"
}, {
label: "9:21",
value: "9/21"
}],
onChange: value => setAttributes({
aspectRatio: value
}),
help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Sélectionnez la proportion d'affichage de la carte.", "carhop-blocks")
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControl, {
className: "deligraph-blocks__variant",
isBlock: true,
@ -226,11 +267,12 @@ function Edit({
}), shouldShowCoverLeft && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_Cover__WEBPACK_IMPORTED_MODULE_5__["default"], {
coverUrl: coverUrl,
coverAlt: coverAlt,
aspectRatio: aspectRatio,
onSelect: setCoverAttributes
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
className: "narrative-card__content",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
allowedBlocks: ["core/paragraph", "core/heading", "core/image"],
allowedBlocks: ["core/paragraph", "core/heading", "core/image", "carhop-blocks/cta", "carhop-blocks/cta-group"],
template: [["core/heading", {
content: "Lorem ipsum"
}], ["core/paragraph", {
@ -240,6 +282,7 @@ function Edit({
}), shouldShowCoverRight && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_Cover__WEBPACK_IMPORTED_MODULE_5__["default"], {
coverUrl: coverUrl,
coverAlt: coverAlt,
aspectRatio: aspectRatio,
onSelect: setCoverAttributes
})]
})]
@ -323,7 +366,8 @@ function save({
coverUrl,
coverAlt,
coverPosition,
blackWhiteCoverFilter
blackWhiteCoverFilter,
aspectRatio
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
@ -343,7 +387,7 @@ function save({
vectorEffect: "non-scaling-stroke"
})
}), hasCover && coverPosition === "left" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "narrative-card__cover",
className: `narrative-card__cover${aspectRatio && aspectRatio !== "auto" ? ` narrative-card__cover--ratio-${String(aspectRatio).replace(/[/:]/g, "-")}` : ""}`,
children: hasCover && coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img", {
src: coverUrl,
alt: coverAlt
@ -352,7 +396,7 @@ function save({
className: "narrative-card__content",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
}), hasCover && coverPosition === "right" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "narrative-card__cover",
className: `narrative-card__cover${aspectRatio && aspectRatio !== "auto" ? ` narrative-card__cover--ratio-${String(aspectRatio).replace(/[/:]/g, "-")}` : ""}`,
children: hasCover && coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img", {
src: coverUrl,
alt: coverAlt

File diff suppressed because one or more lines are too long

View File

@ -15,5 +15,11 @@
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js"
"viewScript": "file:./view.js",
"attributes": {
"hasNumbering": {
"type": "boolean",
"default": false
}
}
}

View File

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

View File

@ -8,7 +8,7 @@
\*******************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/scroll-story-block","version":"0.1.0","title":"Section défilante animée","category":"carhop-blocks","icon":"format-quote","description":"Une section défilante animée","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/scroll-story-block","version":"0.1.0","title":"Section défilante animée","category":"carhop-blocks","icon":"format-quote","description":"Une section défilante animée","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":{"hasNumbering":{"type":"boolean","default":false}}}');
/***/ }),
@ -27,8 +27,12 @@ __webpack_require__.r(__webpack_exports__);
/* 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/scroll-story-block/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__);
/* 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__);
@ -37,12 +41,27 @@ function Edit({
attributes,
setAttributes
}) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
const {
hasNumbering
} = 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__.jsx)(_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, {
className: "deligraph-blocks-components-image__panel-body",
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Numérotation", "deligraph-blocks"),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.CheckboxControl, {
label: "Afficher la num\xE9rotation",
checked: hasNumbering,
onChange: value => setAttributes({
hasNumbering: value
})
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: `scroll-story-block`
className: `scroll-story-block ${hasNumbering ? "scroll-story-block--has-numbering" : ""}`
}),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
allowedBlocks: ["carhop-blocks/narrative-card"],
template: [["carhop-blocks/narrative-card", {
hasCover: true,
@ -62,7 +81,7 @@ function Edit({
}]]
}]]
})
})
})]
});
}
@ -138,9 +157,12 @@ __webpack_require__.r(__webpack_exports__);
function save({
attributes
}) {
const {
hasNumbering
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: "scroll-story-block"
className: `scroll-story-block ${hasNumbering ? "scroll-story-block--has-numbering" : ""}`
}),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
});
@ -180,6 +202,16 @@ module.exports = window["wp"]["blocks"];
/***/ }),
/***/ "@wordpress/components":
/*!************************************!*\
!*** external ["wp","components"] ***!
\************************************/
/***/ ((module) => {
module.exports = window["wp"]["components"];
/***/ }),
/***/ "@wordpress/i18n":
/*!******************************!*\
!*** external ["wp","i18n"] ***!

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,28 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "carhop-blocks/story-timeline-step",
"version": "0.1.0",
"title": "Étape de timeline",
"category": "carhop-blocks",
"icon": "calendar",
"description": "Étape de timeline pour la mise en forme d'une étape de timeline",
"example": {},
"parent": [
"carhop-blocks/story-timeline"
],
"supports": {
"html": false
},
"textdomain": "carhop-blocks",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js",
"attributes": {
"year": {
"type": "number",
"default": 2025
}
}
}

View File

@ -0,0 +1,4 @@
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/story-timeline-step/editor.scss ***!
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

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

View File

@ -0,0 +1,4 @@
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/story-timeline-step/editor.scss ***!
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -0,0 +1,408 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/story-timeline-step/block.json":
/*!********************************************!*\
!*** ./src/story-timeline-step/block.json ***!
\********************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/story-timeline-step","version":"0.1.0","title":"Étape de timeline","category":"carhop-blocks","icon":"calendar","description":"Étape de timeline pour la mise en forme d\'une étape de timeline","example":{},"parent":["carhop-blocks/story-timeline"],"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"year":{"type":"number","default":2025}}}');
/***/ }),
/***/ "./src/story-timeline-step/edit.js":
/*!*****************************************!*\
!*** ./src/story-timeline-step/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/story-timeline-step/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 {
year
} = 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__.jsx)(_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__.__)("Étape de timeline", "carhop-blocks"),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalNumberControl, {
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Année", "carhop-blocks"),
value: year,
onChange: value => {
const n = parseInt(value, 10);
setAttributes({
year: Number.isFinite(n) ? n : undefined
});
}
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: `story-timeline-step`,
id: `year-${year}`
}),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
className: "story-timeline-step__year",
children: year
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: "story-timeline-step__innerblocks",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
allowedBlocks: ["core/heading", "core/paragraph", "core/group", "core/list", "core/button", "core/image", "core/buttons", "core/columns", "core/post-title", "core/embed", "core/quote", "core/pullquote", "core/media-text", "core/table", "carhop-blocks/image-stack", "carhop-blocks/heading", "carhop-blocks/decorative-shapes", "carhop-blocks/scroll-story-block", "carhop-blocks/cta-group", "carhop-blocks/audio-player", "carhop-blocks/localisation-map", "carhop-blocks/notice-panel", "acf/statistics-datas", "ninja-forms/form", "gravityforms/form", "dynamiques-blocks/sitemap", "mailpoet/subscription-form-block", "shortcode"]
})
})]
})]
});
}
/***/ }),
/***/ "./src/story-timeline-step/editor.scss":
/*!*********************************************!*\
!*** ./src/story-timeline-step/editor.scss ***!
\*********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/story-timeline-step/index.js":
/*!******************************************!*\
!*** ./src/story-timeline-step/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/story-timeline-step/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/story-timeline-step/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/story-timeline-step/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/story-timeline-step/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: "100",
height: "100",
viewBox: "0 0 100 100",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("g", {
stroke: "null",
id: "svg_10",
class: "fills",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
stroke: "null",
d: "m3.74998,19.74151c0,-8.82607 7.16546,-15.99153 15.99153,-15.99153l60.51698,0c8.82607,0 15.99153,7.16546 15.99153,15.99153l0,60.51698c0,8.82607 -7.16546,15.99153 -15.99153,15.99153l-60.51698,0c-8.82607,0 -15.99153,-7.16546 -15.99153,-15.99153l0,-60.51698zm22.57628,3.44915l0,53.61867l23.67374,-18.7148l23.67374,18.7148l0,-53.61867l-47.34748,0z"
})
})
})
},
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
});
/***/ }),
/***/ "./src/story-timeline-step/save.js":
/*!*****************************************!*\
!*** ./src/story-timeline-step/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 {
year
} = attributes;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
className: `story-timeline-step`,
id: `year-${year}`
}),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p", {
className: "story-timeline-step__year",
children: year
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
className: "story-timeline-step__innerblocks",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
})]
});
}
/***/ }),
/***/ "./src/story-timeline-step/style.scss":
/*!********************************************!*\
!*** ./src/story-timeline-step/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 = {
/******/ "story-timeline-step/index": 0,
/******/ "story-timeline-step/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, ["story-timeline-step/style-index"], () => (__webpack_require__("./src/story-timeline-step/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

@ -0,0 +1,4 @@
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/story-timeline-step/style.scss ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -0,0 +1,4 @@
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/story-timeline-step/style.scss ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'd2129832e5692d3e6ebe');

View File

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

View File

@ -0,0 +1,20 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "carhop-blocks/story-timeline",
"version": "0.1.0",
"title": "Timeline",
"category": "carhop-blocks",
"icon": "calendar-alt",
"description": "Boite de timeline pour la mise en forme d'une timeline",
"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"
}

View File

@ -0,0 +1,4 @@
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/story-timeline/editor.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

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

View File

@ -0,0 +1,4 @@
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/story-timeline/editor.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -0,0 +1,385 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/story-timeline/block.json":
/*!***************************************!*\
!*** ./src/story-timeline/block.json ***!
\***************************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/story-timeline","version":"0.1.0","title":"Timeline","category":"carhop-blocks","icon":"calendar-alt","description":"Boite de timeline pour la mise en forme d\'une timeline","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"}');
/***/ }),
/***/ "./src/story-timeline/edit.js":
/*!************************************!*\
!*** ./src/story-timeline/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_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/story-timeline/editor.scss");
/* 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 years = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => {
const {
getBlocks
} = select("core/block-editor");
const childBlocks = getBlocks(props.clientId) || [];
return childBlocks.filter(b => b.name === "carhop-blocks/story-timeline-step").map(b => b.attributes?.year).filter(y => y !== undefined && y !== null && y !== "");
}, [props.clientId]);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("section", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
className: `story-timeline`
}),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("aside", {
className: "story-timeline__years",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("ul", {
children: years.map((y, idx) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("li", {
className: "story-timeline__year",
children: y
}, idx))
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
className: "story-timeline__innerblocks",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
allowedBlocks: ["carhop-blocks/story-timeline-step"]
})
})]
})
});
}
/***/ }),
/***/ "./src/story-timeline/editor.scss":
/*!****************************************!*\
!*** ./src/story-timeline/editor.scss ***!
\****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./src/story-timeline/index.js":
/*!*************************************!*\
!*** ./src/story-timeline/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/story-timeline/style.scss");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/story-timeline/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/story-timeline/save.js");
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/story-timeline/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: "100",
height: "100",
viewBox: "0 0 100 100",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("g", {
stroke: "null",
id: "svg_10",
class: "fills",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
stroke: "null",
d: "m3.74998,19.74151c0,-8.82607 7.16546,-15.99153 15.99153,-15.99153l60.51698,0c8.82607,0 15.99153,7.16546 15.99153,15.99153l0,60.51698c0,8.82607 -7.16546,15.99153 -15.99153,15.99153l-60.51698,0c-8.82607,0 -15.99153,-7.16546 -15.99153,-15.99153l0,-60.51698zm22.57628,3.44915l0,53.61867l23.67374,-18.7148l23.67374,18.7148l0,-53.61867l-47.34748,0z"
})
})
})
},
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
});
/***/ }),
/***/ "./src/story-timeline/save.js":
/*!************************************!*\
!*** ./src/story-timeline/save.js ***!
\************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ save)
/* harmony export */ });
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
function save({
attributes
}) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {});
}
/***/ }),
/***/ "./src/story-timeline/style.scss":
/*!***************************************!*\
!*** ./src/story-timeline/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/data":
/*!******************************!*\
!*** external ["wp","data"] ***!
\******************************/
/***/ ((module) => {
module.exports = window["wp"]["data"];
/***/ }),
/***/ "@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 = {
/******/ "story-timeline/index": 0,
/******/ "story-timeline/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, ["story-timeline/style-index"], () => (__webpack_require__("./src/story-timeline/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

@ -0,0 +1,28 @@
<?php
$wrapper_attributes = get_block_wrapper_attributes(array('class' => 'story-timeline'));
$years = array();
if (isset($block) && is_object($block) && ! empty($block->inner_blocks)) {
foreach ($block->inner_blocks as $inner_block) {
if (isset($inner_block->name) && $inner_block->name === 'carhop-blocks/story-timeline-step') {
$y = isset($inner_block->attributes['year']) ? $inner_block->attributes['year'] : null;
if ($y !== null && $y !== '') {
$years[] = $y;
}
}
}
}
?>
<section <?php echo $wrapper_attributes; ?>>
<aside class="story-timeline__years">
<ul>
<?php foreach ($years as $y) : ?>
<li class="story-timeline__year"><a href="#year-<?php echo esc_attr($y); ?>"><?php echo esc_html($y); ?></a></li>
<?php endforeach; ?>
</ul>
</aside>
<div class="story-timeline__innerblocks" id="<?php echo esc_attr($years[0]); ?>">
<?php echo $content; ?>
</div>
</section>

View File

@ -0,0 +1,4 @@
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/story-timeline/style.scss ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -0,0 +1,4 @@
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/story-timeline/style.scss ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'a1583741b597107d2926');

View File

@ -0,0 +1,58 @@
/******/ (() => { // webpackBootstrap
/*!************************************!*\
!*** ./src/story-timeline/view.js ***!
\************************************/
document.addEventListener("DOMContentLoaded", function () {
const timeline = document.querySelector(".wp-block-carhop-blocks-story-timeline");
if (!timeline) return;
function initBlock() {
const years = timeline.querySelectorAll(".story-timeline__year");
years.forEach((year, index) => {
year.setAttribute("data-active", index === 0 ? "true" : "false");
});
}
function removePreviousActiveLinkInSidebar() {
const activeSidebarLinks = document.querySelectorAll(`.story-timeline__years .story-timeline__year[data-active="true"]`);
activeSidebarLinks.forEach(sidebarLink => {
sidebarLink.setAttribute("data-active", "false");
});
}
const timelineStepsProgressionObserver = new IntersectionObserver(entries => {
// Ne pas traiter les entrées si l'observer est en pause (pendant un clic)
// const isIntersetionObserverPaused = getChapterObserverPausedState();
// if (isIntersetionObserverPaused) return;
entries.forEach(entry => {
const blockId = entry.target.getAttribute("id");
const relatedStepLink = document.querySelector(`a[href="#${blockId}"]`);
console.log(relatedStepLink);
if (entry.isIntersecting) {
removePreviousActiveLinkInSidebar();
// setActiveLinkInSidebar();
entry.target.setAttribute("active", "true");
relatedStepLink?.parentElement?.setAttribute("data-active", "true");
}
});
}, {
rootMargin: "-10% 0px -50% 0px"
});
const timelineSteps = document.querySelectorAll(".story-timeline__innerblocks .wp-block-carhop-blocks-story-timeline-step");
console.log(timelineSteps);
timelineSteps.forEach(step => {
timelineStepsProgressionObserver.observe(step);
});
initBlock();
});
// Initialiser les écouteurs de liens
// observeChapterLinks();
// // Observer tous les titres h2 de l'article
// const titlesBlocks = document.querySelectorAll('.article-content h2');
// titlesBlocks.forEach((block) => {
// chapterProgressionObserver.observe(block);
// });
/******/ })()
;
//# sourceMappingURL=view.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"story-timeline/view.js","mappings":";;;;AAAAA,QAAQ,CAACC,gBAAgB,CAAC,kBAAkB,EAAE,YAAY;EACzD,MAAMC,QAAQ,GAAGF,QAAQ,CAACG,aAAa,CACtC,wCACD,CAAC;EACD,IAAI,CAACD,QAAQ,EAAE;EAEf,SAASE,SAASA,CAAA,EAAG;IACpB,MAAMC,KAAK,GAAGH,QAAQ,CAACI,gBAAgB,CAAC,uBAAuB,CAAC;IAChED,KAAK,CAACE,OAAO,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK;MAC9BD,IAAI,CAACE,YAAY,CAAC,aAAa,EAAED,KAAK,KAAK,CAAC,GAAG,MAAM,GAAG,OAAO,CAAC;IACjE,CAAC,CAAC;EACH;EAEA,SAASE,iCAAiCA,CAAA,EAAG;IAC5C,MAAMC,kBAAkB,GAAGZ,QAAQ,CAACM,gBAAgB,CACnD,kEACD,CAAC;IAEDM,kBAAkB,CAACL,OAAO,CAAEM,WAAW,IAAK;MAC3CA,WAAW,CAACH,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC;IACjD,CAAC,CAAC;EACH;EAEA,MAAMI,gCAAgC,GAAG,IAAIC,oBAAoB,CAC/DC,OAAO,IAAK;IACZ;IACA;IACA;;IAEAA,OAAO,CAACT,OAAO,CAAEU,KAAK,IAAK;MAC1B,MAAMC,OAAO,GAAGD,KAAK,CAACE,MAAM,CAACC,YAAY,CAAC,IAAI,CAAC;MAC/C,MAAMC,eAAe,GAAGrB,QAAQ,CAACG,aAAa,CAAC,YAAYe,OAAO,IAAI,CAAC;MACvEI,OAAO,CAACC,GAAG,CAACF,eAAe,CAAC;MAE5B,IAAIJ,KAAK,CAACO,cAAc,EAAE;QACzBb,iCAAiC,CAAC,CAAC;QACnC;;QAEAM,KAAK,CAACE,MAAM,CAACT,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC3CW,eAAe,EAAEI,aAAa,EAAEf,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC;MACpE;IACD,CAAC,CAAC;EACH,CAAC,EACD;IACCgB,UAAU,EAAE;EACb,CACD,CAAC;EAED,MAAMC,aAAa,GAAG3B,QAAQ,CAACM,gBAAgB,CAC9C,0EACD,CAAC;EACDgB,OAAO,CAACC,GAAG,CAACI,aAAa,CAAC;EAC1BA,aAAa,CAACpB,OAAO,CAAEqB,IAAI,IAAK;IAC/Bd,gCAAgC,CAACe,OAAO,CAACD,IAAI,CAAC;EAC/C,CAAC,CAAC;EAEFxB,SAAS,CAAC,CAAC;AACZ,CAAC,CAAC;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,M","sources":["webpack://carhop-blocks/./src/story-timeline/view.js"],"sourcesContent":["document.addEventListener(\"DOMContentLoaded\", function () {\r\n\tconst timeline = document.querySelector(\r\n\t\t\".wp-block-carhop-blocks-story-timeline\"\r\n\t);\r\n\tif (!timeline) return;\r\n\r\n\tfunction initBlock() {\r\n\t\tconst years = timeline.querySelectorAll(\".story-timeline__year\");\r\n\t\tyears.forEach((year, index) => {\r\n\t\t\tyear.setAttribute(\"data-active\", index === 0 ? \"true\" : \"false\");\r\n\t\t});\r\n\t}\r\n\r\n\tfunction removePreviousActiveLinkInSidebar() {\r\n\t\tconst activeSidebarLinks = document.querySelectorAll(\r\n\t\t\t`.story-timeline__years .story-timeline__year[data-active=\"true\"]`\r\n\t\t);\r\n\r\n\t\tactiveSidebarLinks.forEach((sidebarLink) => {\r\n\t\t\tsidebarLink.setAttribute(\"data-active\", \"false\");\r\n\t\t});\r\n\t}\r\n\r\n\tconst timelineStepsProgressionObserver = new IntersectionObserver(\r\n\t\t(entries) => {\r\n\t\t\t// Ne pas traiter les entrées si l'observer est en pause (pendant un clic)\r\n\t\t\t// const isIntersetionObserverPaused = getChapterObserverPausedState();\r\n\t\t\t// if (isIntersetionObserverPaused) return;\r\n\r\n\t\t\tentries.forEach((entry) => {\r\n\t\t\t\tconst blockId = entry.target.getAttribute(\"id\");\r\n\t\t\t\tconst relatedStepLink = document.querySelector(`a[href=\"#${blockId}\"]`);\r\n\t\t\t\tconsole.log(relatedStepLink);\r\n\r\n\t\t\t\tif (entry.isIntersecting) {\r\n\t\t\t\t\tremovePreviousActiveLinkInSidebar();\r\n\t\t\t\t\t// setActiveLinkInSidebar();\r\n\r\n\t\t\t\t\tentry.target.setAttribute(\"active\", \"true\");\r\n\t\t\t\t\trelatedStepLink?.parentElement?.setAttribute(\"data-active\", \"true\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\t\t{\r\n\t\t\trootMargin: \"-10% 0px -50% 0px\",\r\n\t\t}\r\n\t);\r\n\r\n\tconst timelineSteps = document.querySelectorAll(\r\n\t\t\".story-timeline__innerblocks .wp-block-carhop-blocks-story-timeline-step\"\r\n\t);\r\n\tconsole.log(timelineSteps);\r\n\ttimelineSteps.forEach((step) => {\r\n\t\ttimelineStepsProgressionObserver.observe(step);\r\n\t});\r\n\r\n\tinitBlock();\r\n});\r\n\r\n// Initialiser les écouteurs de liens\r\n// observeChapterLinks();\r\n\r\n// // Observer tous les titres h2 de l'article\r\n// const titlesBlocks = document.querySelectorAll('.article-content h2');\r\n// titlesBlocks.forEach((block) => {\r\n// chapterProgressionObserver.observe(block);\r\n// });\r\n"],"names":["document","addEventListener","timeline","querySelector","initBlock","years","querySelectorAll","forEach","year","index","setAttribute","removePreviousActiveLinkInSidebar","activeSidebarLinks","sidebarLink","timelineStepsProgressionObserver","IntersectionObserver","entries","entry","blockId","target","getAttribute","relatedStepLink","console","log","isIntersecting","parentElement","rootMargin","timelineSteps","step","observe"],"ignoreList":[],"sourceRoot":""}

View File

@ -336,8 +336,9 @@ export default function Edit({ attributes, setAttributes, ...props }) {
"core/list",
"core/button",
"core/buttons",
"carhop-blocks/cta",
"carhop-blocks/heading",
"carhop-blocks/cta",
"carhop-blocks/cta-group",
]}
/>
</div>

View File

@ -30,7 +30,7 @@ export default function save({ attributes }) {
${
hasLightBackground
? "chapter-section--bg-light"
: "chapter-section--bg-dark"
: " "
}`,
style: {
"--chapter-section-text-color": textColor ? textColor : "#136f63",

View File

@ -0,0 +1,71 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "telex/block-company-timeline",
"version": "0.1.0",
"title": "Company Timeline",
"category": "design",
"icon": "calendar-alt",
"description": "Display company milestones with a fixed sidebar navigation and scroll-based highlighting",
"keywords": [
"timeline",
"history",
"milestones",
"chronology",
"events"
],
"attributes": {
"entries": {
"type": "array",
"default": [
{
"year": "2020",
"title": "Company Founded",
"description": "Our journey began with a vision to make a difference.",
"imageUrl": "",
"imageId": 0
}
]
}
},
"example": {
"attributes": {
"entries": [
{
"year": "2010",
"title": "The Beginning",
"description": "Founded with a mission to innovate.",
"imageUrl": "",
"imageId": 0
},
{
"year": "2015",
"title": "Major Milestone",
"description": "Reached 1 million customers worldwide.",
"imageUrl": "",
"imageId": 0
},
{
"year": "2020",
"title": "Global Expansion",
"description": "Opened offices in 25 countries.",
"imageUrl": "",
"imageId": 0
}
]
}
},
"supports": {
"html": false,
"anchor": true,
"align": [
"wide",
"full"
]
},
"textdomain": "company-timeline",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js"
}

View File

@ -0,0 +1,219 @@
import { __ } from "@wordpress/i18n";
import {
useBlockProps,
InspectorControls,
MediaUpload,
MediaUploadCheck,
RichText,
} from "@wordpress/block-editor";
import {
PanelBody,
Button,
TextControl,
Card,
CardBody,
CardHeader,
IconButton,
} from "@wordpress/components";
import { useState } from "@wordpress/element";
import "./editor.scss";
export default function Edit({ attributes, setAttributes }) {
const { entries } = attributes;
const [selectedYear, setSelectedYear] = useState(null);
const addEntry = () => {
const newEntries = [
...entries,
{
year: new Date().getFullYear().toString(),
title: "",
description: "",
imageUrl: "",
imageId: 0,
},
];
setAttributes({ entries: newEntries });
};
const updateEntry = (index, field, value) => {
const newEntries = [...entries];
newEntries[index] = {
...newEntries[index],
[field]: value,
};
setAttributes({ entries: newEntries });
};
const removeEntry = (index) => {
const newEntries = entries.filter((_, i) => i !== index);
setAttributes({ entries: newEntries });
};
const sortedEntries = [...entries].sort(
(a, b) => parseInt(a.year) - parseInt(b.year)
);
const years = [...new Set(sortedEntries.map((entry) => entry.year))];
return (
<>
<InspectorControls>
<PanelBody title={__("Timeline Entries", "company-timeline")}>
<Button
variant="primary"
onClick={addEntry}
style={{ marginBottom: "16px" }}
>
{__("Add Timeline Entry", "company-timeline")}
</Button>
{sortedEntries.map((entry, index) => {
const originalIndex = entries.findIndex(
(e) =>
e.year === entry.year &&
e.title === entry.title &&
e.description === entry.description
);
return (
<Card key={index} style={{ marginBottom: "12px" }}>
<CardHeader>
<strong>
{entry.year || __("New Entry", "company-timeline")}
</strong>
</CardHeader>
<CardBody>
<TextControl
label={__("Year", "company-timeline")}
value={entry.year}
onChange={(value) =>
updateEntry(originalIndex, "year", value)
}
type="number"
/>
<Button
isDestructive
onClick={() => removeEntry(originalIndex)}
style={{ marginTop: "8px" }}
>
{__("Remove Entry", "company-timeline")}
</Button>
</CardBody>
</Card>
);
})}
</PanelBody>
</InspectorControls>
<div {...useBlockProps()}>
<div className="wp-block-telex-company-timeline">
<div className="timeline-sidebar">
<div className="timeline-years">
<h3>{__("Timeline", "company-timeline")}</h3>
{years.map((year) => (
<button
key={year}
className={`year-link ${
selectedYear === year ? "active" : ""
}`}
onClick={() => setSelectedYear(year)}
>
{year}
</button>
))}
</div>
</div>
<div className="timeline-content">
{sortedEntries.map((entry, index) => {
const originalIndex = entries.findIndex(
(e) =>
e.year === entry.year &&
e.title === entry.title &&
e.description === entry.description
);
return (
<div
key={index}
className="timeline-entry"
data-year={entry.year}
>
<div className="timeline-year-marker">
<h2>{entry.year}</h2>
</div>
<div className="timeline-entry-content">
<RichText
tagName="h3"
value={entry.title}
onChange={(value) =>
updateEntry(originalIndex, "title", value)
}
placeholder={__(
"Enter milestone title...",
"company-timeline"
)}
className="timeline-title"
/>
<RichText
tagName="p"
value={entry.description}
onChange={(value) =>
updateEntry(originalIndex, "description", value)
}
placeholder={__(
"Enter milestone description...",
"company-timeline"
)}
className="timeline-description"
/>
<MediaUploadCheck>
<MediaUpload
onSelect={(media) => {
updateEntry(originalIndex, "imageUrl", media.url);
updateEntry(originalIndex, "imageId", media.id);
}}
allowedTypes={["image"]}
value={entry.imageId}
render={({ open }) => (
<div className="timeline-media">
{entry.imageUrl ? (
<>
<img src={entry.imageUrl} alt={entry.title} />
<Button
isDestructive
onClick={() => {
updateEntry(originalIndex, "imageUrl", "");
updateEntry(originalIndex, "imageId", 0);
}}
>
{__("Remove Image", "company-timeline")}
</Button>
</>
) : (
<Button onClick={open} variant="secondary">
{__("Add Image", "company-timeline")}
</Button>
)}
</div>
)}
/>
</MediaUploadCheck>
</div>
</div>
);
})}
</div>
</div>
</div>
</>
);
}

View File

@ -0,0 +1,43 @@
/**
* 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,
.timeline-description {
&:focus {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
}
.timeline-media {
button {
margin-top: 12px;
}
}
}
}
.components-panel__body {
.components-card {
margin-bottom: 12px;
.components-card__header {
border-bottom: 1px solid #e2e8f0;
}
.components-card__body {
.components-base-control {
margin-bottom: 16px;
&:last-child {
margin-bottom: 0;
}
}
}
}
}

View File

@ -0,0 +1,39 @@
/**
* Registers a new block provided a unique name and an object defining its behavior.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
*/
import { registerBlockType } from '@wordpress/blocks';
/**
* Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
* All files containing `style` keyword are bundled together. The code used
* gets applied both to the front of your site and to the editor.
*
* @see https://www.npmjs.com/package/@wordpress/scripts#using-css
*/
import './style.scss';
/**
* Internal dependencies
*/
import Edit from './edit';
import save from './save';
import metadata from './block.json';
/**
* Every block starts by registering a new block type definition.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
*/
registerBlockType( metadata.name, {
/**
* @see ./edit.js
*/
edit: Edit,
/**
* @see ./save.js
*/
save,
} );

View File

@ -0,0 +1,88 @@
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
*/
import { useBlockProps, RichText } from '@wordpress/block-editor';
/**
* The save function defines the way in which the different attributes should
* be combined into the final markup, which is then serialized by the block
* editor into `post_content`.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save
*
* @param {Object} props Block properties
* @return {Element} Element to render.
*/
export default function save( { attributes } ) {
const { entries } = attributes;
const sortedEntries = [ ...entries ].sort( ( a, b ) =>
parseInt( a.year ) - parseInt( b.year )
);
const years = [ ...new Set( sortedEntries.map( entry => entry.year ) ) ];
return (
<div { ...useBlockProps.save() }>
<div className="wp-block-telex-company-timeline">
<div className="timeline-sidebar">
<div className="timeline-years">
<h3>Timeline</h3>
{ years.map( ( year ) => (
<a
key={ year }
href={ `#year-${ year }` }
className="year-link"
data-year={ year }
>
{ year }
</a>
) ) }
</div>
</div>
<div className="timeline-content">
{ sortedEntries.map( ( entry, index ) => (
<div
key={ index }
className="timeline-entry"
id={ `year-${ entry.year }` }
data-year={ entry.year }
>
<div className="timeline-year-marker">
<h2>{ entry.year }</h2>
</div>
<div className="timeline-entry-content">
{ entry.title && (
<RichText.Content
tagName="h3"
value={ entry.title }
className="timeline-title"
/>
) }
{ entry.description && (
<RichText.Content
tagName="p"
value={ entry.description }
className="timeline-description"
/>
) }
{ entry.imageUrl && (
<div className="timeline-media">
<img src={ entry.imageUrl } alt={ entry.title || '' } />
</div>
) }
</div>
</div>
) ) }
</div>
</div>
</div>
);
}

View File

@ -0,0 +1,198 @@
/**
* 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;
.timeline-sidebar {
flex: 0 0 200px;
position: sticky;
top: 100px;
height: fit-content;
align-self: flex-start;
.timeline-years {
background: #f8f9fa;
border-radius: 8px;
padding: 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
h3 {
margin: 0 0 20px 0;
font-size: 18px;
font-weight: 700;
color: #1e293b;
border-bottom: 2px solid #e2e8f0;
padding-bottom: 12px;
}
.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;
&:hover {
background: #e2e8f0;
color: #1e293b;
transform: translateX(4px);
}
&.active {
background: #3b82f6;
color: white;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
}
}
}
.timeline-content {
flex: 1;
min-width: 0;
.timeline-entry {
margin-bottom: 80px;
scroll-margin-top: 100px;
&:last-child {
margin-bottom: 0;
}
.timeline-year-marker {
margin-bottom: 24px;
position: relative;
padding-left: 40px;
&::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);
}
h2 {
margin: 0;
font-size: 32px;
font-weight: 800;
color: #1e293b;
line-height: 1;
}
}
.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;
.timeline-title {
margin: 0 0 16px 0;
font-size: 24px;
font-weight: 700;
color: #1e293b;
}
.timeline-description {
margin: 0 0 24px 0;
font-size: 16px;
line-height: 1.8;
color: #475569;
}
.timeline-media {
margin-top: 24px;
img {
width: 100%;
height: auto;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
}
}
}
}
@media (max-width: 768px) {
flex-direction: column;
gap: 30px;
padding: 20px 15px;
.timeline-sidebar {
position: static;
flex: 1;
.timeline-years {
padding: 16px;
h3 {
font-size: 16px;
margin-bottom: 12px;
}
.year-link {
padding: 10px 12px;
font-size: 14px;
}
}
}
.timeline-content {
.timeline-entry {
margin-bottom: 50px;
.timeline-year-marker {
padding-left: 30px;
&::before {
width: 18px;
height: 18px;
}
h2 {
font-size: 24px;
}
}
.timeline-entry-content {
padding: 20px;
.timeline-title {
font-size: 20px;
}
.timeline-description {
font-size: 15px;
}
}
}
}
}
}

View File

@ -0,0 +1,67 @@
/**
* 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 );
} );
} );

View File

@ -185,13 +185,17 @@ export default function Edit({ attributes, setAttributes, ...props }) {
"core/pullquote",
"core/media-text",
"core/table",
"carhop-blocks/chapter-section",
"carhop-blocks/heading",
"carhop-blocks/decorative-shapes",
"carhop-blocks/scroll-story-block",
"carhop-blocks/cta",
"carhop-blocks/cta-group",
"carhop-blocks/audio-player",
"carhop-blocks/localisation-map",
"carhop-blocks/notice-panel",
"carhop-blocks/story-timeline",
"carhop-blocks/highlight-timeline",
"acf/statistics-datas",
"ninja-forms/form",
"gravityforms/form",

View File

@ -0,0 +1,28 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "carhop-blocks/highlight-timeline-step",
"version": "0.1.0",
"title": "Étape de timeline",
"category": "carhop-blocks",
"icon": "calendar",
"description": "Étape de timeline pour la mise en forme d'une étape de timeline",
"example": {},
"parent": [
"carhop-blocks/highlight-timeline"
],
"supports": {
"html": false
},
"textdomain": "carhop-blocks",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js",
"attributes": {
"year": {
"type": "number",
"default": 2025
}
}
}

View File

@ -0,0 +1,81 @@
import { __ } from "@wordpress/i18n";
import { useBlockProps, InnerBlocks } from "@wordpress/block-editor";
import "./editor.scss";
import {
PanelBody,
Card,
CardBody,
CardHeader,
TextControl,
Button,
__experimentalNumberControl as NumberControl,
} from "@wordpress/components";
import { InspectorControls } from "@wordpress/block-editor";
import { RichText } from "@wordpress/block-editor";
import TimelineYearBackground from "./timelineYearBackground";
export default function Edit({ attributes, setAttributes, ...props }) {
const { year } = attributes;
return (
<>
<InspectorControls>
<PanelBody title={__("Étape de timeline", "carhop-blocks")}>
<NumberControl
label={__("Année", "carhop-blocks")}
value={year}
onChange={(value) => {
const n = parseInt(value, 10);
setAttributes({ year: Number.isFinite(n) ? n : undefined });
}}
/>
</PanelBody>
</InspectorControls>
<div
{...useBlockProps({
className: `highlight-timeline-step`,
id: `year-${year}`,
})}
>
<div className="highlight-timeline-step__year">
<p className="highlight-timeline-step__year-text">{year}</p>
<TimelineYearBackground />
</div>
<div className="highlight-timeline-step__innerblocks">
<InnerBlocks
allowedBlocks={[
"core/heading",
"core/paragraph",
"core/group",
"core/list",
"core/button",
"core/image",
"core/buttons",
"core/columns",
"core/post-title",
"core/embed",
"core/quote",
"core/pullquote",
"core/media-text",
"core/table",
"carhop-blocks/image-stack",
"carhop-blocks/heading",
"carhop-blocks/decorative-shapes",
"carhop-blocks/scroll-highlight-block",
"carhop-blocks/cta-group",
"carhop-blocks/audio-player",
"carhop-blocks/localisation-map",
"carhop-blocks/notice-panel",
"acf/statistics-datas",
"ninja-forms/form",
"gravityforms/form",
"dynamiques-blocks/sitemap",
"mailpoet/subscription-form-block",
"shortcode",
]}
/>
</div>
</div>
</>
);
}

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