diff --git a/sass/components/_tree-menu.scss b/sass/components/_tree-menu.scss index d65333bf87..89a5737631 100644 --- a/sass/components/_tree-menu.scss +++ b/sass/components/_tree-menu.scss @@ -55,6 +55,10 @@ &, &:focus, &:active, &:hover, &:link, &:visited { color: $color-white; } + + &[data-active=true] { + color: $color-white; + } } &__toggle { diff --git a/static/on-this-page.js b/static/on-this-page.js index c4e3651f1d..0ae029231b 100644 --- a/static/on-this-page.js +++ b/static/on-this-page.js @@ -25,8 +25,9 @@ function otp_set_active(id_or_node){ id = id_or_node; } id = "#" + id; + console.info(id); document.querySelectorAll(".on-this-page a").forEach(a => { - a.setAttribute("data-active", a.getAttribute("href") == id); + a.setAttribute("data-active", a.getAttribute("href").includes(id)); }); } diff --git a/templates/macros/news.html b/templates/macros/news.html index d9dee94957..a727e3cd53 100644 --- a/templates/macros/news.html +++ b/templates/macros/news.html @@ -33,7 +33,7 @@ {% endmacro %} {% macro news_menu(toc, max_levels) %} {% if toc %} -