-
Notifications
You must be signed in to change notification settings - Fork 63
Conversation
parts/post-meta.html
Outdated
<div class="wp-block-column"> | ||
<!-- wp:group {"style":{"spacing":{"blockGap":"1ch"}},"layout":{"type":"flex"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:paragraph --><p>Posted</p><!-- /wp:paragraph --><!-- wp:post-date {"format":"F j, Y"} /--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(If we are going to make it translation ready, it needs to be in a pattern)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I've made it a pattern now.
I am not 100% convinced that the cover block in the single template has a purpose unless the post title is the inner content? |
Yeah, I think this is a really good point, and I like that this would make it even more different from the default template. I've made this change so we can test it out. I think it's OK that this doesn't match the layout in the post editor, for now. |
Good call on moving the title into the Cover block — that works well and I don't think it's an issue with the Cover block not being visible in the post editor. One question about the overlay on the Cover block: am I correct in understanding that the overlay color can be set in theme.json but not the opacity? I'm wondering if we should bump the base opacity to at least 50 so that any cool gradient effects could be slightly more visible by default. |
Correct. The opacity can be set in the template though. I think 50 would probably work. |
Thanks both! I've set the opacity to 50. |
patterns/post-meta.php
Outdated
/** | ||
* Title: Post Meta | ||
* Slug: twentytwentythree/post-meta | ||
* Categories: post meta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block pattern category does not exist. It could be registered, or another category can be picked and this can be used as keywords instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, thanks. I meant to come back to this! I've changed the category to 'query', as this would always be used alongside a post query. If this doesn't work, maybe 'text' would work? And I've added 'post meta' as keywords 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think query is OK.. it is not a query loop but it can be placed in one to create new blog layouts.
patterns/post-meta.php
Outdated
<div class="wp-block-column"> | ||
<!-- wp:group {"style":{"spacing":{"blockGap":"1ch"}},"layout":{"type":"flex"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:paragraph --><p><?php echo esc_html_x( 'Posted', 'Verb to explain the publication status of a post', 'twentytwentythree' ); ?></p><!-- /wp:paragraph --><!-- wp:post-date {"format":"F j, Y"} /--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the block break if the date format is made translatable? (untested)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it seems to be fine! I've just pushed a commit that allows this to be translatable, and I can see the format still working correctly both in the editor and on the front end. I'm also still able to change it from the site editor.
This PR adds additional templates to offer the following options for single posts and pages:
It also attempts to make the markup more consistent across the different templates:
Addresses #101 & part of #133.
Screenshots
No featured image:
With a featured image:
With a cover block:
With a cover block and featured image: