From 9c8be420ff1b431c12653a2303c782accc525ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 9 Jul 2024 12:32:14 +0200 Subject: [PATCH 1/4] Mark higher-level nodes with "New pill", not only the actual item --- docs/css/navigation.css | 2 +- docs/js/custom.js | 3 +++ theme/partials/nav-item.html | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/css/navigation.css b/docs/css/navigation.css index 4bac94e3dc..ba02148a78 100644 --- a/docs/css/navigation.css +++ b/docs/css/navigation.css @@ -133,7 +133,7 @@ padding-bottom: 0.5rem; } -.md-nav__link .pill.new { +.md-nav__item .pill.new { margin-right: 15px; background-color: #d9e8ff; color: #3562a0; diff --git a/docs/js/custom.js b/docs/js/custom.js index 3ed067e054..83eca49cbf 100644 --- a/docs/js/custom.js +++ b/docs/js/custom.js @@ -202,4 +202,7 @@ $(document).ready(function() { closeBtn.closest('.notification').setAttribute('hidden', 'hidden'); }); }); + + // Mark higher-level nodes with "New pill", not only the actual item + $( ".pill.new:not([hidden])" ).parents(".md-nav__item").uniqueSort().children('label').children('span.pill.new').removeAttr('hidden') }); diff --git a/theme/partials/nav-item.html b/theme/partials/nav-item.html index 43dffa584a..c6c67deec5 100644 --- a/theme/partials/nav-item.html +++ b/theme/partials/nav-item.html @@ -7,7 +7,7 @@ {% set checked = "checked" if nav_item.active %}