Skip to content

Commit

Permalink
added new comment block to the theme
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieCabrera committed Jun 22, 2022
1 parent f03ca1d commit 242599e
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 2 deletions.
61 changes: 61 additions & 0 deletions block-canvas/patterns/comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php
/**
* Title: Comments
* slug: blockbase/comments
* inserter: no
*/

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

<!-- 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 -->
2 changes: 1 addition & 1 deletion block-canvas/templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- wp:spacer {"height":60} -->
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- wp:post-comments /-->
<!-- wp:pattern {"slug":"block-canvas/comments"} -->
</div>
<!-- /wp:group -->

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

Expand Down
35 changes: 35 additions & 0 deletions block-canvas/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,41 @@
"fontFamily": "monospace"
}
},
"core/comment-author-name": {
"typography": {
"fontSize": "var(--wp--custom--font-sizes--small)"
}
},
"core/comment-date": {
"typography": {
"fontSize": "var(--wp--custom--font-sizes--small)"
}
},
"core/comment-edit-link": {
"typography": {
"fontSize": "var(--wp--custom--font-sizes--small)"
}
},
"core/comment-reply-link": {
"color": {
"text": "var(--wp--custom--color--primary)"
},
"typography": {
"fontSize": "var(--wp--custom--font-sizes--small)",
"textDecoration": "underline"
}
},
"core/comments-title": {
"typography": {
"fontSize": "var(--wp--preset--font-size--large)"
}
},
"core/comment-content": {
"typography": {
"fontSize": "var(--wp--custom--post-comment--typography--font-size)",
"lineHeight": "var(--wp--custom--post-comment--typography--line-height)"
}
},
"core/gallery": {
"spacing": {
"margin": {
Expand Down

0 comments on commit 242599e

Please sign in to comment.