banner.php
7 months ago
coming-soon-entire-site.php
1 year ago
coming-soon-store-only.php
1 year ago
coming-soon.php
1 year ago
content-right-image-left.php
1 year ago
featured-category-cover-image.php
1 year ago
featured-category-triple.php
1 year ago
footer-large.php
1 year ago
footer-simple-menu.php
2 years ago
footer-with-3-menus.php
2 years ago
four-image-grid-content-left.php
1 year ago
header-centered-pattern.php
1 year ago
header-distraction-free.php
1 year ago
header-essential.php
1 year ago
header-large.php
1 year ago
header-minimal.php
1 year ago
heading-with-three-columns-of-content-with-link.php
1 year ago
hero-product-3-split.php
7 months ago
hero-product-chessboard.php
7 months ago
hero-product-split.php
7 months ago
intro-centered-content-with-image-below.php
1 year ago
just-arrived-full-hero.php
7 months ago
no-products-found-filters.php
1 year ago
no-products-found.php
2 years ago
page-coming-soon-default.php
1 year ago
page-coming-soon-image-gallery.php
1 year ago
page-coming-soon-minimal-left-image.php
1 year ago
page-coming-soon-modern-black.php
1 year ago
page-coming-soon-split-right-image.php
1 year ago
page-coming-soon-with-header-footer.php
1 year ago
product-collection-3-columns.php
11 months ago
product-collection-4-columns.php
11 months ago
product-collection-5-columns.php
11 months ago
product-collection-featured-products-5-columns.php
7 months ago
product-query-product-gallery.php
6 months ago
product-search-form.php
1 year ago
related-products.php
11 months ago
social-follow-us-in-social-media.php
1 year ago
testimonials-3-columns.php
1 year ago
testimonials-single.php
1 year ago
three-columns-with-images-and-content.php
1 year ago
banner.php
68 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Title: Banner |
| 4 | * Slug: woocommerce-blocks/banner |
| 5 | * Categories: WooCommerce, featured-selling |
| 6 | */ |
| 7 | |
| 8 | |
| 9 | $banner_title = __( 'Up to 60% off', 'woocommerce' ); |
| 10 | $banner_button = __( 'Shop vinyl records', 'woocommerce' ); |
| 11 | $first_description = __( 'Holiday Sale', 'woocommerce' ); |
| 12 | $second_description = __( 'Get your favorite vinyl at record-breaking prices.', 'woocommerce' ); |
| 13 | ?> |
| 14 | |
| 15 | <!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"calc( 0.5 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))","bottom":"calc( 0.5 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))","left":"var(--wp--style--root--padding-left, var(--wp--custom--gap--horizontal))","right":"var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal))"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained","justifyContent":"center"}} --> |
| 16 | <div class="wp-block-group alignfull" style="margin-top:0;margin-bottom:0;padding-top:calc( 0.5 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)));padding-right:var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal));padding-bottom:calc( 0.5 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)));padding-left:var(--wp--style--root--padding-left, var(--wp--custom--gap--horizontal))"> |
| 17 | <!-- wp:spacer {"height":"calc( 0.25 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))"} --> |
| 18 | <div style="height:calc( 0.25 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))" aria-hidden="true" class="wp-block-spacer"></div> |
| 19 | <!-- /wp:spacer --> |
| 20 | |
| 21 | <!-- wp:columns {"align":"wide"} --> |
| 22 | <div class="wp-block-columns alignwide"> |
| 23 | <!-- wp:column {"verticalAlignment":"center"} --> |
| 24 | <div class="wp-block-column is-vertically-aligned-center"> |
| 25 | <!-- wp:paragraph {"style":{"typography":{"fontSize":"18px"},"spacing":{"margin":{"top":"0","right":"0","bottom":"0","left":"0"}}}} --> |
| 26 | <p 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> |
| 27 | <!-- /wp:paragraph --> |
| 28 | |
| 29 | <!-- wp:heading {"level":3,"style":{"typography":{"fontSize":"48px"}}} --> |
| 30 | <h3 class="wp-block-heading" style="font-size:48px"><?php echo esc_html( $banner_title ); ?></h3> |
| 31 | <!-- /wp:heading --> |
| 32 | |
| 33 | <!-- wp:paragraph {"style":{"typography":{"fontSize":"24px"},"spacing":{"margin":{"top":"0","right":"0","bottom":"0","left":"0"}}}} --> |
| 34 | <p style="margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;font-size:24px"><?php echo esc_html( $second_description ); ?></p> |
| 35 | <!-- /wp:paragraph --> |
| 36 | |
| 37 | <!-- wp:buttons {"style":{"spacing":{"blockGap":"0","margin":{"top":"20px","bottom":"0"}}}} --> |
| 38 | <div class="wp-block-buttons" style="margin-top:20px;margin-bottom:0"> |
| 39 | <!-- wp:button {"style":{"typography":{"fontSize":"16px"},"border":{"width":"0px","style":"none"}},"className":"is-style-fill"} --> |
| 40 | <div class="wp-block-button has-custom-font-size is-style-fill" style="font-size:16px"> |
| 41 | <a class="wp-block-button__link wp-element-button" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>" style="border-style:none;border-width:0px;"> |
| 42 | <?php echo esc_html( $banner_button ); ?> |
| 43 | </a> |
| 44 | </div> |
| 45 | <!-- /wp:button --> |
| 46 | </div> |
| 47 | <!-- /wp:buttons --> |
| 48 | </div> |
| 49 | <!-- /wp:column --> |
| 50 | |
| 51 | <!-- wp:column {"verticalAlignment":"center"} --> |
| 52 | <div class="wp-block-column is-vertically-aligned-center"> |
| 53 | <!-- wp:image {"id":1,"sizeSlug":"full","linkDestination":"none"} --> |
| 54 | <figure class="wp-block-image size-full"> |
| 55 | <img src="<?php echo esc_url( plugins_url( 'assets/images/pattern-placeholders/music-needle-turntable-black-and-white-white-photography.jpg', WC_PLUGIN_FILE ) ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent products being showcased in a banner.', 'woocommerce' ); ?>" class="wp-image-1" /> |
| 56 | </figure> |
| 57 | <!-- /wp:image --> |
| 58 | </div> |
| 59 | <!-- /wp:column --> |
| 60 | </div> |
| 61 | <!-- /wp:columns --> |
| 62 | |
| 63 | <!-- wp:spacer {"height":"calc( 0.25 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))"} --> |
| 64 | <div style="height:calc( 0.25 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))" aria-hidden="true" class="wp-block-spacer"></div> |
| 65 | <!-- /wp:spacer --> |
| 66 | </div> |
| 67 | <!-- /wp:group --> |
| 68 |