Skip to content

Commit

Permalink
Adds 'Heading and paragraph' pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
enriquesanchez committed Jul 22, 2020
1 parent 1a16a0f commit 21c54de
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/block-patterns.php
Expand Up @@ -53,6 +53,7 @@ function gutenberg_register_block_patterns() {
register_block_pattern( 'core/large-header', gutenberg_load_block_pattern( 'large-header' ) );
register_block_pattern( 'core/large-header-paragraph', gutenberg_load_block_pattern( 'large-header-paragraph' ) );
register_block_pattern( 'core/three-buttons', gutenberg_load_block_pattern( 'three-buttons' ) );
register_block_pattern( 'core/heading-paragraph', gutenberg_load_block_pattern( 'heading-paragraph' ) );
register_block_pattern( 'core/quote', gutenberg_load_block_pattern( 'quote' ) );
}

Expand Down
16 changes: 16 additions & 0 deletions lib/patterns/heading-paragraph.php
@@ -0,0 +1,16 @@
<?php
/**
* Heading and paragraph block pattern.
*
* @package gutenberg
*/

return array(
'title' => __( 'Heading and paragraph', 'gutenberg' ),
'content' => "<!-- wp:group -->\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\"><!-- wp:heading {\"textColor\":\"black\",\"fontSize\":\"large\"} -->\n<h2 class=\"has-black-color has-text-color has-large-font-size\"><span style=\"color:#ba0c49\" class=\"has-inline-color\"><strong>2</strong>. </span>" . __( ' Which treats of the first sally the ingenious Don Quixote made from home', 'gutenberg' ) . "
</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph {\"textColor\":\"black\"} -->\n<p class=\"has-black-color has-text-color\">" . __( 'These preliminaries settled, he did not care to put off any longer the execution of his design, urged on to it by the thought of all the world was losing by his delay, seeing what wrongs he intended to right, grievances to redress, injustices to repair, abuses to remove, and duties to discharge.', 'gutenberg' ) . "
</p>\n<!-- /wp:paragraph --></div></div>\n<!-- /wp:group -->",
'viewportWidth' => 1000,
'categories' => array( 'text' ),
'description' => _x( 'A heading followed by a paragraph.', 'Block pattern description', 'gutenberg' ),
);

0 comments on commit 21c54de

Please sign in to comment.