From 3590b53f5ffc60562e1e5181193c3eb60a70e25e Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 20 May 2026 15:50:48 +0200 Subject: [PATCH] cleaned up and made block visible in editor --- src/theatergf-gallery/block.json | 1 - src/theatergf-gallery/edit.js | 6 +++--- src/theatergf-gallery/editor.scss | 9 ++++++++- src/theatergf-gallery/index.js | 9 --------- src/theatergf-gallery/style.scss | 10 ---------- 5 files changed, 11 insertions(+), 24 deletions(-) delete mode 100644 src/theatergf-gallery/style.scss diff --git a/src/theatergf-gallery/block.json b/src/theatergf-gallery/block.json index 888c578..e6a95d9 100644 --- a/src/theatergf-gallery/block.json +++ b/src/theatergf-gallery/block.json @@ -13,7 +13,6 @@ "textdomain": "theatergf-gallery", "editorScript": "file:./index.js", "editorStyle": "file:./index.css", - "style": "file:./style-index.css", "render": "file:./render.php", "viewScript": "file:./view.js" } diff --git a/src/theatergf-gallery/edit.js b/src/theatergf-gallery/edit.js index c9c2797..0567793 100644 --- a/src/theatergf-gallery/edit.js +++ b/src/theatergf-gallery/edit.js @@ -31,8 +31,8 @@ import './editor.scss'; */ export default function Edit() { return ( - - { __( 'Gallery', 'theatergf-gallery' ) } - +
+ +
); } diff --git a/src/theatergf-gallery/editor.scss b/src/theatergf-gallery/editor.scss index 95be2ae..0e2e2da 100644 --- a/src/theatergf-gallery/editor.scss +++ b/src/theatergf-gallery/editor.scss @@ -4,6 +4,13 @@ * Replace them with your own styles or remove the file completely. */ -.wp-block-theatergf-theatergf-gallery { +.wp-block-theatergf-gallery { border: 1px dotted #f00; + width: 100%; + aspect-ratio: 2/1; + overflow: hidden; + + display: flex; + justify-content: center; + align-items: center; } diff --git a/src/theatergf-gallery/index.js b/src/theatergf-gallery/index.js index d82621b..5770e1a 100644 --- a/src/theatergf-gallery/index.js +++ b/src/theatergf-gallery/index.js @@ -5,15 +5,6 @@ */ 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 */ diff --git a/src/theatergf-gallery/style.scss b/src/theatergf-gallery/style.scss deleted file mode 100644 index dd0be6d..0000000 --- a/src/theatergf-gallery/style.scss +++ /dev/null @@ -1,10 +0,0 @@ -/** - * 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-theatergf-theatergf-gallery { - -}