Skip to content

Commit

Permalink
Stewart: Update comments (#8303)
Browse files Browse the repository at this point in the history
Create a pattern and template part for comments, using the current version of the comments block.
Fixes #8302
  • Loading branch information
alaczek authored Oct 24, 2024
1 parent e912c73 commit eecb3a8
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 2 deletions.
1 change: 1 addition & 0 deletions stewart/parts/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"stewart/hidden-comments"} /-->
43 changes: 43 additions & 0 deletions stewart/patterns/hidden-comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* Title: Hidden Comments
* Slug: stewart/hidden-comments
* Inserter: no
*/
?>

<!-- wp:comments -->
<div class="wp-block-comments"><!-- wp:comments-title /-->

<!-- wp:comment-template -->
<!-- wp:columns {"style":{"spacing":{"blockGap":{"left":"var:preset|spacing|20"}}}} -->
<div class="wp-block-columns"><!-- wp:column {"width":"40px"} -->
<div class="wp-block-column" style="flex-basis:40px"><!-- wp:avatar {"size":40,"style":{"border":{"radius":"20px"}}} /--></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column"><!-- wp:comment-author-name {"style":{"typography":{"fontStyle":"normal","fontWeight":"600"}},"fontSize":"small"} /-->

<!-- wp:group {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"flex"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px"><!-- wp:comment-date {"fontSize":"small"} /-->

<!-- wp:comment-edit-link {"fontSize":"small"} /--></div>
<!-- /wp:group -->

<!-- wp:comment-content /-->

<!-- wp:comment-reply-link {"fontSize":"small"} /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- /wp:comment-template -->

<!-- wp:comments-pagination -->
<!-- wp:comments-pagination-previous /-->

<!-- wp:comments-pagination-numbers /-->

<!-- wp:comments-pagination-next /-->
<!-- /wp:comments-pagination -->

<!-- wp:post-comments-form /--></div>
<!-- /wp:comments -->
2 changes: 1 addition & 1 deletion stewart/templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:post-comments /-->
<!-- wp:template-part {"slug":"comments"} /-->

<!-- wp:spacer {"height":60} -->
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
Expand Down
2 changes: 1 addition & 1 deletion stewart/templates/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:post-comments /-->
<!-- wp:template-part {"slug":"comments"} /-->

<!-- wp:spacer {"height":60} -->
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
Expand Down
5 changes: 5 additions & 0 deletions stewart/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"name": "footer",
"title": "Footer",
"area": "footer"
},
{
"name": "comments",
"name": "Comments",
"area": "uncategorized"
}
],
"customTemplates": [
Expand Down

0 comments on commit eecb3a8

Please sign in to comment.