Skip to content

Commit

Permalink
Add Patterns:
Browse files Browse the repository at this point in the history
- Text in two columns.
- Cover block with large text and gradient.
  • Loading branch information
mtias committed Mar 9, 2020
1 parent 1347a8c commit 756a722
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,11 +649,9 @@ function gutenberg_load_block_pattern( $name ) {
* @return array Filtered editor settings.
*/
function gutenberg_extend_settings_block_patterns( $settings ) {
$block_patterns = [
gutenberg_load_block_pattern( 'teams' ),
gutenberg_load_block_pattern( 'testimonial' ),
gutenberg_load_block_pattern( 'columns4-footer' ),
gutenberg_load_block_pattern( 'natural-columns' ),
$block_patterns = [
gutenberg_load_block_pattern( 'text-two-columns' ),
gutenberg_load_block_pattern( 'cover-abc' ),
];
$settings['__experimentalBlockPatterns'] = $block_patterns;
return $settings;
Expand Down
5 changes: 5 additions & 0 deletions lib/patterns/cover-abc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"__file": "wp_block",
"title": "Cover",
"content": "<!-- wp:cover {\"minHeight\":470,\"gradient\":\"pale-ocean\",\"align\":\"wide\"} -->\n<div class=\"wp-block-cover alignwide has-background-dim has-pale-ocean-gradient-background\" style=\"min-height:470px\"><div class=\"wp-block-cover__inner-container\"><!-- wp:paragraph {\"align\":\"center\",\"placeholder\":\"Write title…\",\"customTextColor\":\"#114050\",\"customFontSize\":220} -->\n<p style=\"color:#114050;font-size:220px\" class=\"has-text-color has-text-align-center\">abc!</p>\n<!-- /wp:paragraph --></div></div>\n<!-- /wp:cover -->"
}
5 changes: 5 additions & 0 deletions lib/patterns/text-two-columns.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"__file": "wp_block",
"title": "Two Columns of Text",
"content": "<!-- wp:columns -->\n<div class=\"wp-block-columns\"><!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:paragraph {\"customFontSize\":21} -->\n<p style=\"font-size:21px\"><strong>CHAPTER 1. Loomings</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation.</p>\n<!-- /wp:paragraph --></div>\n<!-- /wp:column -->\n\n<!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:paragraph -->\n<p>Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people’s hats off—then, I account it high time tozz get to sea as soon as I can.</p>\n<!-- /wp:paragraph --></div>\n<!-- /wp:column --></div>\n<!-- /wp:columns -->"
}

0 comments on commit 756a722

Please sign in to comment.