Skip to content

Commit

Permalink
block style for search and new footer pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieCabrera authored and pbking committed Jan 13, 2022
1 parent 0afada4 commit 9b45e81
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
12 changes: 12 additions & 0 deletions blockbase/assets/ponyfill.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions blockbase/inc/block-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function blockbase_register_block_patterns() {
'footer-columns',
'footer-left',
'footer-primary',
'footer-search',
'footer-separator',
'footer-simple',
'footer-small',
Expand Down
8 changes: 8 additions & 0 deletions blockbase/inc/block-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ function blockbase_register_block_styles() {
'style_handle' => 'post-category-icon',
)
);
register_block_style(
'core/search',
array(
'name' => 'small-search',
'label' => __( 'Small', 'blockbase' ),
'style_handle' => 'small-search',
)
);
}
}
endif;
Expand Down
26 changes: 26 additions & 0 deletions blockbase/inc/patterns/footer-search.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/**
* Footer with Search Block
*
* @package Blockbase
*/

return array(
'title' => __( 'Footer with Search Block', 'blockbase' ),
'categories' => array( 'blockbase' ),
'blockTypes' => array( 'core/template-part/footer' ),
'content' => '<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"padding":{"top":"80px","bottom":"30px"}}}} -->
<div class="wp-block-group" style="padding-top:80px;padding-bottom:30px">
<!-- wp:group {"style":{"spacing":{"padding":{"bottom":"30px"}}}} -->
<div class="wp-block-group" style="padding-bottom:30px"><!-- wp:search {"label":"Search","showLabel":false,"buttonText":"Search","className":"is-style-small-search"} /--></div>
<!-- /wp:group -->
<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">Proudly Powered by <a href="https://wordpress.org" rel="nofollow">WordPress</a></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->',
);
8 changes: 8 additions & 0 deletions blockbase/sass/blocks/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,12 @@
opacity: 0.66;
}
}

/* Block Styles */
&.is-style-small-search{
--wp--custom--button--typography--font-size: calc( 0.8 * var(--wp--preset--font-size--small));
.wp-block-search__input {
padding: calc( 0.5 * var(--wp--custom--form--padding) );
}
}
}

0 comments on commit 9b45e81

Please sign in to comment.