Skip to content

Commit

Permalink
Poetry: fix index template (#152)
Browse files Browse the repository at this point in the history
* refactor pattern so it only has the query block, fixed header and footer

* renamed pattern

* fix id of image

* aligned posts to the left

* make right group block fill space

* restore lock file

* used get_template_directory_uri
  • Loading branch information
MaggieCabrera authored Apr 30, 2024
1 parent 5f28879 commit dd48cf6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
24 changes: 12 additions & 12 deletions poetry/patterns/index.php → poetry/patterns/posts.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<?php
/**
* Title: index
* Slug: poetry/index
* Categories: hidden
* Inserter: no
* Title: List of posts
* Slug: poetry/posts
* Categories: posts
* Block Types: core/query
*/
?>
<!-- wp:template-part {"slug":"header","tagName":"header","theme":"poetry"} /-->

<!-- wp:query {"queryId":0,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[]},"tagName":"main","backgroundColor":"custom-background-light","layout":{"inherit":true}} -->
<!-- wp:query {"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[]},"tagName":"main","backgroundColor":"custom-background-light","layout":{"inherit":true}} -->
<main class="wp-block-query has-custom-background-light-background-color has-background"><!-- wp:post-template -->
<!-- wp:group {"layout":{"type":"default"}} -->
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"padding":{"top":"96px","right":"0","bottom":"96px","left":"0"},"blockGap":"40px"}},"layout":{"type":"flex","flexWrap":"nowrap","orientation":"horizontal","verticalAlignment":"top","justifyContent":"center"}} -->
<div class="wp-block-group" style="padding-top:96px;padding-right:0;padding-bottom:96px;padding-left:0"><!-- wp:group {"style":{"spacing":{"padding":{"top":"96px"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"padding":{"top":"96px","right":"0","bottom":"96px","left":"0"},"blockGap":"40px"}},"layout":{"type":"flex","flexWrap":"nowrap","orientation":"horizontal","verticalAlignment":"top","justifyContent":"left"}} -->
<div class="wp-block-group" style="padding-top:96px;padding-right:0;padding-bottom:96px;padding-left:0"><!-- wp:group {"style":{"spacing":{"padding":{"top":"96px"}},"layout":{"selfStretch":"fixed","flexSize":"155px"}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="padding-top:96px"><!-- wp:post-date /--></div>
<!-- /wp:group -->

<!-- wp:group {"style":{"layout":{"selfStretch":"fill","flexSize":null}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"padding":{"right":"56px","left":"56px"},"blockGap":"32px"},"border":{"left":{"width":"2px"}}},"layout":{"type":"flex","orientation":"vertical","flexWrap":"nowrap"}} -->
<div class="wp-block-group" style="border-left-width:2px;padding-right:56px;padding-left:56px"><!-- wp:image {"id":15,"width":56,"height":56,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full is-resized"><img src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/feather-small.png" alt="" class="wp-image-15" width="56" height="56"/></figure>
<div class="wp-block-group" style="border-left-width:2px;padding-right:56px;padding-left:56px"><!-- wp:image {"width":56,"height":56,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full is-resized"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/feather-small.png" alt="" width="56" height="56"/></figure>
<!-- /wp:image -->

<!-- wp:post-title {"style":{"spacing":{"padding":{"right":"24%"}}}} /-->
Expand All @@ -33,6 +34,7 @@

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

<!-- wp:spacer {"height":"40px"} -->
Expand All @@ -41,5 +43,3 @@
<!-- /wp:group -->
<!-- /wp:post-template --></main>
<!-- /wp:query -->

<!-- wp:template-part {"slug":"footer","tagName":"footer","theme":"poetry"} /-->
6 changes: 5 additions & 1 deletion poetry/templates/index.html
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<!-- wp:pattern {"slug":"poetry/index"} /-->
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

<!-- wp:pattern {"slug":"poetry/posts"} /-->

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

0 comments on commit dd48cf6

Please sign in to comment.