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

Pendant: layout for index template #5751

Merged
merged 8 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
59 changes: 34 additions & 25 deletions pendant/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,42 @@
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

<!-- wp:query {"tagName":"main","layout":{"inherit":true}} -->
<main class="wp-block-query">
<!-- wp:post-template -->
<!-- wp:group -->
<div class="wp-block-group">
<!-- wp:post-title {"isLink":true} /-->
<!-- wp:post-featured-image {"isLink":true} /-->
<!-- wp:post-excerpt /-->
<!-- wp:template-part {"slug":"post-meta"} /-->
<!-- wp:spacer {"height":40} -->
<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
<!-- wp:group {"style":{"spacing":{"margin":{"top":"0px"},"padding":{"top":"5em","bottom":"5em"}}},"backgroundColor":"foreground","textColor":"background","layout":{"inherit":true}} -->
<div class="wp-block-group has-background-color has-foreground-background-color has-text-color has-background" style="margin-top:0px;padding-top:5em;padding-bottom:5em"><!-- wp:heading {"level":1,"align":"wide"} -->
<h1 class="alignwide">Articles</h1>
<!-- /wp:heading --></div>
<!-- /wp:group -->

<!-- wp:query {"queryId":1,"query":{"perPage":4,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"exclude","inherit":true},"tagName":"main","displayLayout":{"type":"flex","columns":2},"layout":{"inherit":true}} -->
<main class="wp-block-query"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"1em","bottom":"1.5em"}}}} -->
<div class="wp-block-group alignwide" style="padding-top:1em;padding-bottom: 1.5em"><!-- wp:post-template -->
<!-- wp:group {"style":{"spacing":{"padding":{"top":"2em","bottom":"2em"}}}} -->
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the comps suggest there is less spacing here but I think yours looks good so maybe we leave it to the design pass of the templates.

<div class="wp-block-group" style="padding-top:2em;padding-bottom:2em"><!-- wp:post-featured-image {"isLink":true,"width":"100%","height":"16em"} /-->

<!-- wp:post-title {"level":3,"isLink":true} /-->
<!-- wp:post-excerpt /-->

<!-- wp:read-more {"style":{"typography":{"fontStyle":"normal","fontWeight":"500"}},"fontSize":"medium"} /--></div>
<!-- /wp:group -->
<!-- /wp:post-template -->
<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group">
<!-- wp:query-pagination -->
<!-- wp:query-pagination-previous /-->

</div>
<!-- /wp:group -->

<!-- wp:query-pagination-numbers /-->
<!-- wp:separator {"align":"wide","backgroundColor":"foreground","className":"is-style-wide"} -->
<hr class="wp-block-separator alignwide has-text-color has-foreground-color has-alpha-channel-opacity has-foreground-background-color has-background is-style-wide"/>
<!-- /wp:separator -->

<!-- wp:group {"align":"wide","style":{"spacing":{"margin":{"top":"0"},"padding":{"top":"2.5em","bottom":"2.5em"}}}} -->
<div class="wp-block-group alignwide" style="margin-top:0;padding-top:2.5em;padding-bottom:2.5em"><!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"space-between"}} -->
<!-- wp:query-pagination-previous /-->

<!-- wp:query-pagination-numbers /-->

<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination -->
</div>
<!-- /wp:group -->
<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination --></div>
<!-- /wp:group -->

</main>
<!-- /wp:query -->

<!-- wp:template-part {"slug":"footer","tagName":"footer","className":"site-footer-container"} /-->


<!-- wp:template-part {"slug":"footer","tagName":"footer","className":"site-footer-container"} /-->
34 changes: 34 additions & 0 deletions pendant/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@
}
],
"fontSizes": [
{
"name": "Extra Small",
"size": "0.9rem",
"slug": "x-small"
},
{
"name": "Small",
"size": "1rem",
Expand Down Expand Up @@ -220,6 +225,35 @@
"fontSize": "var(--wp--preset--font-size--medium)"
}
},
"core/query-pagination": {
"elements": {
"link": {
"color": {
"text": "var(--wp--preset--color--foreground)"
}
}
}
},
"core/query-pagination-next": {
"typography": {
"fontWeight": "500",
"textTransform": "uppercase",
"fontSize": "var(--wp--preset--font-size--x-small)"
}
},
"core/query-pagination-numbers": {
"typography": {
"fontWeight": "500",
"fontSize": "var(--wp--preset--font-size--x-small)"
}
},
"core/query-pagination-previous": {
"typography": {
"fontWeight": "500",
"textTransform": "uppercase",
"fontSize": "var(--wp--preset--font-size--x-small)"
}
},
"core/site-title": {
"typography": {
"fontSize": "var(--wp--preset--font-size--medium)",
Expand Down