From ba585ab3f1ed37a9dd79b32c7d9469f3c971d9eb Mon Sep 17 00:00:00 2001 From: Luigi Date: Wed, 22 Mar 2023 11:46:30 +0100 Subject: [PATCH] improve layout --- .../product-details/block.json | 4 ++- src/BlockTypes/ProductDetails.php | 9 +++-- .../templates/blockified/single-product.html | 34 +++++++++---------- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/assets/js/atomic/blocks/product-elements/product-details/block.json b/assets/js/atomic/blocks/product-elements/product-details/block.json index cbecc16fec3..c5133768f27 100644 --- a/assets/js/atomic/blocks/product-elements/product-details/block.json +++ b/assets/js/atomic/blocks/product-elements/product-details/block.json @@ -6,7 +6,9 @@ "description": "A block that allows your customers to see details and reviews about the product.", "category": "woocommerce", "keywords": [ "WooCommerce" ], - "supports": {}, + "supports": { + "align": true + }, "textdomain": "woo-gutenberg-products-block", "apiVersion": 2, "$schema": "https://schemas.wp.org/trunk/block.json" diff --git a/src/BlockTypes/ProductDetails.php b/src/BlockTypes/ProductDetails.php index 3a1795279e5..68ff6fc1463 100644 --- a/src/BlockTypes/ProductDetails.php +++ b/src/BlockTypes/ProductDetails.php @@ -1,6 +1,8 @@ - %2$s + '
+ %3$s
', + esc_attr( $classes_and_styles['classes'] ), esc_attr( $classname ), $tabs ); diff --git a/templates/templates/blockified/single-product.html b/templates/templates/blockified/single-product.html index 35034b89062..f0629944710 100644 --- a/templates/templates/blockified/single-product.html +++ b/templates/templates/blockified/single-product.html @@ -1,23 +1,20 @@ - + - +
- -
- -
- -
+ +
+
- + - + @@ -25,7 +22,7 @@
- + @@ -39,12 +36,15 @@
- + + + +