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

Commit

Permalink
Quadrat: revise post header and meta (#3824)
Browse files Browse the repository at this point in the history
* Revise post header and meta.

* Reorder CSS

* Use pseudo elementls the dot is rendered.

* Make h1 font size a custom variable.

* Fix missing paren bug.

* Hack to hide the pipe dividers between post tags.

* Revise navigation type size + base type size to use preset.

* Display none to make the pseudo element go away.

* Update quadrat/block-template-parts/single.html

Co-authored-by: Kjell Reigstad <[email protected]>

* Update quadrat/block-template-parts/single.html

Co-authored-by: Kjell Reigstad <[email protected]>

* Update quadrat/block-template-parts/single.html

Co-authored-by: Kjell Reigstad <[email protected]>

Co-authored-by: Ben Dwyer <[email protected]>
Co-authored-by: Kjell Reigstad <[email protected]>
  • Loading branch information
3 people authored May 11, 2021
1 parent 7548e0a commit 0c26b06
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 21 deletions.
30 changes: 30 additions & 0 deletions quadrat/assets/theme.css

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

23 changes: 17 additions & 6 deletions quadrat/block-template-parts/single.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
<!-- wp:post-date {"textAlign":"center","fontSize":"tiny"} /-->
<!-- wp:post-tags {"textAlign":"center","fontSize":"tiny"} /-->
<!-- wp:spacer -->
<div style="height:170px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:group {"layout":{"inherit":true},"style":{"spacing":{"padding":{"top":"30px","right":"20px","bottom":"30px","left":"20px"}}}} -->
<div class="wp-block-group" style="padding-top:30px;padding-right:20px;padding-bottom:30px;padding-left:20px">
<!-- wp:group {"className":"post-meta"} -->
<div class="wp-block-group post-meta">
<!-- wp:post-date {"textAlign":"center","fontSize":"tiny"} /-->
<!-- wp:post-terms {"term":"category","textAlign":"center","fontSize":"tiny"} /-->
</div>
<!-- /wp:group -->

<!-- wp:post-title {"textAlign":"center","level":1} /-->
<!-- wp:group {"layout":{"inherit":true},"style":{"spacing":{"padding":{"top":"30px","right":"20px","bottom":"60px","left":"20px"}}}} -->
<div class="wp-block-group" style="padding-top:30px;padding-right:20px;padding-bottom:30px;padding-left:20px">
<!-- wp:post-title {"textAlign":"center","level":1,"align":"wide"} /-->
</div>
<!-- /wp:group -->

<!-- wp:post-featured-image {"align":"full"} /-->

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

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

<!-- wp:spacer {"height":150} -->
Expand All @@ -34,4 +45,4 @@
<!-- /wp:columns -->

</div>
<!-- /wp:group -->
<!-- /wp:group -->
22 changes: 15 additions & 7 deletions quadrat/child-experimental-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
"heading": {
"typography": {
"fontWeight": "500"
},
"h1": {
"fontSize":"min(max(48px, 7vw), 80px)"
}
},
"line-height": {
Expand Down Expand Up @@ -91,7 +94,7 @@
"margin": "0 .2em .2em 0",
"typography": {
"fontSize": "var(--wp--preset--font-size--huge)",
"fontWeight": "300"
"fontWeight": "400"
}
}
},
Expand Down Expand Up @@ -199,9 +202,9 @@
},
"core/post-title": {
"typography": {
"fontSize": "min(max(36px, 5vw), 65px)",
"fontWeight": "500",
"lineHeight": "var(--wp--custom--line-height--headings--h2)"
"fontSize": "var(--wp--custom--heading--h1--font-size)",
"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
"lineHeight": "var(--wp--custom--line-height--headings--h1)"
}
},
"core/quote": {
Expand Down Expand Up @@ -233,12 +236,17 @@
"fontSize": "20px",
"fontWeight": 800
}
},
"core/navigation": {
"typography": {
"fontSize": "20px"
}
}
},
"elements": {
"h1": {
"typography": {
"fontSize": "min(max(48px, 7vw), 80px)",
"fontSize": "var(--wp--custom--heading--h1--font-size)",
"lineHeight": "var(--wp--custom--line-height--headings--h1)"
}
},
Expand Down Expand Up @@ -279,8 +287,8 @@
}
},
"typography": {
"fontSize": "18px",
"fontWeight": "300",
"fontSize": "var(--wp--preset--font-size--normal)",
"fontWeight": "400",
"lineHeight": "var(--wp--custom--line-height--body)"
}
}
Expand Down
19 changes: 11 additions & 8 deletions quadrat/experimental-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
"typography": {
"fontWeight": "500",
"lineHeight": 1.125
},
"h1": {
"fontSize": "min(max(48px, 7vw), 80px)"
}
},
"list": {
Expand Down Expand Up @@ -182,7 +185,7 @@
"typography": {
"fontFamily": "var(--wp--preset--font-family--base)",
"fontSize": "var(--wp--preset--font-size--huge)",
"fontWeight": "300"
"fontWeight": "400"
}
}
},
Expand Down Expand Up @@ -375,7 +378,7 @@
},
"core/navigation": {
"typography": {
"fontSize": "var(--wp--preset--font-size--small)"
"fontSize": "20px"
}
},
"core/post-content": {
Expand All @@ -388,9 +391,9 @@
},
"core/post-title": {
"typography": {
"fontSize": "min(max(36px, 5vw), 65px)",
"lineHeight": "var(--wp--custom--line-height--headings--h2)",
"fontWeight": "500"
"fontSize": "var(--wp--custom--heading--h1--font-size)",
"lineHeight": "var(--wp--custom--line-height--headings--h1)",
"fontWeight": "var(--wp--custom--heading--typography--font-weight)"
}
},
"core/post-date": {
Expand Down Expand Up @@ -471,7 +474,7 @@
"elements": {
"h1": {
"typography": {
"fontSize": "min(max(48px, 7vw), 80px)",
"fontSize": "var(--wp--custom--heading--h1--font-size)",
"lineHeight": "var(--wp--custom--line-height--headings--h1)"
}
},
Expand Down Expand Up @@ -514,8 +517,8 @@
"typography": {
"lineHeight": "var(--wp--custom--line-height--body)",
"fontFamily": "var(--wp--preset--font-family--base)",
"fontSize": "18px",
"fontWeight": "300"
"fontSize": "var(--wp--preset--font-size--normal)",
"fontWeight": "400"
}
}
}
28 changes: 28 additions & 0 deletions quadrat/sass/_meta.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.post-meta {
align-items: center;
justify-content: center;

.wp-block-post-date::before {
display: none;
}

> *,
.wp-block-post-date {
margin: 0 8px;
}

.wp-block-post-terms {
margin-left: 0;
&::before {
color: var(--wp--custom--color--foreground);
content: "·";
margin-right: 8px;
}

// Needed while https://github.com/WordPress/gutenberg/issues/31710 is sorted.
color: transparent;
a {
color: var(--wp--custom--color--foreground);
}
}
}
1 change: 1 addition & 0 deletions quadrat/sass/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@import "block-patterns/headlines";
@import "elements/links";
@import "header";
@import "meta";

.wp-block-post-featured-image {
margin-top: 0;
Expand Down

0 comments on commit 0c26b06

Please sign in to comment.