Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blockbase: Add post-meta template part #4565

Merged
merged 18 commits into from
Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions blockbase/assets/ponyfill.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions blockbase/assets/svg/post-tag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions blockbase/block-template-parts/post-meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!-- wp:group {"className":"post-meta","layout":{"type":"flex"}} -->
<div class="wp-block-group post-meta">
<!-- wp:post-author {"showAvatar":false,"showBio":false,"fontSize":"tiny"} /-->
<!-- wp:post-date {"fontSize":"tiny","isLink":true} /-->
<!-- wp:post-terms {"term":"category","fontSize":"tiny"} /-->
<!-- wp:post-terms {"term": "post_tag", "fontSize":"tiny"} /-->
</div>
<!-- /wp:group -->
9 changes: 8 additions & 1 deletion blockbase/block-templates/singular.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@
<!-- wp:post-featured-image {"align":"full"} /-->

<!-- wp:post-content {"layout":{"inherit":true}} /-->

<!-- wp:template-part {"slug":"post-meta","layout":{"inherit":true}} /-->
</main>
<!-- /wp:group -->

<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group"><!-- wp:post-comments /--></div>
<div class="wp-block-group">
<!-- wp:spacer {"height":60} -->
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- wp:post-comments /-->
</div>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","tagName":"footer","layout":{"inherit":true},"className":"site-footer-container"} /-->
1 change: 1 addition & 0 deletions blockbase/sass/post/_meta.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.post-meta {
row-gap: var(--wp--custom--gap--baseline) !important; // !important is needed to override the unique .wp-container-ID classes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to link the GB issue that suggests different vertical and horizontal block gaps, so we can remove this when that gets fixed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah good idea, will sort this now

.wp-block-post-author,
.wp-block-post-date,
.taxonomy-post_tag,
Expand Down
3 changes: 2 additions & 1 deletion blockbase/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@
"wideSize": "1000px"
},
"spacing": {
"blockGap": true,
"customPadding": true,
"units": [
"%",
Expand Down Expand Up @@ -564,7 +565,7 @@
}
},
"spacing": {
"blockGap": "var(--wp--custom--gap--vertical)"
"blockGap": "calc(2 * var(--wp--custom--gap--baseline))"
},
"typography": {
"lineHeight": "var(--wp--custom--body--typography--line-height)",
Expand Down
3 changes: 2 additions & 1 deletion geologist/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@
"wideSize": "1128px"
},
"spacing": {
"blockGap": true,
"customPadding": true,
"units": [
"%",
Expand Down Expand Up @@ -672,7 +673,7 @@
}
},
"spacing": {
"blockGap": "var(--wp--custom--gap--vertical)"
"blockGap": "calc(2 * var(--wp--custom--gap--baseline))"
},
"typography": {
"lineHeight": "var(--wp--custom--body--typography--line-height)",
Expand Down
3 changes: 2 additions & 1 deletion mayland-blocks/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@
"wideSize": "1000px"
},
"spacing": {
"blockGap": true,
"customPadding": true,
"units": [
"%",
Expand Down Expand Up @@ -593,7 +594,7 @@
}
},
"spacing": {
"blockGap": "var(--wp--custom--gap--vertical)"
"blockGap": "calc(2 * var(--wp--custom--gap--baseline))"
},
"typography": {
"lineHeight": "var(--wp--custom--body--typography--line-height)",
Expand Down
3 changes: 2 additions & 1 deletion quadrat/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@
"wideSize": "1128px"
},
"spacing": {
"blockGap": true,
"customPadding": true,
"units": [
"%",
Expand Down Expand Up @@ -667,7 +668,7 @@
}
},
"spacing": {
"blockGap": "var(--wp--custom--gap--vertical)"
"blockGap": "calc(2 * var(--wp--custom--gap--baseline))"
},
"typography": {
"lineHeight": "var(--wp--custom--body--typography--line-height)",
Expand Down
4 changes: 3 additions & 1 deletion seedlet-blocks/block-template-parts/post-meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@

<!-- wp:post-date {"fontSize":"tiny","isLink":true} /-->

<!-- wp:post-terms {"term":"category","fontSize":"tiny"} /--></div>
<!-- wp:post-terms {"term":"category","fontSize":"tiny"} /-->

<!-- wp:post-terms {"term": "post_tag", "fontSize":"tiny"} /--></div>
<!-- /wp:group -->
3 changes: 2 additions & 1 deletion seedlet-blocks/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@
"wideSize": "790px"
},
"spacing": {
"blockGap": true,
"customPadding": true,
"units": [
"%",
Expand Down Expand Up @@ -627,7 +628,7 @@
}
},
"spacing": {
"blockGap": "var(--wp--custom--gap--vertical)"
"blockGap": "calc(2 * var(--wp--custom--gap--baseline))"
},
"typography": {
"lineHeight": "var(--wp--custom--body--typography--line-height)",
Expand Down
1 change: 0 additions & 1 deletion skatepark/assets/theme.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions skatepark/child-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@
}
}
},
"spacing": {
"blockGap": "0.5em"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--red-hat-display)",
"fontWeight": "400"
Expand Down
1 change: 0 additions & 1 deletion skatepark/sass/elements/_post-meta.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
&.wp-block-group {
flex-direction: column;
align-items: start;
gap: .5em;
}

.wp-block-post-date,
Expand Down
3 changes: 2 additions & 1 deletion skatepark/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@
"wideSize": "1194px"
},
"spacing": {
"blockGap": true,
"customPadding": true,
"units": [
"%",
Expand Down Expand Up @@ -652,7 +653,7 @@
}
},
"spacing": {
"blockGap": "var(--wp--custom--gap--vertical)"
"blockGap": "0.5em"
},
"typography": {
"lineHeight": "var(--wp--custom--body--typography--line-height)",
Expand Down