Skip to content

Commit

Permalink
Headers: Update site & page title in local navigation
Browse files Browse the repository at this point in the history
- Updates the style of Rosetta news header to black, fixes the top-border on local nav
- Add archive & page title to the news posts
- Fix the site title link color on Download subpages

See WordPress/wporg-mu-plugins#535
  • Loading branch information
ryelle committed Jun 27, 2024
1 parent 2328a09 commit 04e156d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/wp-content/themes/wporg-main-2022/parts/header.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- wp:wporg/global-header /-->
<!-- wp:wporg/global-header {"style":{"border":{"bottom":{"color":"var:preset|color|white-opacity-15","style":"solid","width":"1px"}}}} /-->

<!-- wp:pattern {"slug":"wporg-main-2022/nav-index"} /-->
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

?>
<!-- wp:wporg/local-navigation-bar {"style":{"position":{"type":"sticky"}},"fontSize":"small"} -->
<!-- wp:site-title {"level":0,"fontSize":"small"} /-->
<!-- wp:site-title {"level":0,"fontSize":"small","textColor":"white","style":{"elements":{"link":{"color":{"text":"var:preset|color|white"},":hover":{"color":{"text":"var:preset|color|white"}}}}}} /-->

<!-- wp:navigation {"menuSlug":"download","icon":"menu","layout":{"type":"flex","orientation":"horizontal"},"fontSize":"small"} /-->
<!-- wp:navigation {"menuSlug":"download","icon":"menu","layout":{"type":"flex","orientation":"horizontal"},"fontSize":"small"} /-->
<!-- /wp:wporg/local-navigation-bar -->
12 changes: 10 additions & 2 deletions source/wp-content/themes/wporg-main-2022/patterns/_nav-index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
*/

?>
<!-- wp:wporg/local-navigation-bar {"backgroundColor":"white","style":{"spacing":{"padding":{"right":"var:preset|spacing|edge-space","left":"var:preset|spacing|edge-space","top":"16px","bottom":"16px"}},"position":{"type":"sticky"},"border":{"top":{"color":"var:preset|color|light-grey-1","style":"solid","width":"1px"},"right":{},"bottom":{"color":"var:preset|color|light-grey-1","style":"solid","width":"1px"},"left":{}}},"textColor":"charcoal-1","fontSize":"small"} -->
<!-- wp:site-title {"level":0,"fontSize":"small"} /-->
<!-- wp:wporg/local-navigation-bar {"className":"has-display-contents","backgroundColor":"charcoal-2","style":{"elements":{"link":{"color":{"text":"var:preset|color|white"},":hover":{"color":{"text":"var:preset|color|white"}}}}},"textColor":"white","fontSize":"small"} -->
<!-- wp:group {"style":{"spacing":{"blockGap":"0"}},"textColor":"light-grey-1","layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group has-light-grey-1-color has-text-color">
<!-- wp:site-title {"level":0,"fontSize":"small","textColor":"white"} /-->

<!-- wp:query-title {"type":"filter","level":0,"fontSize":"small","fontFamily":"inter","className":"wporg-local-navigation-bar__fade-in-scroll"} /-->

<!-- wp:post-title {"level":0,"fontSize":"small","fontFamily":"inter","className":"wporg-local-navigation-bar__fade-in-scroll"} /-->
</div>
<!-- /wp:group -->
<!-- /wp:wporg/local-navigation-bar -->
13 changes: 13 additions & 0 deletions source/wp-content/themes/wporg-main-2022/src/style/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ html[dir="rtl"] :where([style*="border-right-color"]) {
border-left-style: solid;
}

/* Both blocks are in the local header, but only one should be shown at any given time. */
body.blog .wp-block-wporg-local-navigation-bar .wp-block-post-title,
body.archive .wp-block-wporg-local-navigation-bar .wp-block-post-title,
body.search .wp-block-wporg-local-navigation-bar .wp-block-post-title {
display: none;
}

body.blog .wp-block-wporg-local-navigation-bar .wp-block-query-title,
body.single .wp-block-wporg-local-navigation-bar .wp-block-query-title,
body.page .wp-block-wporg-local-navigation-bar .wp-block-query-title {
display: none;
}

.wp-block-navigation.is-vertical {
ul {
width: 100%;
Expand Down

0 comments on commit 04e156d

Please sign in to comment.