From 19cca2e8d9f4753f42f10ea76efe88b1aebea1ac Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:25:26 +1200 Subject: [PATCH] 2024 Theme: Make heading styles consistent across all templates --- .../patterns/front-page-header.php | 4 +-- .../page-learning-pathways-content.php | 8 ++++-- .../page-online-workshops-content.php | 4 +++ .../patterns/search-content.php | 14 ++++++++-- .../src/learning-pathway-header/index.php | 10 ++----- .../templates/page-learning-pathways.html | 2 -- .../templates/page-online-workshops.html | 2 -- .../themes/pub/wporg-learn-2024/theme.json | 28 +++++++++++++------ 8 files changed, 46 insertions(+), 26 deletions(-) diff --git a/wp-content/themes/pub/wporg-learn-2024/patterns/front-page-header.php b/wp-content/themes/pub/wporg-learn-2024/patterns/front-page-header.php index a9e0097d8..37ee9356a 100644 --- a/wp-content/themes/pub/wporg-learn-2024/patterns/front-page-header.php +++ b/wp-content/themes/pub/wporg-learn-2024/patterns/front-page-header.php @@ -23,8 +23,8 @@
- -

+ +

diff --git a/wp-content/themes/pub/wporg-learn-2024/patterns/page-learning-pathways-content.php b/wp-content/themes/pub/wporg-learn-2024/patterns/page-learning-pathways-content.php index 7a687e69f..674e1138d 100644 --- a/wp-content/themes/pub/wporg-learn-2024/patterns/page-learning-pathways-content.php +++ b/wp-content/themes/pub/wporg-learn-2024/patterns/page-learning-pathways-content.php @@ -8,8 +8,12 @@ use function WPOrg_Learn\Sensei\{get_my_courses_page_url} ?> - -

+ +

+ + + +

diff --git a/wp-content/themes/pub/wporg-learn-2024/patterns/page-online-workshops-content.php b/wp-content/themes/pub/wporg-learn-2024/patterns/page-online-workshops-content.php index 3a673dfe9..6d7d7e3ca 100644 --- a/wp-content/themes/pub/wporg-learn-2024/patterns/page-online-workshops-content.php +++ b/wp-content/themes/pub/wporg-learn-2024/patterns/page-online-workshops-content.php @@ -10,6 +10,10 @@
+ +

+ +

diff --git a/wp-content/themes/pub/wporg-learn-2024/patterns/search-content.php b/wp-content/themes/pub/wporg-learn-2024/patterns/search-content.php index 24ccafe25..52d4f6f8f 100644 --- a/wp-content/themes/pub/wporg-learn-2024/patterns/search-content.php +++ b/wp-content/themes/pub/wporg-learn-2024/patterns/search-content.php @@ -7,6 +7,16 @@ ?> + +
+ + +

+ + +
+ +
@@ -56,8 +66,8 @@ - -

+ +

diff --git a/wp-content/themes/pub/wporg-learn-2024/src/learning-pathway-header/index.php b/wp-content/themes/pub/wporg-learn-2024/src/learning-pathway-header/index.php index 3b0cac55a..58ed4233d 100644 --- a/wp-content/themes/pub/wporg-learn-2024/src/learning-pathway-header/index.php +++ b/wp-content/themes/pub/wporg-learn-2024/src/learning-pathway-header/index.php @@ -49,10 +49,6 @@ function render( $attributes, $content, $block ) { return ''; } - $learning_pathway_id = $learning_pathway_object->term_id; - $learning_pathway_name = $learning_pathway_object->name; - $learning_pathway_description = $learning_pathway_object->description; - $content = '
@@ -62,12 +58,10 @@ function render( $attributes, $content, $block ) {
- -

' . esc_html( $learning_pathway_name ) . '

- + -

' . esc_html( $learning_pathway_description ) . '

+

' . esc_html( $learning_pathway_object->description ) . '

diff --git a/wp-content/themes/pub/wporg-learn-2024/templates/page-learning-pathways.html b/wp-content/themes/pub/wporg-learn-2024/templates/page-learning-pathways.html index 19bf10545..e339b1bdc 100644 --- a/wp-content/themes/pub/wporg-learn-2024/templates/page-learning-pathways.html +++ b/wp-content/themes/pub/wporg-learn-2024/templates/page-learning-pathways.html @@ -6,8 +6,6 @@
- - diff --git a/wp-content/themes/pub/wporg-learn-2024/templates/page-online-workshops.html b/wp-content/themes/pub/wporg-learn-2024/templates/page-online-workshops.html index b7f3509e0..a490eef1c 100644 --- a/wp-content/themes/pub/wporg-learn-2024/templates/page-online-workshops.html +++ b/wp-content/themes/pub/wporg-learn-2024/templates/page-online-workshops.html @@ -6,8 +6,6 @@
- -
diff --git a/wp-content/themes/pub/wporg-learn-2024/theme.json b/wp-content/themes/pub/wporg-learn-2024/theme.json index ddef07675..f0b776672 100644 --- a/wp-content/themes/pub/wporg-learn-2024/theme.json +++ b/wp-content/themes/pub/wporg-learn-2024/theme.json @@ -38,7 +38,10 @@ }, "level-1": { "typography": { - "lineHeight": 1.2 + "fontFamily": "var(--wp--preset--font-family--eb-garamond)", + "fontSize": "36px", + "lineHeight": 1.3, + "fontWeight": 400 }, "breakpoint": { "small-only": { @@ -167,21 +170,30 @@ "blocks": { "core/post-title": { "typography": { - "fontFamily": "var(--wp--preset--font-family--eb-garamond)", - "fontSize": "36px", - "lineHeight": "1.3" + "fontFamily": "var(--wp--custom--heading--level-1--typography--font-family)", + "fontSize": "var(--wp--custom--heading--level-1--typography--font-size)", + "lineHeight": "var(--wp--custom--heading--level-1--typography--line-height)", + "fontWeight": "var(--wp--custom--heading--level-1--typography--font-weight)" } }, "core/query-title": { "typography": { - "fontFamily": "var(--wp--preset--font-family--eb-garamond)", - "fontSize": "36px", - "lineHeight": "1.3", - "fontWeight": "400" + "fontFamily": "var(--wp--custom--heading--level-1--typography--font-family)", + "fontSize": "var(--wp--custom--heading--level-1--typography--font-size)", + "lineHeight": "var(--wp--custom--heading--level-1--typography--line-height)", + "fontWeight": "var(--wp--custom--heading--level-1--typography--font-weight)" } } }, "elements": { + "h1": { + "typography": { + "fontFamily": "var(--wp--custom--heading--level-1--typography--font-family)", + "fontSize": "var(--wp--custom--heading--level-1--typography--font-size)", + "lineHeight": "var(--wp--custom--heading--level-1--typography--line-height)", + "fontWeight": "var(--wp--custom--heading--level-1--typography--font-weight)" + } + }, "h2": { "typography": { "fontSize": "var(--wp--preset--font-size--heading-4)",