-
Notifications
You must be signed in to change notification settings - Fork 92
Update post, page, and index templates #136
Conversation
This space should stay large on smaller screens after all.
I may end up making some small design changes to the |
FWIW, those changes looks relevant to me 👍 |
With eda696b, this is in a decent spot for now, and I can iterate later on if need be. The whole PR should be ready to review! |
block-templates/index.html
Outdated
|
||
<!-- wp:post-title {"isLink":true,"fontSize":"large"} /--> | ||
<!-- wp:group {"align":"wide","layout":{"inherit":true}} --> |
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 this block need to be align: wide?
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, I added a commit to remove some unnecessary alignment declarations.
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.
Thank you both!
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 made a couple minor adjustments to the index template, I think this is looking good to bring in. Thanks @kjellr !
{ | ||
"name": "blank", | ||
"title": "Blank", | ||
"postTypes": [ |
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.
Just noting that the post types do not work yet, but they will soon: WordPress/gutenberg#35802
I've been tidying up many of our templates in Figma, and this is an attempt to put those new templates into action. (Apologies in advance for the larger PR, but one small change here and there led to another). A few general notes before I dive into specifics:
customTemplates
section to ourtheme.json
. We should've had this there originally, for the homepage and blank templates.var(--variable-name, 1rem)
), just in case someone kept these templates and changed themes or something.Index Template
This PR switches out the base index template with a fresh one that's more flexible. Previously, the default template was a grid, which looked pretty broken when someone had a mix of posts with featured images and without. This new layout is a bit more of a traditional blog layout, which scales a little better that way.
index.html
inherits the main query, and it also adds a Query Title block. Combined, that ensures that this same template can work for archive pages.Blog index:
Archive page:
Single & Page Templates
In the Figma file, I did some explorations around how to standardize spacing, eliminate the "boxy" feel we were getting from tons of dividers, and to better handle situations when there was no featured image. This PR implements those new changes.
Posts:
Pages:
Custom Templates
As introduced in the Figma file, I added a couple custom templates as well. These look identical to the normal ones, except that they do not have any separators. When testing these templates out, you may notice that all templates appear for all post types, even though they have specific
postTypes
defined. There's a Gutenberg bug already filed for this here: WordPress/gutenberg#31704