From a5ca0ce5c97030b3d8bca93ab7b46871510be93a Mon Sep 17 00:00:00 2001 From: aphandersen Date: Sun, 12 Apr 2026 16:27:21 +0000 Subject: [PATCH] Delete cv-experience-blocks/block.js --- cv-experience-blocks/block.js | 102 ---------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 cv-experience-blocks/block.js diff --git a/cv-experience-blocks/block.js b/cv-experience-blocks/block.js deleted file mode 100644 index 8fb686c..0000000 --- a/cv-experience-blocks/block.js +++ /dev/null @@ -1,102 +0,0 @@ -const el = wp.element.createElement; -const { registerBlockType } = wp.blocks; -const { RichText, InnerBlocks } = wp.blockEditor; - -// COMPANY -registerBlockType('cv/company', { - title: 'Company (CV)', - icon: 'building', - category: 'layout', - - attributes: { - name: { type: 'string', default: '' }, - dates: { type: 'string', default: '' } - }, - - edit: ({ attributes, setAttributes }) => - el('div', { className: 'cv-company' }, - - el(RichText, { - tagName: 'div', - className: 'cv-company-name', - placeholder: 'Company Name', - value: attributes.name, - onChange: val => setAttributes({ name: val }) - }), - - el(RichText, { - tagName: 'div', - className: 'cv-company-dates', - placeholder: 'Years (e.g. 2020 - 2024)', - value: attributes.dates, - onChange: val => setAttributes({ dates: val }) - }), - - el(InnerBlocks, { - allowedBlocks: ['cv/position'], - template: [['cv/position']] - }) - ), - - save: ({ attributes }) => - el('div', { className: 'cv-company' }, - el('div', { className: 'cv-company-name' }, el('strong', null, attributes.name)), - el('div', { className: 'cv-company-dates' }, attributes.dates), - el(InnerBlocks.Content, null) - ) -}); - -// POSITION -registerBlockType('cv/position', { - title: 'Position (CV)', - icon: 'id', - parent: ['cv/company'], - category: 'layout', - - attributes: { - title: { type: 'string', default: '' }, - department: { type: 'string', default: '' }, - dates: { type: 'string', default: '' } - }, - - edit: ({ attributes, setAttributes }) => - el('div', { className: 'cv-position' }, - - el(RichText, { - tagName: 'div', - className: 'cv-position-title', - placeholder: 'Job Title', - value: attributes.title, - onChange: val => setAttributes({ title: val }) - }), - - el(RichText, { - tagName: 'div', - className: 'cv-position-department', - placeholder: 'Department', - value: attributes.department, - onChange: val => setAttributes({ department: val }) - }), - - el(RichText, { - tagName: 'div', - className: 'cv-position-dates', - placeholder: 'Period', - value: attributes.dates, - onChange: val => setAttributes({ dates: val }) - }), - - el(InnerBlocks, { - allowedBlocks: ['core/list'], - template: [['core/list']] - }) - ), - - save: ({ attributes }) => - el('div', { className: 'cv-position' }, - el('div', { className: 'cv-position-title' }, el('strong', null, attributes.title)), - el('div', { className: 'cv-position-department' }, attributes.department), - el('div', { className: 'cv-position-dates' }, attributes.dates), - el(InnerBlocks.Content, null) - ) -});