Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit df75bc2

Browse files
authored
Patterns small improvements (#9403)
* Center the menu * Use product image block * Change search button background to white
1 parent 3105070 commit df75bc2

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

patterns/header-centered-search-pattern.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
<!-- /wp:group -->
2020
<!-- wp:group {"style":{"spacing":{"blockGap":"8px"},"typography":{"fontSize":"13px"}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"right"}} -->
2121
<div class="wp-block-group" style="font-size:13px">
22-
<!-- wp:group {"style":{"border":{"top":{"width":"1px","style":"solid"},"right":{"width":"1px","style":"solid"},"bottom":{"width":"1px","style":"solid"},"left":{"width":"1px","style":"solid"}}},"layout":{"type":"flex","orientation":"vertical"}} -->
23-
<div class="wp-block-group" style="border-top-style:solid;border-top-width:1px;border-right-style:solid;border-right-width:1px;border-bottom-style:solid;border-bottom-width:1px;border-left-style:solid;border-left-width:1px"><!-- wp:search {"label":"Search","showLabel":false,"placeholder":"Search our store","width":350,"widthUnit":"px","buttonText":"Search","buttonUseIcon":true,"query":{"post_type":"product"},"style":{"border":{"top":{"width":"0px","style":"none"},"right":{"width":"0px","style":"none"},"bottom":{"width":"0px","style":"none"},"left":{"width":"0px","style":"none"}}},"backgroundColor":"background","textColor":"foreground"} /-->
22+
<!-- wp:group {"style":{"border":{"top":{"width":"1px","style":"solid"},"right":{"width":"1px","style":"solid"},"bottom":{"width":"1px","style":"solid"},"left":{"width":"1px","style":"solid"}},"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"}},"color":{"background":"#ffffff"}},"layout":{"type":"flex","orientation":"vertical"}} -->
23+
<div class="wp-block-group has-background" style="border-top-style:solid;border-top-width:1px;border-right-style:solid;border-right-width:1px;border-bottom-style:solid;border-bottom-width:1px;border-left-style:solid;border-left-width:1px;background-color:#ffffff;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0">
24+
<!-- wp:search {"label":"Search","showLabel":false,"placeholder":"Search our store","width":350,"widthUnit":"px","buttonText":"Search","buttonUseIcon":true,"query":{"post_type":"product"},"style":{"border":{"top":{"width":"0px","style":"none"},"right":{"width":"0px","style":"none"},"bottom":{"width":"0px","style":"none"},"left":{"width":"0px","style":"none"}},"color":{"background":"#ffffff","text":"#000000"}}} /-->
2425
</div>
2526
<!-- /wp:group -->
2627

@@ -36,7 +37,7 @@
3637
<hr class="wp-block-separator alignfull has-alpha-channel-opacity is-style-wide" />
3738
<!-- /wp:separator -->
3839

39-
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"}} -->
40+
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"center"}} -->
4041
<div class="wp-block-group">
4142
<!-- wp:navigation {"style":{"typography":{"fontStyle":"normal","fontWeight":"400"}}} /-->
4243
</div>

patterns/product-collections-featured-collection.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<div class="wp-block-columns alignwide has-white-color has-text-color has-background" style="background-color:#333333;padding-top:1.3rem;padding-right:1.3rem;padding-bottom:1.3rem;padding-left:1.3rem">
1212
<!-- wp:column {"verticalAlignment":"center","width":"33.33%","style":{"spacing":{"padding":{"right":"var:preset|spacing|40","left":"var:preset|spacing|40"}}}} -->
1313
<div class="wp-block-column is-vertically-aligned-center" style="padding-right:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40);flex-basis:33.33%">
14-
<!-- wp:heading {"textAlign":"center","textColor":"background","fontSize":"x-large"} -->
15-
<h2 class="wp-block-heading has-text-align-center has-background-color has-text-color has-x-large-font-size">
16-
<?php echo __( 'This week\'s popular products', 'woo-gutenberg-products-block' ) ?>
14+
<!-- wp:heading {"textAlign":"center","style":{"typography":{"fontStyle":"normal","fontWeight":"700"}},"textColor":"background","fontSize":"x-large"} -->
15+
<h2 class="wp-block-heading has-text-align-center has-background-color has-text-color has-x-large-font-size" style="font-style:normal;font-weight:700">
16+
<?php echo __( 'This week\'s popular products', 'woo-gutenberg-products-block' ); ?>
1717
</h2>
1818
<!-- /wp:heading -->
1919
</div>
@@ -26,7 +26,11 @@
2626
<!-- wp:post-template {"__woocommerceNamespace":"woocommerce/product-query/product-template"} -->
2727
<!-- wp:group {"style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"blockGap":"0"},"color":{"background":"#484848"},"border":{"radius":{"topLeft":"0px","topRight":"0px","bottomLeft":"4px","bottomRight":"4px"}}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
2828
<div class="wp-block-group has-background" style="border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-left-radius:4px;border-bottom-right-radius:4px;background-color:#484848;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0">
29-
<!-- wp:post-featured-image {"isLink":true,"aspectRatio":"4/3","style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"}},"border":{"radius":{"topLeft":"4px","topRight":"4px","bottomLeft":"0px","bottomRight":"0px"},"top":{"color":"#ffffff","style":"solid","width":"3px"},"right":{"color":"#ffffff","style":"solid","width":"3px"},"bottom":{"color":"#ffffff","style":"solid","width":"3px"},"left":{"color":"#ffffff","style":"solid","width":"3px"}}}} /-->
29+
<!-- wp:group {"style":{"border":{"radius":{"topLeft":"4px","topRight":"4px"},"top":{"width":"3px","style":"solid"},"right":{"width":"3px","style":"solid"},"bottom":{"width":"3px","style":"solid"},"left":{"width":"3px","style":"solid"}},"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"blockGap":"0"}},"layout":{"type":"flex","orientation":"vertical"}} -->
30+
<div class="wp-block-group" style="border-top-left-radius:4px;border-top-right-radius:4px;border-top-style:solid;border-top-width:3px;border-right-style:solid;border-right-width:3px;border-bottom-style:solid;border-bottom-width:3px;border-left-style:solid;border-left-width:3px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0">
31+
<!-- wp:woocommerce/product-image {"imageSizing":"thumbnail","isDescendentOfQueryLoop":true} /-->
32+
</div>
33+
<!-- /wp:group -->
3034

3135
<!-- wp:group {"style":{"spacing":{"blockGap":"0","padding":{"top":"20px","right":"20px","left":"20px","bottom":"10px"}},"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"left","verticalAlignment":"center"}} -->
3236
<div class="wp-block-group has-link-color" style="padding-top:20px;padding-right:20px;padding-bottom:10px;padding-left:20px">

0 commit comments

Comments
 (0)