This repository was archived by the owner on Jan 26, 2022. It is now read-only.
Update post, page, and index templates#136
Merged
Merged
Conversation
This space should stay large on smaller screens after all.
Collaborator
Author
|
I may end up making some small design changes to the |
Contributor
|
FWIW, those changes looks relevant to me 👍 |
7 tasks
Collaborator
Author
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! |
scruffian
reviewed
Oct 20, 2021
| <div class="wp-block-group" style="padding-right:var(--wp--custom--spacing--small, 1.25rem);padding-left:var(--wp--custom--spacing--small, 1.25rem)"> | ||
|
|
||
| <!-- wp:post-title {"isLink":true,"fontSize":"large"} /--> | ||
| <!-- wp:group {"align":"wide","layout":{"inherit":true}} --> |
Collaborator
There was a problem hiding this comment.
Does this block need to be align: wide?
Collaborator
There was a problem hiding this comment.
No, I added a commit to remove some unnecessary alignment declarations.
jffng
approved these changes
Oct 20, 2021
| { | ||
| "name": "blank", | ||
| "title": "Blank", | ||
| "postTypes": [ |
Collaborator
There was a problem hiding this comment.
Just noting that the post types do not work yet, but they will soon: WordPress/gutenberg#35802
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
customTemplatessection 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.htmlinherits 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
postTypesdefined. There's a Gutenberg bug already filed for this here: WordPress/gutenberg#31704