banner.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.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
2 years 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
banner.php
57 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Title: Banner |
| 4 | * Slug: woocommerce-blocks/banner |
| 5 | * Categories: WooCommerce |
| 6 | */ |
| 7 | |
| 8 | use Automattic\WooCommerce\Blocks\AIContent\PatternsHelper; |
| 9 | |
| 10 | $banner_title = $content['titles'][0]['default'] ?? ''; |
| 11 | $banner_button = $content['buttons'][0]['default'] ?? ''; |
| 12 | $first_description = $content['descriptions'][0]['default'] ?? ''; |
| 13 | $second_description = $content['descriptions'][1]['default'] ?? ''; |
| 14 | ?> |
| 15 | |
| 16 | <!-- wp:columns {"verticalAlignment":null,"align":"wide","backgroundColor":"contrast"} --> |
| 17 | <div class="wp-block-columns alignwide has-contrast-background-color has-background"> |
| 18 | <!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"padding":{"top":"var:preset|spacing|30","right":"var:preset|spacing|30","bottom":"var:preset|spacing|30","left":"var:preset|spacing|30"}}}} --> |
| 19 | <div class="wp-block-column is-vertically-aligned-center" style="padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)"> |
| 20 | <!-- wp:paragraph {"style":{"typography":{"fontSize":"18px"},"spacing":{"margin":{"top":"0","right":"0","bottom":"0","left":"0"}}}, "textColor":"base"} --> |
| 21 | <p class="has-base-color has-text-color" style="margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;font-size:18px"><strong><?php echo esc_html( $first_description ); ?></strong> </p> |
| 22 | <!-- /wp:paragraph --> |
| 23 | |
| 24 | <!-- wp:paragraph {"style":{"typography":{"fontSize":"48px"},"spacing":{"margin":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"padding":{"top":"0","right":"0","bottom":"0","left":"0"}}}, "textColor":"base"} --> |
| 25 | <p class="has-base-color has-text-color" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;font-size:48px"><strong><?php echo esc_html( $banner_title ); ?></strong> </p> |
| 26 | <!-- /wp:paragraph --> |
| 27 | |
| 28 | <!-- wp:paragraph {"style":{"typography":{"fontSize":"24px"},"spacing":{"margin":{"top":"0","right":"0","bottom":"0","left":"0"}}}, "textColor":"base"} --> |
| 29 | <p class="has-base-color has-text-color" style="margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;font-size:24px"><?php echo esc_html( $second_description ); ?></p> |
| 30 | <!-- /wp:paragraph --> |
| 31 | |
| 32 | <!-- wp:buttons {"style":{"spacing":{"blockGap":"0","margin":{"top":"20px","bottom":"0"}}}} --> |
| 33 | <div class="wp-block-buttons" style="margin-top:20px;margin-bottom:0"> |
| 34 | <!-- wp:button {"style":{"typography":{"fontSize":"16px"},"border":{"width":"0px","style":"none"}},"className":"is-style-fill"} --> |
| 35 | <div class="wp-block-button has-custom-font-size is-style-fill" style="font-size:16px"> |
| 36 | <a class="wp-block-button__link wp-element-button" href="<?php echo esc_url( get_permalink( wc_get_page_id( 'shop' ) ) ); ?>" style="border-style:none;border-width:0px;"> |
| 37 | <?php echo esc_html( $banner_button ); ?> |
| 38 | </a> |
| 39 | </div> |
| 40 | <!-- /wp:button --> |
| 41 | </div> |
| 42 | <!-- /wp:buttons --> |
| 43 | </div> |
| 44 | <!-- /wp:column --> |
| 45 | |
| 46 | <!-- wp:column {"verticalAlignment":"center"} --> |
| 47 | <div class="wp-block-column is-vertically-aligned-center"> |
| 48 | <!-- wp:image {"id":1,"sizeSlug":"full","linkDestination":"none"} --> |
| 49 | <figure class="wp-block-image size-full"> |
| 50 | <img src="<?php echo esc_url( PatternsHelper::get_image_url( $images, 0, 'assets/images/pattern-placeholders/music-needle-turntable-black-and-white-white-photography.jpg' ) ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent products being showcased in a banner.', 'woocommerce' ); ?>" class="wp-image-1" /> |
| 51 | </figure> |
| 52 | <!-- /wp:image --> |
| 53 | </div> |
| 54 | <!-- /wp:column --> |
| 55 | </div> |
| 56 | <!-- /wp:columns --> |
| 57 |