Skip to content

Commit

Permalink
Use the Gutenberg flex layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
jffng committed Aug 4, 2021
1 parent 8f941d0 commit f3b4de4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
4 changes: 0 additions & 4 deletions skatepark/assets/theme.css

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

2 changes: 1 addition & 1 deletion skatepark/block-templates/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:template-part {"slug":"header","tagName":"header","layout":{"type":"flex"},"align":"full"} /-->

<!-- wp:query {"tagName":"main","queryId":1,"query":{"perPage":10,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":""}} -->
<main class="wp-block-query">
Expand Down
21 changes: 21 additions & 0 deletions skatepark/block-templates/singular.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- wp:template-part {"slug":"header","tagName":"header","layout":{"type":"flex"},"align":"full"} /-->

<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group">
<!-- wp:post-title /-->
</div>
<!-- /wp:group -->

<!-- wp:group {"tagName":"main"} -->
<main class="wp-block-group">
<!-- wp:post-featured-image {"align":"full"} /-->

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

<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group"><!-- wp:post-comments /--></div>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","tagName":"footer","layout":{"inherit":true},"className":"site-footer-container"} /-->
6 changes: 1 addition & 5 deletions skatepark/sass/templates/_header.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
header {
display: flex; // Apply a cluster layout (page 109 of the every-layout.dev PDF)
justify-content: space-between;
align-items: center;
justify-content: space-between; // Apply a cluster (flex?) layout
flex-wrap: wrap-reverse;
padding-right: var(--wp--custom--post-content--padding--right);
padding-left: var(--wp--custom--post-content--padding--left);
> * {
flex-grow: 1;
> * { // Apply a stack layout (page 69 of the every-layout.dev PDF)
Expand Down

0 comments on commit f3b4de4

Please sign in to comment.