banner.php
2 years ago
coming-soon-entire-site.php
1 year ago
coming-soon-store-only.php
2 years ago
coming-soon.php
2 years ago
discount-banner-with-image.php
2 years ago
discount-banner.php
2 years ago
featured-category-cover-image.php
2 years ago
featured-category-focus.php
2 years ago
featured-category-triple.php
2 years ago
featured-products-fresh-and-tasty.php
2 years ago
filters.php
2 years ago
footer-large-dark.php
2 years ago
footer-large.php
2 years ago
footer-simple-dark.php
2 years ago
footer-simple-menu.php
2 years ago
footer-simple.php
2 years ago
footer-with-2-menus-dark.php
2 years ago
footer-with-2-menus.php
2 years ago
footer-with-3-menus.php
2 years ago
header-centered-pattern.php
2 years ago
header-essential-dark.php
2 years ago
header-essential.php
2 years ago
header-large-dark.php
2 years ago
header-large.php
2 years ago
header-minimal.php
2 years ago
hero-product-3-split.php
2 years ago
hero-product-chessboard.php
2 years ago
hero-product-split.php
2 years ago
just-arrived-full-hero.php
2 years ago
no-products-found-filters.php
1 year ago
no-products-found.php
2 years ago
product-collection-3-columns.php
2 years ago
product-collection-4-columns.php
2 years ago
product-collection-5-columns.php
2 years ago
product-collection-banner.php
2 years ago
product-collection-featured-products-5-columns.php
2 years ago
product-collection-full-grid.php
2 years ago
product-collection-grid.php
2 years ago
product-collection-rows.php
2 years ago
product-collection-simple-grid.php
2 years ago
product-collections-featured-collection.php
2 years ago
product-collections-featured-collections.php
2 years ago
product-collections-newest-arrivals.php
2 years ago
product-details-listing.php
2 years ago
product-details-pattern.php
2 years ago
product-featured-2-columns.php
2 years ago
product-hero-2-col-2-row.php
2 years ago
product-hero.php
2 years ago
product-listing-with-gallery-and-description.php
2 years ago
product-query-4-column-product-row.php
2 years ago
product-query-large-image-product-gallery.php
2 years ago
product-query-minimal-product-list.php
2 years ago
product-query-product-gallery.php
2 years ago
product-query-product-list-with-1-1-images.php
2 years ago
product-query-product-list-with-full-product-description.php
2 years ago
product-search-form.php
1 year ago
related-products.php
2 years ago
shop-by-price.php
2 years ago
small-discount-banner-with-image.php
2 years ago
social-follow-us-in-social-media.php
2 years ago
store-info-alt-image-and-text.php
2 years ago
testimonials-3-columns.php
2 years ago
testimonials-single.php
2 years ago
hero-product-chessboard.php
123 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Title: Hero Product Chessboard |
| 4 | * Slug: woocommerce-blocks/hero-product-chessboard |
| 5 | * Categories: WooCommerce |
| 6 | */ |
| 7 | |
| 8 | use Automattic\WooCommerce\Blocks\AIContent\PatternsHelper; |
| 9 | |
| 10 | $image1 = PatternsHelper::get_image_url( $images, 0, 'assets/images/pattern-placeholders/plant-white-leaf-flower-vase-green.jpg' ); |
| 11 | $image2 = PatternsHelper::get_image_url( $images, 1, 'assets/images/pattern-placeholders/table-wood-house-chair-floor-window.jpg' ); |
| 12 | |
| 13 | $first_title = $content['titles'][0]['default'] ?? ''; |
| 14 | $second_title = $content['titles'][1]['default'] ?? ''; |
| 15 | $third_title = $content['titles'][2]['default'] ?? ''; |
| 16 | |
| 17 | $first_description = $content['descriptions'][0]['default'] ?? ''; |
| 18 | $second_description = $content['descriptions'][1]['default'] ?? ''; |
| 19 | $third_description = $content['descriptions'][2]['default'] ?? ''; |
| 20 | |
| 21 | $button = $content['buttons'][0]['default'] ?? ''; |
| 22 | ?> |
| 23 | |
| 24 | <!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"80px"}}},"layout":{"type":"constrained"}} --> |
| 25 | <div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:80px"> |
| 26 | <!-- wp:columns {"align":"full","style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"blockGap":{"top":"0","left":"0"}}}} --> |
| 27 | <div class="wp-block-columns alignfull" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"> |
| 28 | <!-- wp:column --> |
| 29 | <div class="wp-block-column"> |
| 30 | <!-- wp:cover {"url":"<?php echo esc_url( $image1 ); ?>","dimRatio":0,"focalPoint":{"x":0.54,"y":0.52},"isDark":false,"style":{"color":{}}} --> |
| 31 | <div class="wp-block-cover is-light"> |
| 32 | <img class="wp-block-cover__image-background" alt="<?php esc_attr_e( 'Placeholder image used to represent a product being showcased in a hero section. 1 out of 2.', 'woocommerce' ); ?>" src="<?php echo esc_url( $image1 ); ?>" style="object-position:54% 52%" data-object-fit="cover" data-object-position="54% 52%"/> |
| 33 | <div class="wp-block-cover__inner-container"> |
| 34 | <!-- wp:paragraph {"align":"center","placeholder":" ","fontSize":"large"} --> |
| 35 | <p class="has-text-align-center has-large-font-size"> </p> |
| 36 | <!-- /wp:paragraph --> |
| 37 | </div> |
| 38 | </div> |
| 39 | <!-- /wp:cover --> |
| 40 | </div> |
| 41 | <!-- /wp:column --> |
| 42 | |
| 43 | <!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"}}},"layout":{"type":"constrained"}} --> |
| 44 | <div class="wp-block-column is-vertically-aligned-center" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"> |
| 45 | <!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"0px","right":"60px","bottom":"0px","left":"60px"},"margin":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}}}} --> |
| 46 | <div class="wp-block-group alignfull" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40);padding-top:0px;padding-right:60px;padding-bottom:0px;padding-left:60px"> |
| 47 | <!-- wp:heading {"textAlign":"left","level":2} --> |
| 48 | <h2 class="wp-block-heading has-text-align-left has-large-font-size"><strong><?php echo esc_html( $third_title ); ?></strong></h3> |
| 49 | <!-- /wp:heading --> |
| 50 | |
| 51 | <!-- wp:paragraph {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|40"}}}} --> |
| 52 | <p style="margin-bottom:var(--wp--preset--spacing--40)"><?php echo esc_html( $third_description ); ?></p> |
| 53 | <!-- /wp:paragraph --> |
| 54 | |
| 55 | <!-- wp:buttons {"style":{"spacing":{"margin":{"top":"64px"}}}} --> |
| 56 | <div class="wp-block-buttons" style="margin-top:64px"> |
| 57 | <!-- wp:button {"textAlign":"left"} --> |
| 58 | <div class="wp-block-button has-custom-font-size"> |
| 59 | <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> |
| 60 | </div> |
| 61 | <!-- /wp:button --> |
| 62 | </div> |
| 63 | <!-- /wp:buttons --> |
| 64 | </div> |
| 65 | <!-- /wp:group --> |
| 66 | </div> |
| 67 | <!-- /wp:column --> |
| 68 | </div> |
| 69 | <!-- /wp:columns --> |
| 70 | |
| 71 | <!-- wp:columns {"verticalAlignment":"center","align":"full","style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"blockGap":{"top":"0","left":"0"},"margin":{"top":"0","bottom":"0"}}}} --> |
| 72 | <div class="wp-block-columns alignfull are-vertically-aligned-center" style="margin-top:0;margin-bottom:0;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"> |
| 73 | <!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"}}}} --> |
| 74 | <div class="wp-block-column is-vertically-aligned-center" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"> |
| 75 | <!-- wp:group {"style":{"spacing":{"padding":{"right":"50px","left":"50px","top":"50px","bottom":"50px"},"blockGap":"50px"}},"layout":{"type":"constrained"}} --> |
| 76 | <div class="wp-block-group" style="padding-top:50px;padding-right:50px;padding-bottom:50px;padding-left:50px"> |
| 77 | <!-- wp:group {"style":{"dimensions":{"minHeight":""},"layout":{"type":"flex","orientation":"vertical"}} --> |
| 78 | <div class="wp-block-group"> |
| 79 | <!-- wp:heading {"level":5,"style":{"typography":{"textTransform":"capitalize"}}} --> |
| 80 | <h5 class="wp-block-heading" style="text-transform:capitalize"><strong><?php echo esc_html( $first_title ); ?></strong></h5> |
| 81 | <!-- /wp:heading --> |
| 82 | |
| 83 | <!-- wp:paragraph {"style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"margin":{"top":"25px","right":"0","bottom":"0","left":"0"}}}} --> |
| 84 | <p style="margin-top:25px;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"><?php echo esc_html( $first_description ); ?></p> |
| 85 | <!-- /wp:paragraph --> |
| 86 | </div> |
| 87 | <!-- /wp:group --> |
| 88 | |
| 89 | <!-- wp:group {"style":{"dimensions":{"minHeight":""},"layout":{"type":"flex","orientation":"vertical"}} --> |
| 90 | <div class="wp-block-group"> |
| 91 | <!-- wp:heading {"level":5,"style":{"typography":{"textTransform":"capitalize"}}} --> |
| 92 | <h5 class="wp-block-heading" style="text-transform:capitalize"><strong><?php echo esc_html( $second_title ); ?></strong></h5> |
| 93 | <!-- /wp:heading --> |
| 94 | |
| 95 | <!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"25px"}}}} --> |
| 96 | <p style="margin-top:25px"><?php echo esc_html( $second_description ); ?></p> |
| 97 | <!-- /wp:paragraph --> |
| 98 | </div> |
| 99 | <!-- /wp:group --> |
| 100 | </div> |
| 101 | <!-- /wp:group --> |
| 102 | </div> |
| 103 | <!-- /wp:column --> |
| 104 | |
| 105 | <!-- wp:column {"verticalAlignment":"center"} --> |
| 106 | <div class="wp-block-column is-vertically-aligned-center"> |
| 107 | <!-- wp:cover {"url":"<?php echo esc_url( $image2 ); ?>","dimRatio":0,"focalPoint":{"x":0.33,"y":0.06},"style":{"color":{}}} --> |
| 108 | <div class="wp-block-cover"> |
| 109 | <img class="wp-block-cover__image-background" alt="<?php esc_attr_e( 'Placeholder image used to represent a product being showcased in a hero section. 2 out of 2.', 'woocommerce' ); ?>" src="<?php echo esc_url( $image2 ); ?>" style="object-position:33% 6%" data-object-fit="cover" data-object-position="33% 6%"/> |
| 110 | <div class="wp-block-cover__inner-container"> |
| 111 | <!-- wp:paragraph {"align":"center","placeholder":" ","fontSize":"large"} --> |
| 112 | <p class="has-text-align-center has-large-font-size"> </p> |
| 113 | <!-- /wp:paragraph --> |
| 114 | </div> |
| 115 | </div> |
| 116 | <!-- /wp:cover --> |
| 117 | </div> |
| 118 | <!-- /wp:column --> |
| 119 | </div> |
| 120 | <!-- /wp:columns --> |
| 121 | </div> |
| 122 | <!-- /wp:group --> |
| 123 |