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

Commit

Permalink
Update patterns copy (#11997)
Browse files Browse the repository at this point in the history
  • Loading branch information
albarin authored Dec 1, 2023
1 parent 26e367a commit 174922e
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 76 deletions.
4 changes: 3 additions & 1 deletion patterns/featured-category-focus.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Automattic\WooCommerce\Blocks\Patterns\PatternsHelper;

$category_title = $content['titles'][0]['default'] ?? '';

$button = $content['buttons'][0]['default'] ?? '';
?>

<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|70","right":"var:preset|spacing|70","bottom":"var:preset|spacing|70","left":"var:preset|spacing|70"}}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"center","flexWrap":"wrap"}} -->
Expand All @@ -26,7 +28,7 @@
<div class="wp-block-buttons">
<!-- wp:button {"style":{"color":{"text":"#ffffff","background":"#000000"},"border":{"width":"0px","style":"none"}}} -->
<div class="wp-block-button">
<a href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>" class="wp-block-button__link has-text-color has-background wp-element-button" style="border-style:none;border-width:0px;color:#ffffff;background-color:#000000">Shop now</a>
<a href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>" class="wp-block-button__link has-text-color has-background wp-element-button" style="border-style:none;border-width:0px;color:#ffffff;background-color:#000000"><?php echo esc_html( $button ); ?></a>
</div>
<!-- /wp:button -->
</div>
Expand Down
4 changes: 3 additions & 1 deletion patterns/hero-product-chessboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
$first_description = $content['descriptions'][0]['default'] ?? '';
$second_description = $content['descriptions'][1]['default'] ?? '';
$third_description = $content['descriptions'][2]['default'] ?? '';

$button = $content['buttons'][0]['default'] ?? '';
?>

<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"80px"}}},"layout":{"type":"constrained"}} -->
Expand Down Expand Up @@ -54,7 +56,7 @@
<div class="wp-block-buttons" style="margin-top:64px">
<!-- wp:button {"textAlign":"left"} -->
<div class="wp-block-button has-custom-font-size">
<a class="wp-block-button__link has-text-align-left wp-element-button" href="<?php echo esc_url( get_permalink( wc_get_page_id( 'shop' ) ) ); ?>">Shop now</a>
<a class="wp-block-button__link has-text-align-left wp-element-button" href="<?php echo esc_url( get_permalink( wc_get_page_id( 'shop' ) ) ); ?>"><?php echo esc_html( $button ); ?></a>
</div>
<!-- /wp:button -->
</div>
Expand Down
4 changes: 2 additions & 2 deletions patterns/hero-product-split.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
<div class="wp-block-buttons" style="margin-bottom:var(--wp--preset--spacing--40)">
<!-- wp:button -->
<div class="wp-block-button">
<a href="<?php echo esc_url( get_permalink( wc_get_page_id( 'shop' ) ) ); ?>" class="wp-block-button__link wp-element-button"><?php esc_html_e( 'Shop now', 'woo-gutenberg-products-block' ); ?></a>
<a href="<?php echo esc_url( get_permalink( wc_get_page_id( 'shop' ) ) ); ?>" class="wp-block-button__link wp-element-button"><?php esc_html_e( 'Shop the sale', 'woo-gutenberg-products-block' ); ?></a>
</div>
<!-- /wp:button -->
</div>
<!-- /wp:buttons -->
</div>

<figure class="wp-block-media-text__media">
<img src="<?php echo esc_url( PatternsHelper::get_image_url( $images, 0, 'images/pattern-placeholders/man-person-winter-photography-guy-statue.jpg' ) ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent a product being showcased in a hero section.', 'woo-gutenberg-products-block' ); ?>" />
<img src="<?php echo esc_url( PatternsHelper::get_image_url( $images, 0, 'images/pattern-placeholders/man-person-winter-photography-statue-coat.png' ) ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent a product being showcased in a hero section.', 'woo-gutenberg-products-block' ); ?>" />
</figure>
</div>
<!-- /wp:media-text -->
34 changes: 13 additions & 21 deletions patterns/product-query-large-image-product-gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,18 @@
* Block Types: core/query/woocommerce/product-query
*/
?>
<!-- wp:query {"query":{"perPage":"4","pages":0,"offset":0,"postType":"product","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"flex","columns":2},"namespace":"woocommerce/product-query"} -->
<div class="wp-block-query"><!-- wp:post-template -->
<!-- wp:woocommerce/product-image {"saleBadgeAlign":"left","isDescendentOfQueryLoop":true} /-->
<!-- wp:group {"style":{"spacing":{"margin":{"top":"0px","bottom":"80px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:80px">
<!-- wp:query {"query":{"perPage":"4","pages":0,"offset":0,"postType":"product","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"flex","columns":2},"namespace":"woocommerce/product-query"} -->
<div class="wp-block-query">
<!-- wp:post-template -->
<!-- wp:woocommerce/product-image {"aspectRatio":"2/3","saleBadgeAlign":"left","isDescendentOfQueryLoop":true} /-->

<!-- wp:post-title {"textAlign":"center","level":3,"isLink":true,"style":{"spacing":{"margin":{"bottom":"0.75rem","top":"0"}}},"fontSize":"medium","__woocommerceNamespace":"woocommerce/product-query/product-title"} /-->
<!-- wp:post-title {"textAlign":"center","level":3,"isLink":true,"style":{"spacing":{"margin":{"bottom":"0.75rem","top":"0"}}},"fontSize":"medium","__woocommerceNamespace":"woocommerce/product-query/product-title"} /-->

<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small","style":{"spacing":{"margin":{"bottom":"0.75rem"}}}} /-->
<!-- /wp:post-template -->

<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} -->
<!-- wp:query-pagination-previous /-->

<!-- wp:query-pagination-numbers /-->

<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination -->

<!-- wp:query-no-results -->
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} -->
<p></p>
<!-- /wp:paragraph -->
<!-- /wp:query-no-results --></div>
<!-- /wp:query -->
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small","style":{"spacing":{"margin":{"bottom":"0.75rem"}}}} /-->
<!-- /wp:post-template -->
</div>
<!-- /wp:query -->
</div>
<!-- /wp:group -->
2 changes: 1 addition & 1 deletion patterns/social-follow-us-in-social-media.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<!-- wp:social-links {"iconColor":"primary","openInNewTab":true,"style":{"spacing":{"blockGap":{"top":"0","left":"16px"}}},"className":"has-icon-color is-style-logos-only","layout":{"type":"flex","justifyContent":"space-between","orientation":"horizontal"}} -->
<ul class="wp-block-social-links has-icon-color is-style-logos-only">
<!-- wp:social-link {"url":"https://twitter.com/","service":"twitter"} /-->
<!-- wp:social-link {"url":"https://x.com","service":"x"} /-->

<!-- wp:social-link {"url":"https://www.instagram.com/","service":"instagram"} /-->

Expand Down
30 changes: 27 additions & 3 deletions patterns/store-info-alt-image-and-text.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

$first_description = $content['descriptions'][0]['default'] ?? '';
$second_description = $content['descriptions'][1]['default'] ?? '';
$list1 = $content['descriptions'][2]['default'] ?? '';
$list2 = $content['descriptions'][3]['default'] ?? '';
$list3 = $content['descriptions'][4]['default'] ?? '';
$list4 = $content['descriptions'][5]['default'] ?? '';

$button = $content['buttons'][0]['default'] ?? '';
?>
Expand All @@ -39,7 +43,7 @@
<!-- wp:column {"verticalAlignment":"center","width":"50%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:50%">
<!-- wp:paragraph {"placeholder":"Content…","style":{"typography":{"textTransform":"uppercase"}}} -->
<p style="text-transform:uppercase"><?php esc_html_e( 'The goods', 'woo-gutenberg-products-block' ); ?></p>
<p style="text-transform:uppercase"><?php echo esc_html( $first_title ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}}}} -->
Expand All @@ -49,6 +53,26 @@
<!-- wp:paragraph -->
<p><?php echo esc_html( $first_description ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul>
<!-- wp:list-item -->
<li><?php echo esc_html( $list1 ); ?></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><?php echo esc_html( $list2 ); ?></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><?php echo esc_html( $list3 ); ?></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><?php echo esc_html( $list4 ); ?></li>
<!-- /wp:list-item -->
</ul>
<!-- /wp:list -->
</div>
<!-- /wp:column -->
</div>
Expand All @@ -72,8 +96,8 @@

<!-- wp:buttons {"style":{"spacing":{"blockGap":"0"}},"fontSize":"small"} -->
<div class="wp-block-buttons has-custom-font-size has-small-font-size">
<!-- wp:button {"className":"is-style-outline"} -->
<div class="wp-block-button is-style-outline">
<!-- wp:button {"className":"is-style-fill"} -->
<div class="wp-block-button is-style-fill">
<a class="wp-block-button__link wp-element-button"><?php echo esc_html( $button ); ?></a>
</div>
<!-- /wp:button -->
Expand Down
6 changes: 3 additions & 3 deletions patterns/testimonials-3-columns.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>~ Tanner P.</p>
<p>~ Sophia K.</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
Expand All @@ -52,7 +52,7 @@
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>~ Abigail N.</p>
<p>~ Liam M.</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
Expand All @@ -68,7 +68,7 @@
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>~ Albert L.</p>
<p>~ Ava L.</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
Expand Down
2 changes: 1 addition & 1 deletion patterns/testimonials-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>~ Anna W.</p>
<p>– Monica P.</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
Expand Down
Loading

0 comments on commit 174922e

Please sign in to comment.