Skip to content

Commit

Permalink
Fix heading hierarchy and styles
Browse files Browse the repository at this point in the history
Affects home and meetings pages

Closes #2
  • Loading branch information
adamwoodnz committed Oct 3, 2024
1 parent 17ad25d commit 5afe772
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
10 changes: 5 additions & 5 deletions source/wp-content/themes/wporg-make-2024/parts/card-team.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20","left":"var:preset|spacing|20","right":"var:preset|spacing|20"}},"border":{"width":"1px"},"dimensions":{"minHeight":"100%"}},"borderColor":"light-grey-1","layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch","verticalAlignment":"space-between"}} -->
<div class="wp-block-group has-border-color has-light-grey-1-border-color" style="border-width:1px;min-height:100%;padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)">

<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:post-title {"isLink":true,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"elements":{"link":{"color":{"text":"var:preset|color|charcoal-1"}}}}} /-->

<!-- wp:post-title {"level":3,"isLink":true,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"elements":{"link":{"color":{"text":"var:preset|color|charcoal-1"}}},"typography":{"fontSize":"22px","lineHeight":"1.8"}}} /-->

<!-- wp:post-content {"style":{"typography":{"lineHeight":"1.7"}},"fontSize":"small"} /-->

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

<!-- wp:wporg-make/meeting-time {"fontSize":"extra-small"} /-->

</div>
<!-- /wp:group -->
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ function init() {
* @return string Returns the block markup.
*/
function render( $attributes, $content, $block ) {
if ( ! isset( $block->context['postId'] ) || ! shortcode_exists( 'meeting_time' ) ) {
return '';
}

$post_id = $block->context['postId'];
$team = get_post_field( 'post_title', $post_id );

Expand Down
6 changes: 6 additions & 0 deletions source/wp-content/themes/wporg-make-2024/src/style/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,9 @@
}
}
}

// Temporary fix hiding the header section in page content, for example on /meetings.
// Can be removed after launch.
.header-section {
display: none;
}
4 changes: 2 additions & 2 deletions source/wp-content/themes/wporg-make-2024/templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<!-- wp:group {"tagName":"main","layout":{"type":"constrained"},"className":"entry-content","style":{"spacing":{"blockGap":"0px"}}} -->
<main class="wp-block-group entry-content">

<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space","top":"var:preset|spacing|20","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--edge-space);padding-left:var(--wp--preset--spacing--edge-space);padding-bottom:var(--wp--preset--spacing--60)">
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space","top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--edge-space);padding-left:var(--wp--preset--spacing--edge-space);padding-bottom:var(--wp--preset--spacing--60)">

<!-- wp:post-title {"level":1,"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|30"}}}} /-->

Expand Down
4 changes: 2 additions & 2 deletions source/wp-content/themes/wporg-make-2024/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@
"core/post-title": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--eb-garamond)",
"fontSize": "22px",
"lineHeight": "1.81",
"fontSize": "var(--wp--custom--heading--level-1--typography--font-size)",
"lineHeight": "var(--wp--custom--heading--level-1--typography--line-height)",
"fontWeight": "400"
}
}
Expand Down

0 comments on commit 5afe772

Please sign in to comment.