Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

add archive template and posts-grid pattern #5994

Merged
merged 7 commits into from
Jun 3, 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
2 changes: 1 addition & 1 deletion curator/patterns/404.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
<p class="has-text-align-center"><?php echo esc_html__( 'This page could not be found. Try searching posts using the field below.', 'curator' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:search {"label":"","showLabel":false,"placeholder":"<?php echo esc_html__( 'Search', 'curator' ); ?>","buttonUseIcon":true,"borderColor":"foreground"} /-->
<!-- wp:pattern {"slug":"curator/search-form"} /-->
13 changes: 13 additions & 0 deletions curator/patterns/hidden-post-terms-and-date.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* Title: Tags and date
* Slug: curator/post-terms-and-date
* Inserter: no
*/

?>

<!-- wp:group {"style":{"spacing":{"blockGap":"0px"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group"><!-- wp:post-terms {"term":"category"} /-->
<!-- wp:post-date {"isLink":true,"style":{"typography":{"fontStyle":"italic","fontWeight":"400","fontSize":"14px"}}} /--></div>
<!-- /wp:group -->
10 changes: 10 additions & 0 deletions curator/patterns/hidden-search-form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
/**
* Title: Tags and date
* Slug: curator/search-form
* Inserter: no
*/

?>

<!-- wp:search {"label":"","showLabel":false,"placeholder":"<?php echo esc_html__( 'Search', 'curator' ); ?>","buttonUseIcon":true,"borderColor":"foreground"} /-->
28 changes: 28 additions & 0 deletions curator/patterns/posts-grid.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* Title: Posts grid
* Slug: curator/posts-grid
* Categories: featured, query
*/
?>

<!-- wp:group {"align":"full","layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group alignfull"><!-- wp:query {"queryId":0,"query":{"perPage":6,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"displayLayout":{"type":"flex","columns":3},"align":"wide"} -->
<div class="wp-block-query alignwide"><!-- wp:post-template -->
<!-- wp:group {"style":{"spacing":{"padding":{"top":"20px","right":"20px","bottom":"20px","left":"20px"}}},"layout":{"inherit":false}} -->
<div class="wp-block-group" style="padding-top:20px;padding-right:20px;padding-bottom:20px;padding-left:20px">
<!-- wp:post-featured-image {"isLink":true} /-->
<!-- wp:pattern {"slug":"curator/post-terms-and-date"} /-->
<!-- wp:post-title {"isLink":true,"textColor":"foreground"} /-->
<!-- wp:post-excerpt {"style":{"spacing":{"margin":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}}} /-->
</div>
<!-- /wp:group -->
<!-- /wp:post-template -->

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

<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination --></div>
<!-- /wp:query --></div>
<!-- /wp:group -->
34 changes: 8 additions & 26 deletions curator/templates/archive.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,15 @@
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

<!-- wp:query {"tagName":"main","layout":{"inherit":true}} -->
<main class="wp-block-query">
<!-- wp:query-title {"type":"archive","style":{"spacing":{"margin":{"bottom":"100px"}}}} /-->
<!-- 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","layout":{"inherit":true}} /-->
<!-- wp:spacer {"height":40} -->
<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
<!-- /wp:group -->
<!-- /wp:post-template -->
<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group">
<!-- wp:query-pagination -->
<!-- wp:query-pagination-previous /-->

<!-- wp:query-pagination-numbers /-->
<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"top":"3rem","bottom":"2.5rem"}}}} -->
<main class="wp-block-group" style="padding-top:3rem;padding-bottom:2.5rem">

<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination -->
</div>
<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group"><!-- wp:query-title {"type":"archive","textAlign":"center","align":"wide","style":{"spacing":{"margin":{"bottom":"100px"}}}} /--></div>
<!-- /wp:group -->

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

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

<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
49 changes: 11 additions & 38 deletions curator/templates/search.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,20 @@
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

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

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

<!-- wp:query {"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","layout":{"inherit":true}} /-->

<!-- wp:spacer {"height":40} -->
<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
<!-- /wp:group -->
<!-- /wp:post-template -->
<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"top":"3rem","bottom":"2.5rem"}}}} -->
<main class="wp-block-group" style="padding-top:3rem;padding-bottom:2.5rem">

<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group">
<!-- wp:query-pagination -->
<!-- wp:query-pagination-previous /-->

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

<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination -->
<!-- wp:pattern {"slug":"curator/search-form"} /-->
<!-- wp:spacer -->
<div style="height:4rem" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
<!-- /wp:group -->

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

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

<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
61 changes: 60 additions & 1 deletion curator/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,42 @@
"fontSize": "var(--wp--preset--font-size--medium)"
}
},
"core/post-terms": {
"elements": {
"link": {
"color": {
"text": "var(--wp--preset--color--foreground)"
},
"typography": {
"textDecoration": "none",
"fontWeight":"700"
}
}
}
},
"core/post-date": {
"color": {
"text": "var(--wp--preset--color--foreground)"
},
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
},
"elements": {
"link": {
"color": {
"text": "var(--wp--preset--color--foreground)"
},
"typography": {
"textDecoration": "none"
}
}
}
},
"core/post-featured-image": {
"spacing": {
"padding": {
"bottom": "1rem"
}
}
},
"core/post-title": {
Expand All @@ -245,9 +275,38 @@
"bottom": "0"
}
},
"color": {
"text": "var(--wp--preset--color--foreground)"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--heading-font)",
"lineHeight": "1.125"
"lineHeight": "1.125",
"textDecoration": "none"
},
"elements": {
"link": {
"color": {
"text": "var(--wp--preset--color--foreground)"
},
"typography": {
"textDecoration": "none"
}
}
}
},
"core/query-pagination": {
"spacing": {
"padding": {
"left": "20px",
"right": "20px"
}
},
"elements": {
"link": {
"color": {
"text": "var(--wp--preset--color--foreground)"
}
}
}
},
"core/pullquote": {
Expand Down