From 3e8ac5ab972451a4b193205af034deb2b856da61 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 13 Apr 2021 10:17:59 -0400 Subject: [PATCH] Try more opinionated query block patterns (#30763) * Try more opinionated query block patterns * Simplify posts grid. * Remove query IDs, adjust perPage values. * Use hex values for colors, make titles clickable in the Large Title and Date pattern. * Simplify pattern names. * Remove Small pattern, rename Large and Medium patterns. * Remove queryId. --- lib/block-patterns.php | 86 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 12 deletions(-) diff --git a/lib/block-patterns.php b/lib/block-patterns.php index da42a0b25f8ae..b35f07a955ed3 100644 --- a/lib/block-patterns.php +++ b/lib/block-patterns.php @@ -9,9 +9,9 @@ // Initial Query block patterns. register_block_pattern( - 'query/large-posts', + 'query/standard-posts', array( - 'title' => __( 'Large', 'gutenberg' ), + 'title' => __( 'Standard', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), 'categories' => array( 'Query' ), 'content' => ' @@ -31,7 +31,7 @@ register_block_pattern( 'query/medium-posts', array( - 'title' => __( 'Medium', 'gutenberg' ), + 'title' => __( 'Image at Left', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), 'categories' => array( 'Query' ), 'content' => ' @@ -51,22 +51,84 @@ ); register_block_pattern( - 'query/small-posts', + 'query/grid-posts', array( - 'title' => __( 'Small', 'gutenberg' ), + 'title' => __( 'Grid', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), 'categories' => array( 'Query' ), - 'content' => ' + 'content' => ' + + +
+ + + + + ', + ) +); + +register_block_pattern( + 'query/large-title-posts', + array( + 'title' => __( 'Large Title', 'gutenberg' ), + 'blockTypes' => array( 'core/query' ), + 'categories' => array( 'Query' ), + 'content' => ' +
- -
-
+ +
+ + + +
+
- -
+ + +
- ', +
+ ', + ) +); + +register_block_pattern( + 'query/offset-posts', + array( + 'title' => __( 'Offset', 'gutenberg' ), + 'blockTypes' => array( 'core/query' ), + 'categories' => array( 'Query' ), + 'content' => ' +
+
+
+ + + + + + + + +
+ + +
+ + + + + + + + +
+
+
+ ', ) );