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

Adding Poetry: 404 and search templates #145

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Open
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
21 changes: 21 additions & 0 deletions poetry/parts/secondary-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- wp:group {"tagName":"header","style":{"spacing":{"padding":{"top":"32px","bottom":"32px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:32px;padding-bottom:32px">
<!-- wp:group {"style":{"spacing":{"blockGap":"64px"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"blockGap":"88px"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group">
<!-- wp:site-title {"level":0,"isLink":false,"style":{"typography":{"fontSize":"24px","fontStyle":"normal","fontWeight":"600"}},"textColor":"custom-text"} /-->

<!-- wp:group {"style":{"spacing":{"blockGap":"48px"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group">
<!-- wp:heading {"level":1,"style":{"typography":{"fontSize":"58px"}}} -->
<h1 class="wp-block-heading" style="font-size:58px">Alas, where words once wandered</h1>
<!-- /wp:heading -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
29 changes: 29 additions & 0 deletions poetry/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- wp:group {"style":{"spacing":{"padding":{"top":"32px","bottom":"32px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:32px;padding-bottom:32px">
<!-- wp:group {"style":{"spacing":{"blockGap":"64px"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"blockGap":"88px"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group">
<!-- wp:site-title {"level":0,"isLink":false,"style":{"typography":{"fontSize":"24px","fontStyle":"normal","fontWeight":"600"}},"textColor":"custom-text"} /-->

<!-- wp:group {"style":{"spacing":{"blockGap":"48px"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group"><!-- wp:heading {"level":1} -->
<h1 class="wp-block-heading">Alas, <br>where words once wandered</h1>
<!-- /wp:heading -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

<!-- wp:group {"style":{"spacing":{"padding":{"top":"32px","bottom":"64px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:32px;padding-bottom:64px"><!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">It looks like nothing was found at this location. Try a search.</h5>
<!-- /wp:heading -->

<!-- wp:search {"label":"Search...","buttonText":"Search","buttonUseIcon":true} /-->
</div>
<!-- /wp:group -->
77 changes: 77 additions & 0 deletions poetry/templates/search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!-- wp:group {"style":{"spacing":{"padding":{"top":"32px","bottom":"64px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:32px;padding-bottom:64px">
<!-- wp:group {"style":{"spacing":{"blockGap":"64px"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"blockGap":"88px"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group">
<!-- wp:site-title {"level":0,"isLink":false,"style":{"typography":{"fontSize":"24px","fontStyle":"normal","fontWeight":"600"}},"textColor":"custom-text"} /-->

<!-- wp:group {"style":{"spacing":{"blockGap":"48px"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group">
<!-- wp:query-title {"type":"search","align":"wide","style":{"typography":{"lineHeight":"1","fontSize":"90px"},"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|10"}}}} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

<!-- wp:spacer {"height":"50px"} -->
<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:group {"tagName":"main","backgroundColor":"custom-background-light","layout":{"contentSize":null,"type":"constrained"}} -->
<main class="wp-block-group has-custom-background-light-background-color has-background">
<!-- 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","layout":{"contentSize":null,"type":"constrained"}} -->
Copy link
Collaborator

@MaggieCabrera MaggieCabrera Mar 25, 2024

Choose a reason for hiding this comment

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

Since this Query block should look the same as the one in the index template, what about we make it into a pattern instead and then we avoid duplicating code over both templates? (that way when we fix the problem with the date we only change it in one place)

<main class="wp-block-query"><!-- wp:group {"backgroundColor":"custom-background-light"} -->
<div class="wp-block-group has-custom-background-light-background-color has-background">
<!-- wp:post-template {"layout":{"type":"default"}} -->
<!-- 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" style="padding-top:96px"><!-- wp:post-date /--></div>
<!-- /wp: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":"56px","height":"56px","sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full is-resized"><img
src="https://susty.lndo.site/wp-content/themes/poetry/assets/images/feather-small.png"
alt="" class="wp-image-15" style="width:56px;height:56px" /></figure>
<!-- /wp:image -->

<!-- wp:post-title {"style":{"spacing":{"padding":{"right":"24%"}}}} /-->

<!-- wp:group {"style":{"spacing":{"blockGap":"8px"},"elements":{"link":{"color":{"text":"var:preset|color|vivid-red"}}}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group has-link-color"><!-- wp:paragraph {"textColor":"custom-contrast"} -->
<p class="has-custom-contrast-color has-text-color">By</p>
<!-- /wp:paragraph -->

<!-- wp:post-author {"showAvatar":false,"showBio":false,"textColor":"custom-contrast"} /-->
</div>
<!-- /wp:group -->

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

<!-- wp:spacer {"height":"40px"} -->
<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
<!-- /wp:group -->
<!-- /wp:post-template -->
</div>
<!-- /wp:group -->
</main>
<!-- /wp:query -->
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","theme":"poetry","tagName":"footer","area":"footer"} /-->
Copy link
Collaborator

Choose a reason for hiding this comment

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

Both templates should have a footer element. We can go without the area attribute (the theme.json file already includes this info) and the theme slug (it will make the template part break if the theme is installed in a subfolder)