Skip to content

Commit

Permalink
feat: update archive template (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasguillot authored Nov 8, 2023
1 parent 5605dab commit 3c8556d
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 74 deletions.
92 changes: 46 additions & 46 deletions templates/archive.html
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
<!-- wp:template-part {"slug":"header","theme":"newspack-block-theme","tagName":"header"} /-->

<!-- 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":{"type":"constrained"}} -->
<main class="wp-block-query"><!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|30","margin":{"bottom":"var:preset|spacing|70"}}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group" style="margin-bottom:var(--wp--preset--spacing--70)"><!-- wp:query-title {"type":"archive","showPrefix":false} /-->

<!-- wp:term-description {"style":{"spacing":{"margin":{"top":"0","right":"0","bottom":"0","left":"0"}}}} /--></div>
<!-- /wp:group -->

<!-- wp:post-template -->
<!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"var:preset|spacing|30","left":"var:preset|spacing|50"}}},"className":"is-style-first-col-to-second"} -->
<div class="wp-block-columns is-style-first-col-to-second"><!-- wp:column {"width":"150px"} -->
<div class="wp-block-column" style="flex-basis:150px"><!-- wp:post-featured-image {"aspectRatio":"3/2"} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":""} -->
<div class="wp-block-column"><!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"}}} -->
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"blockGap":"0"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group"><!-- wp:post-terms {"term":"category","style":{"typography":{"fontStyle":"normal","fontWeight":"700","textTransform":"uppercase"}},"fontSize":"small"} /-->

<!-- wp:post-title {"isLink":true,"fontSize":"large"} /--></div>
<!-- /wp:group -->

<!-- wp:post-excerpt /-->

<!-- wp:post-author {"showAvatar":false,"byline":"By","isLink":true} /-->

<!-- wp:post-date {"isLink":true} /--></div>
<!-- /wp:group --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:separator {"backgroundColor":"quartary"} -->
<hr class="wp-block-separator has-text-color has-quartary-color has-alpha-channel-opacity has-quartary-background-color has-background"/>
<!-- /wp:separator -->
<!-- /wp:post-template -->

<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group"><!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} -->
<!-- wp:query-pagination-previous /-->

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

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

<!-- wp:template-part {"slug":"footer","theme":"newspack-block-theme","tagName":"footer"} /-->
<main class="wp-block-query"><!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|30","margin":{"bottom":"var:preset|spacing|80"}}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group" style="margin-bottom:var(--wp--preset--spacing--80)"><!-- wp:query-title {"type":"archive","showPrefix":false} /-->
<!-- wp:term-description /--></div>
<!-- /wp:group -->
<!-- wp:post-template -->
<!-- wp:columns {"className":"is-style-first-col-to-second"} -->
<div class="wp-block-columns is-style-first-col-to-second"><!-- wp:column {"width":"31.5%"} -->
<div class="wp-block-column" style="flex-basis:31.5%"><!-- wp:post-featured-image {"aspectRatio":"3/2"} /--></div>
<!-- /wp:column -->
<!-- wp:column {"width":"68.5%","style":{"spacing":{"blockGap":"var:preset|spacing|20"}}} -->
<div class="wp-block-column" style="flex-basis:68.5%"><!-- wp:group {"style":{"spacing":{"blockGap":"0"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group"><!-- wp:post-terms {"term":"category","fontSize":"small"} /-->
<!-- wp:post-title {"level":4,"isLink":true} /--></div>
<!-- /wp:group -->
<!-- wp:post-excerpt {"moreText":"","fontSize":"small"} /-->
<!-- wp:group {"style":{"spacing":{"blockGap":"0"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group"><!-- wp:post-author {"showAvatar":false,"byline":"By","isLink":true,"fontSize":"x-small"} /-->
<!-- wp:post-date {"isLink":true,"fontSize":"x-small"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- /wp:post-template -->
<!-- wp:group {"align":"wide","style":{"spacing":{"blockGap":"var:preset|spacing|30","margin":{"top":"var:preset|spacing|80"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide" style="margin-top:var(--wp--preset--spacing--80)"><!-- wp:separator {"align":"wide"} -->
<hr class="wp-block-separator alignwide has-alpha-channel-opacity"/>
<!-- /wp:separator -->
<!-- wp:query-pagination {"align":"wide","layout":{"type":"flex","justifyContent":"center"}} -->
<!-- wp:query-pagination-previous /-->
<!-- wp:query-pagination-numbers /-->
<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination --></div>
<!-- /wp:group --></main>
<!-- /wp:query -->
<!-- wp:template-part {"slug":"footer","theme":"newspack-block-theme","tagName":"footer"} /-->
75 changes: 47 additions & 28 deletions theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,27 @@
"lineHeight": "var( --wp--custom--line-height--small )"
}
},
"core/comments-pagination": {
"elements": {
"link": {
"color": {
"text": "var( --wp--preset--color--contrast )"
},
":hover": {
"typography": {
"textDecoration": "underline"
}
},
"typography": {
"textDecoration": "none"
}
}
},
"typography": {
"fontSize": "var( --wp--preset--font-size--small )",
"lineHeight": "var( --wp--custom--line-height--small )"
}
},
"core/gallery": {
"spacing": {
"margin": {
Expand Down Expand Up @@ -335,15 +356,21 @@
"text": "var( --wp--preset--color--tertiary )"
},
":hover": {
"color": {
"text": "var( --wp--preset--color--contrast )"
},
"typography": {
"textDecoration": "underline"
"textDecoration": "none"
}
},
"typography": {
"textDecoration": "underline"
}
}
},
"typography": {
"fontSize": "var( --wp--preset--font-size--small )",
"lineHeight": "var( --wp--custom--line-height--small )"
"fontSize": "var( --wp--preset--font-size--x-small )",
"lineHeight": "var( --wp--custom--line-height--x-small )"
}
},
"core/post-author-biography": {
Expand Down Expand Up @@ -376,27 +403,6 @@
"lineHeight": "var( --wp--custom--line-height--small )"
}
},
"core/comments-pagination": {
"elements": {
"link": {
"color": {
"text": "var( --wp--preset--color--contrast )"
},
":hover": {
"typography": {
"textDecoration": "underline"
}
},
"typography": {
"textDecoration": "none"
}
}
},
"typography": {
"fontSize": "var( --wp--preset--font-size--small )",
"lineHeight": "var( --wp--custom--line-height--small )"
}
},
"core/post-date": {
"color": {
"text": "var( --wp--preset--color--tertiary )"
Expand All @@ -407,18 +413,21 @@
"text": "var( --wp--preset--color--tertiary )"
},
":hover": {
"color": {
"text": "var( --wp--preset--color--contrast )"
},
"typography": {
"textDecoration": "underline"
"textDecoration": "none"
}
},
"typography": {
"textDecoration": "none"
"textDecoration": "underline"
}
}
},
"typography": {
"fontSize": "var( --wp--preset--font-size--small )",
"lineHeight": "var( --wp--custom--line-height--small )"
"fontSize": "var( --wp--preset--font-size--x-small )",
"lineHeight": "var( --wp--custom--line-height--x-small )"
}
},
"core/post-terms": {
Expand All @@ -436,6 +445,10 @@
}
}
}
},
"typography": {
"fontWeight": "700",
"textTransform": "uppercase"
}
},
"core/post-title": {
Expand Down Expand Up @@ -564,6 +577,12 @@
"fontWeight": "700",
"lineHeight": "var( --wp--custom--line-height--large )"
}
},
"core/term-description": {
"typography": {
"fontSize": "var( --wp--preset--font-size--large )",
"lineHeight": "var( --wp--custom--line-height--large )"
}
}
},
"color": {
Expand Down

0 comments on commit 3c8556d

Please sign in to comment.