Skip to content

Commit

Permalink
Merge pull request #305 from WordPress/tt1-comments-block
Browse files Browse the repository at this point in the history
TT1 blocks: implement new comments block
  • Loading branch information
carolinan authored Jul 6, 2022
2 parents 909afba + 1e751e6 commit bced81d
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 5 deletions.
66 changes: 66 additions & 0 deletions tt1-blocks/patterns/comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php
/**
* Title: Comments
* slug: tt1-blocks/comments
* inserter: no
*/

?>

<!-- wp:spacer {"height":70} -->
<div style="height:70px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:comments-query-loop -->
<div class="wp-block-comments-query-loop">
<!-- wp:comments-title {"level":3} /-->

<!-- wp:comment-template -->
<!-- wp:columns -->
<div class="wp-block-columns">
<!-- wp:column {"width":"40px"} -->
<div class="wp-block-column" style="flex-basis:40px"></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column">
<!-- wp:group {"style":{"spacing":{"blockGap":"10px"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:avatar {"size":40,"style":{"border":{"radius":"20px"},"spacing":{"margin":{"top":"10px"}}}} /-->

<!-- wp:group -->
<div class="wp-block-group">
<!-- wp:comment-author-name /-->

<!-- wp:group {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"},"blockGap":"0.5em"}},"layout":{"type":"flex"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px">
<!-- wp:comment-date {"format":"F j, Y \\a\\t g:i a"} /-->

<!-- wp:comment-edit-link /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

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

<!-- wp:comment-reply-link /-->
</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-query-loop -->
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group">
<!-- wp:post-comments /-->
<!-- wp:pattern {"slug":"tt1-blocks/comments"} -->
</div>
<!-- /wp:group -->
</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,8 @@
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:spacer {"height":70} -->
<div style="height:70px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- wp:pattern {"slug":"tt1-blocks/comments"} -->

<!-- wp:post-comments /-->
</div>
<!-- /wp:group -->
</div>
Expand Down
20 changes: 20 additions & 0 deletions tt1-blocks/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,26 @@
"fontWeight": 500
}
},
"core/comment-author-name": {
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
}
},
"core/comment-date": {
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
}
},
"core/comment-edit-link": {
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
}
},
"core/comment-reply-link": {
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
}
},
"core/post-author": {
"typography": {
"fontSize": "var(--wp--preset--font-size--extra-small)",
Expand Down

0 comments on commit bced81d

Please sign in to comment.