Skip to content

Commit

Permalink
Block themes: Update templates to include a Query block wrapper (#3821)
Browse files Browse the repository at this point in the history
* Block themes: Update templates to include a Query block wrapper (WordPress/gutenberg#30804)
Co-authored-by: Maggie Cabrera <maggie.cabrera@automattic.com>
  • Loading branch information
danieldudzic authored May 24, 2021
1 parent e9279bb commit 36df9da
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 2 additions & 0 deletions blank-canvas-blocks/block-templates/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!-- wp:template-part {"slug":"header","tagName":"header","layout":{"inherit":true}} /-->

<!-- wp:query {"queryId":1,"query":{"perPage":10,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":""}} -->
<div class="wp-block-query">
<!-- wp:query-loop -->

<!-- wp:group {"layout":{"inherit":true}} -->
Expand All @@ -13,6 +14,7 @@
<!-- wp:post-content {"layout":{"inherit":true}} /-->

<!-- /wp:query-loop -->
</div>
<!-- /wp:query -->

<!-- wp:template-part {"slug":"footer","tagName":"footer","layout":{"inherit":true}} /-->
2 changes: 2 additions & 0 deletions blank-canvas-blocks/block-templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ <h2>Results:</h2>
<!-- /wp:heading -->

<!-- wp:query {"queryId":1,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true}} -->
<div class="wp-block-query">
<!-- wp:query-loop -->

<!-- wp:post-title {"level":5,"isLink":true} /-->
<!-- wp:post-excerpt /-->

<!-- /wp:query-loop -->
</div>
<!-- /wp:query -->

</div>
Expand Down
2 changes: 2 additions & 0 deletions mayland-blocks/block-templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<div class="wp-block-group">

<!-- wp:query {"queryId":1,"query":{"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":""}} -->
<div class="wp-block-query">
<!-- wp:query-loop -->
<!-- wp:post-title {"isLink":true} /-->

Expand All @@ -15,6 +16,7 @@
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- /wp:query-loop -->
</div>
<!-- /wp:query -->

</div>
Expand Down
12 changes: 4 additions & 8 deletions quadrat/block-template-parts/query.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group">

<!-- wp:query {"queryId":1,"query":{"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":"","inherit":true}} -->
<!-- wp:query {"layout":{"inherit":true},"queryId":1,"query":{"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":"","inherit":true}} -->
<div class="wp-block-query">
<!-- wp:query-loop -->
<!-- wp:post-featured-image {"isLink":true} /-->
<!-- wp:post-title {"isLink":true, "level": 3} /-->
<!-- wp:post-date {"fontSize":"tiny"} /-->
<!-- wp:post-excerpt /-->

<!-- wp:spacer -->
<!-- wp:spacer {"height":30} -->
<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- /wp:query-loop -->
Expand All @@ -21,7 +19,5 @@
<!-- wp:query-pagination-next {"label":"Next Page"} /--></div>
<!-- /wp:query-pagination -->

<!-- /wp:query -->

</div>
<!-- /wp:group -->
<!-- /wp:query -->
2 changes: 2 additions & 0 deletions seedlet-blocks/block-templates/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->

<!-- wp:query {"queryId":1,"query":{"perPage":10,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":""}} -->
<div class="wp-block-query">
<!-- wp:query-loop -->
<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group"><!-- wp:post-title {"isLink":true} /--></div>
Expand All @@ -14,6 +15,7 @@
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- /wp:query-loop -->
</div>
<!-- /wp:query -->

<!-- wp:template-part {"slug":"footer","tagName":"footer","layout":{"inherit":true}} /-->

0 comments on commit 36df9da

Please sign in to comment.