moved pre footer to block pattern

This commit is contained in:
Maggie 2021-07-29 14:50:03 +02:00
parent bf85b4f947
commit 0e35f459ff
7 changed files with 99 additions and 35 deletions

View file

@ -109,6 +109,10 @@
background-color: var(--wp--custom--button--color--text);
}
.pre-footer h3 {
text-transform: uppercase;
}
a {
text-decoration-thickness: 0.07em;
text-underline-offset: 0.46ex;

View file

@ -1,37 +1,3 @@
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"60px","bottom":"60px"}}},"className":"pre-footer"} -->
<div class="wp-block-group alignwide pre-footer" style="padding-top:60px;padding-bottom:60px"><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:site-title {"style":{"typography":{"textTransform":"uppercase"}},"fontSize":"large"} /-->
<!-- wp:paragraph {"fontSize":"small"} -->
<p class="has-small-font-size">Skate ipsum dolor sit amet, poseur nollie casper pop shove-it. Kickturn noseblunt tailslide.</p>
<!-- /wp:paragraph -->
<!-- wp:social-links {"iconColor":"primary","iconColorValue":"#000000","className":"is-style-logos-only"} -->
<ul class="wp-block-social-links has-icon-color is-style-logos-only"><!-- wp:social-link {"url":"http://twitter.com","service":"twitter"} /-->
<!-- wp:social-link {"url":"http://facebook.com","service":"facebook"} /-->
<!-- wp:social-link {"url":"http://instagram.com","service":"instagram"} /--></ul>
<!-- /wp:social-links --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph {"fontSize":"tiny"} -->
<p class="has-tiny-font-size"><strong>More info</strong></p>
<!-- /wp:paragraph -->
<!-- wp:navigation {"orientation":"vertical","__unstableLocation":"secondary","fontSize":"small"} /--></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph {"fontSize":"tiny"} -->
<p class="has-tiny-font-size"><strong>Subscribe</strong></p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div>
<!-- /wp:group -->
<!-- wp:group {"className":"site-footer","style":{"spacing":{"padding":{"bottom":"30px"}}}} -->
<div class="wp-block-group site-footer" style="padding-bottom: 30px">

View file

@ -43,3 +43,8 @@ function skatepark_scripts() {
wp_enqueue_style( 'skatepark-styles', get_stylesheet_directory_uri() . '/assets/theme.css', array( 'blockbase-ponyfill' ), wp_get_theme()->get( 'Version' ) );
}
add_action( 'wp_enqueue_scripts', 'skatepark_scripts' );
/**
* Block Patterns.
*/
require get_stylesheet_directory() . '/inc/block-patterns.php';

View file

@ -0,0 +1,38 @@
<?php
/**
* Skatepark Theme: Block Patterns
*
* @package Skatepark
* @since 1.0.0
*/
if ( ! function_exists( 'skatepark_register_block_patterns' ) ) :
function skatepark_register_block_patterns() {
if ( function_exists( 'register_block_pattern_category' ) ) {
register_block_pattern_category(
'skatepark',
array( 'label' => __( 'Skatepark', 'skatepark' ) )
);
}
if ( function_exists( 'register_block_pattern' ) ) {
$block_patterns = array(
'pre-footer',
);
if ( class_exists( 'WP_Block_Type_Registry' ) && \WP_Block_Type_Registry::get_instance()->is_registered( 'jetpack/subscriptions' ) ) {
$block_patterns[] = 'pre-footer';
}
foreach ( $block_patterns as $block_pattern ) {
register_block_pattern(
'skatepark/' . $block_pattern,
require __DIR__ . '/patterns/' . $block_pattern . '.php'
);
}
}
}
endif;
add_action( 'init', 'skatepark_register_block_patterns', 9 );

View file

@ -0,0 +1,45 @@
<?php
/**
* Pre Footer.
*
* @package Skatepark
*/
return array(
'title' => __( 'Footer', 'skatepark' ),
'categories' => array( 'skatepark' ),
'content' => '<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"60px","bottom":"60px"}}},"className":"pre-footer"} -->
<div class="wp-block-group alignwide pre-footer" style="padding-top:60px;padding-bottom:60px"><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:site-title {"style":{"typography":{"textTransform":"uppercase"}},"fontSize":"large"} /-->
<!-- wp:paragraph {"fontSize":"small"} -->
<p class="has-small-font-size">' . esc_html__( 'Skate ipsum dolor sit amet, poseur nollie casper pop shove-it. Kickturn noseblunt tailslide.', 'skatepark' ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:social-links {"iconColor":"primary","iconColorValue":"#000000","className":"is-style-logos-only"} -->
<ul class="wp-block-social-links has-icon-color is-style-logos-only"><!-- wp:social-link {"url":"http://twitter.com","service":"twitter"} /-->
<!-- wp:social-link {"url":"http://facebook.com","service":"facebook"} /-->
<!-- wp:social-link {"url":"http://instagram.com","service":"instagram"} /--></ul>
<!-- /wp:social-links --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:heading {"level":3,"fontSize":"tiny"} -->
<h3 class="has-tiny-font-size"><strong>' . esc_html__( 'More info', 'skatepark' ) . '</strong></h3>
<!-- /wp:heading -->
<!-- wp:navigation {"orientation":"vertical","__unstableLocation":"secondary","style":{"typography":{"textDecoration":"underline"}},"fontSize":"small"} /--></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:heading {"level":3,"fontSize":"tiny"} -->
<h3 class="has-tiny-font-size"><strong>' . esc_html__( 'Subscribe', 'skatepark' ) . '</strong></h3><!-- /wp:heading --><!-- wp:jetpack/subscriptions {"submitButtonText":"' . esc_html__( 'Submit', 'skatepark' ) . '","buttonBackgroundColor":"background","textColor":"primary","fontSize":"14px","customFontSize":"14px","borderRadius":0,"borderWeight":3,"borderColor":"#000000","customBorderColor":"#000000","spacing":0} -->
<div class="wp-block-jetpack-subscriptions wp-block-jetpack-subscriptions__supports-newline">[jetpack_subscription_form show_subscribers_total="false" button_on_newline="false" submit_button_text="' . esc_html__( 'Submit', 'skatepark' ) . '" custom_font_size="14px" custom_border_radius="0" custom_border_weight="3" custom_border_color="#000000" custom_padding="15" custom_spacing="10" submit_button_classes="no-border-radius has-14-px-font-size has-000000-border-color has-text-color has-primary-color has-background has-background-background-color" email_field_classes="no-border-radius has-14-px-font-size has-000000-border-color" show_only_email_and_button="true"]</div>
<!-- /wp:jetpack/subscriptions --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div>
<!-- /wp:group -->',
);

View file

@ -0,0 +1,5 @@
.pre-footer {
h3 {
text-transform: uppercase;
}
}

View file

@ -2,4 +2,5 @@
@import "../../blockbase/sass/base/mixins";
@import "base/text";
@import "blocks/buttons";
@import "elements/links";
@import "block-patterns/pre-footer";
@import "elements/links";