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

Commit bc01e0d

Browse files
authored
Add new Product listing with gallery pattern (#9347)
* Add new `Product listing with gallery` pattern * Replace single product block pattern * Remove ids * Fix title and images * Rebuild the image gallery to make it work on diff widths * Fix image src * Fix gallery image and align description
1 parent 6028cfe commit bc01e0d

File tree

2 files changed

+127
-0
lines changed

2 files changed

+127
-0
lines changed
282 KB
Loading
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
<?php
2+
/**
3+
* Title: Product Listing with Gallery and Description
4+
* Slug: woocommerce-blocks/product-listing-with-gallery-and-description
5+
* Categories: WooCommerce
6+
*/
7+
?>
8+
9+
<!-- wp:columns {"align":"wide","style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"blockGap":{"top":"60px","left":"60px"}}}} -->
10+
<div class="wp-block-columns alignwide" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0">
11+
<!-- wp:column -->
12+
<div class="wp-block-column">
13+
<!-- wp:columns {"isStackedOnMobile":false,"style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"margin":{"top":"0","bottom":"0"},"blockGap":{"top":"1.5rem","left":"1.5rem"}}}} -->
14+
<div class="wp-block-columns is-not-stacked-on-mobile" style="margin-top:0;margin-bottom:0;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0">
15+
<!-- wp:column {"width":"33.33%","style":{"spacing":{"padding":{"top":"0","right":"var:preset|spacing|20","bottom":"0","left":"0"},"blockGap":"0"}},"layout":{"type":"constrained","wideSize":"80px"}} -->
16+
<div class="wp-block-column" style="padding-top:0;padding-right:var(--wp--preset--spacing--20);padding-bottom:0;padding-left:0;flex-basis:33.33%">
17+
<!-- wp:group {"style":{"spacing":{"blockGap":"1rem"}},"layout":{"type":"flex","orientation":"vertical","verticalAlignment":"center","justifyContent":"center"}} -->
18+
<div class="wp-block-group">
19+
<!-- wp:image {"sizeSlug":"thumbnail","linkDestination":"none","style":{"border":{"color":"#dddddd","width":"1px","radius":"5px"}}} -->
20+
<figure class="wp-block-image size-thumbnail is-resized has-custom-border">
21+
<img src="<?php echo esc_url( plugins_url( 'images/pattern-placeholders/product-furniture-1.png', dirname( __FILE__ ) ) ); ?>" alt="" class="has-border-color" style="border-color:#dddddd;border-width:1px;border-radius:5px"/>
22+
</figure>
23+
<!-- /wp:image -->
24+
25+
<!-- wp:image {"sizeSlug":"thumbnail","linkDestination":"none","style":{"border":{"color":"#dddddd","width":"1px","radius":"5px"}}} -->
26+
<figure class="wp-block-image size-thumbnail is-resized has-custom-border">
27+
<img src="<?php echo esc_url( plugins_url( 'images/pattern-placeholders/product-furniture-2.png', dirname( __FILE__ ) ) ); ?>" alt="" class="has-border-color" style="border-color:#dddddd;border-width:1px;border-radius:5px"/>
28+
</figure>
29+
<!-- /wp:image -->
30+
31+
<!-- wp:image {"sizeSlug":"thumbnail","linkDestination":"none","style":{"border":{"color":"#dddddd","width":"1px","radius":"5px"}}} -->
32+
<figure class="wp-block-image size-thumbnail is-resized has-custom-border">
33+
<img src="<?php echo esc_url( plugins_url( 'images/pattern-placeholders/product-furniture-4.png', dirname( __FILE__ ) ) ); ?>" alt="" class="has-border-color" style="border-color:#dddddd;border-width:1px;border-radius:5px"/>
34+
</figure>
35+
<!-- /wp:image -->
36+
</div>
37+
<!-- /wp:group -->
38+
</div>
39+
<!-- /wp:column -->
40+
41+
<!-- wp:column {"width":"66.66%","style":{"spacing":{"blockGap":"0","padding":{"right":"0","bottom":"0","left":"0","top":"20px"}}}} -->
42+
<div class="wp-block-column" style="padding-top:20px;padding-right:0;padding-bottom:0;padding-left:0;flex-basis:66.66%">
43+
<!-- wp:image {"sizeSlug":"full","linkDestination":"none"} -->
44+
<figure class="wp-block-image size-full">
45+
<img src="<?php echo esc_url( plugins_url( 'images/pattern-placeholders/product-furniture-4.png', dirname( __FILE__ ) ) ); ?>" alt="" />
46+
</figure>
47+
<!-- /wp:image -->
48+
</div>
49+
<!-- /wp:column -->
50+
</div>
51+
<!-- /wp:columns -->
52+
</div>
53+
<!-- /wp:column -->
54+
55+
<!-- wp:column -->
56+
<div class="wp-block-column">
57+
<!-- wp:heading {"style":{"typography":{"fontSize":"48px","fontStyle":"normal","fontWeight":"700"}},"textColor":"foreground"} -->
58+
<h2 class="wp-block-heading has-foreground-color has-text-color" style="font-size:48px;font-style:normal;font-weight:700">Wicker Back Dining Chair, Blue Seat, Wood Base</h2>
59+
<!-- /wp:heading -->
60+
61+
<!-- wp:group {"style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"blockGap":"0px","margin":{"top":"10px","bottom":"0px"}}},"layout":{"type":"flex","flexWrap":"nowrap","verticalAlignment":"center"}} -->
62+
<div class="wp-block-group" style="margin-top:10px;margin-bottom:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">
63+
<!-- wp:paragraph {"textColor":"luminous-vivid-amber"} -->
64+
<p class="has-luminous-vivid-amber-color has-text-color">★★★★</p>
65+
<!-- /wp:paragraph -->
66+
67+
<!-- wp:paragraph {"style":{"color":{"text":"#ffe8a4"},"spacing":{"margin":{"right":"5px"}}}} -->
68+
<p class="has-text-color" style="color:#ffe8a4;margin-right:5px">★</p>
69+
<!-- /wp:paragraph -->
70+
71+
<!-- wp:paragraph {"style":{"typography":{"fontSize":"0.7em"}},"textColor":"foreground"} -->
72+
<p class="has-foreground-color has-text-color" style="font-size:0.7em">
73+
<strong>4.2</strong>(1,079 reviews)
74+
</p>
75+
<!-- /wp:paragraph -->
76+
</div>
77+
<!-- /wp:group -->
78+
79+
<!-- wp:group {"style":{"spacing":{"blockGap":"8px","padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"margin":{"top":"2px","bottom":"0px"}}},"layout":{"type":"flex","flexWrap":"nowrap","verticalAlignment":"center"}} -->
80+
<div class="wp-block-group" style="margin-top:2px;margin-bottom:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">
81+
<!-- wp:paragraph {"style":{"typography":{"fontSize":"1.2em"}},"textColor":"foreground"} -->
82+
<p class="has-foreground-color has-text-color" style="font-size:1.2em">
83+
<strong><sup><sub>$</sub></sup>37.49</strong>
84+
</p>
85+
<!-- /wp:paragraph -->
86+
87+
<!-- wp:paragraph {"style":{"typography":{"fontSize":"0.7em"},"layout":{"selfStretch":"fit","flexSize":null},"color":{"text":"#7c0a99"}}} -->
88+
<p class="has-text-color" style="color:#7c0a99;font-size:0.7em">Save $10 <s>was $47.49</s></p>
89+
<!-- /wp:paragraph -->
90+
</div>
91+
<!-- /wp:group -->
92+
93+
<!-- wp:group {"layout":{"type":"constrained","justifyContent":"left"}} -->
94+
<div class="wp-block-group">
95+
<!-- wp:paragraph {"style":{"typography":{"fontSize":"18px"}},"textColor":"foreground"} -->
96+
<p class="has-foreground-color has-text-color" style="font-size:18px">Crafted from solid wood with a rich
97+
walnut finish, this table exudes warmth and sophistication. The clean lines and minimalist design
98+
effortlessly complement a variety of interior styles, from modern to rustic. With its spacious tabletop,
99+
the Urban Loft Dining Table comfortably seats six guests, making it ideal for family dinners, social
100+
gatherings, and special occasions. The sturdy construction ensures lasting durability, while the
101+
easy-to-clean surface allows for hassle-free maintenance.
102+
</p>
103+
<!-- /wp:paragraph -->
104+
</div>
105+
<!-- /wp:group -->
106+
107+
<!-- wp:group {"layout":{"type":"constrained","justifyContent":"left"}} -->
108+
<div class="wp-block-group">
109+
<!-- wp:buttons -->
110+
<div class="wp-block-buttons">
111+
<!-- wp:button {"style":{"spacing":{"padding":{"left":"80px","right":"80px"}},"color":{"text":"#ffffff","background":"#000000"}}} -->
112+
<div class="wp-block-button">
113+
<a class="wp-block-button__link has-text-color has-background wp-element-button" style="color:#ffffff;background-color:#000000;padding-right:80px;padding-left:80px">Add to cart</a>
114+
</div>
115+
<!-- /wp:button -->
116+
</div>
117+
<!-- /wp:buttons -->
118+
119+
<!-- wp:paragraph {"style":{"typography":{"fontSize":"16px"}}} -->
120+
<p style="font-size:16px">SKU 6355793</p>
121+
<!-- /wp:paragraph -->
122+
</div>
123+
<!-- /wp:group -->
124+
</div>
125+
<!-- /wp:column -->
126+
</div>
127+
<!-- /wp:columns -->

0 commit comments

Comments
 (0)