From 2695ecec925ea90f92a47592fe875e9c93612b71 Mon Sep 17 00:00:00 2001 From: Adam Wood Date: Tue, 10 Sep 2024 07:19:03 +0000 Subject: [PATCH] Make 2024: Add support for Core local nav See https://github.com/WordPress/wordpress.org/issues/363 git-svn-id: https://meta.svn.wordpress.org/sites/trunk@14039 74240141-8908-4e6f-9713-ba540dce6ec7 --- .../pub/wporg-breathe-2024/functions.php | 4 +-- .../themes/pub/wporg-breathe-2024/style.css | 33 ++++++++++++++++--- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/functions.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/functions.php index 579c555a47..521bb5ed47 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/functions.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/functions.php @@ -217,8 +217,8 @@ function( $menu_item ) { 'url' => esc_url( $menu_item->url ) ); }, - // Limit local nav items to 4 - array_slice( $menu_items, 0, 4 ) + // Limit local nav items to 6 + array_slice( $menu_items, 0, 6 ) ) ); } diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/style.css b/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/style.css index d03a58fb69..c1f4cd2475 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/style.css +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/style.css @@ -1950,17 +1950,40 @@ h2.toc-heading + h3.toc-heading:target { margin: 0 !important; } -/** Make Core **/ -#masthead li.icon a:before { +/** Make Core local nav items with icons only **/ +.wp-block-wporg-local-navigation-bar .wp-block-navigation-item a:before { font: 20px/1 'dashicons'; display: inline-block; -webkit-font-smoothing: antialiased; vertical-align: middle; } -#masthead li.newticket a:before { content: "\f119"; } -#masthead li.timeline a:before { content: "\f321"; } -#masthead li.browser a:before { content: "\f475"; } +.wp-block-wporg-local-navigation-bar .wp-block-navigation-item a[href*="browser"] .wp-block-navigation-item__label, +.wp-block-wporg-local-navigation-bar .wp-block-navigation-item a[href*="timeline"] .wp-block-navigation-item__label, +.wp-block-wporg-local-navigation-bar .wp-block-navigation-item a[href*="newticket"] .wp-block-navigation-item__label { + clip: rect(1px, 1px, 1px, 1px); + word-wrap: normal !important; + border: 0; + clip-path: inset(50%); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + +.wp-block-wporg-local-navigation-bar .wp-block-navigation-item a[href*="browser"]:before { + content: "\f475"; +} + +.wp-block-wporg-local-navigation-bar .wp-block-navigation-item a[href*="timeline"]:before { + content: "\f321"; +} + +.wp-block-wporg-local-navigation-bar .wp-block-navigation-item a[href*="newticket"]:before { + content: "\f119"; +} .icon-core-performance { background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg version='1.1' viewBox='0 0 94 94' xmlns='http://www.w3.org/2000/svg' xmlns:cc='http://creativecommons.org/ns%23' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%3E%3Cdefs%3E%3Cstyle%3Epath%7Bfill:%23555;%7D%3C/style%3E%3C/defs%3E%3Cpath d='m39.21 20.85h-11.69c-1.38 0-2.5 1.12-2.5 2.5v11.69c0 1.38 1.12 2.5 2.5 2.5h11.69c1.38 0 2.5-1.12 2.5-2.5v-11.69c0-1.38-1.12-2.5-2.5-2.5z'/%3E%3Cpath d='M41.71,58.96v11.69c0,.66-.26,1.3-.73,1.77-.47,.47-1.11,.73-1.77,.73h-11.69c-.66,0-1.3-.26-1.77-.73-.47-.47-.73-1.11-.73-1.77v-21.37c0-.4,.1-.79,.28-1.14,.03-.06,.07-.12,.1-.18,.21-.33,.49-.61,.83-.82l11.67-7.04c.44-.27,.95-.39,1.47-.36,.51,.03,1,.23,1.4,.55,.26,.21,.47,.46,.63,.75,.16,.29,.26,.61,.29,.94,.02,.11,.02,.22,.02,.34v5.38s0,.07,0,.11v11.08s0,.04,0,.07Z'/%3E%3Cpath d='M68.98,30.23v16.84c0,.33-.06,.65-.19,.96-.13,.3-.31,.58-.54,.81l-6.88,6.88c-.23,.23-.51,.42-.81,.54-.3,.13-.63,.19-.96,.19h-13.15c-.66,0-1.3-.26-1.77-.73-.47-.47-.73-1.11-.73-1.77v-11.69c0-.66,.26-1.3,.73-1.77,.47-.47,1.11-.73,1.77-.73h13.08s1.11,0,1.11-1.11-1.11-1.11-1.11-1.11h-13.08c-.66,0-1.3-.26-1.77-.73s-.73-1.11-.73-1.77v-11.69c0-.66,.26-1.3,.73-1.77,.47-.47,1.11-.73,1.77-.73h13.15c.33,0,.65,.06,.96,.19,.3,.13,.58,.31,.81,.54l6.88,6.88c.23,.23,.42,.51,.54,.81,.13,.3,.19,.63,.19,.96Z'/%3E%3C/svg%3E%0A");