diff --git a/src/_sass/railsdoc.scss b/src/_sass/railsdoc.scss index 3a086a6fba..8da38e1024 100644 --- a/src/_sass/railsdoc.scss +++ b/src/_sass/railsdoc.scss @@ -102,6 +102,11 @@ code { } } + .active-link { + font-weight: bold; + text-decoration: underline; + } + .icon { cursor: pointer; background: url("/assets/image/arrow-right.svg"); diff --git a/src/assets/js/app.js b/src/assets/js/app.js index 1933118418..d93530c8ab 100644 --- a/src/assets/js/app.js +++ b/src/assets/js/app.js @@ -8,4 +8,8 @@ $(() => { anchors.options.visible = 'always'; anchors.add(); + + $(`.sidebar-content a[href='${window.location.pathname}']`) + .attr("class", "active-link") + .parents('ul').show(); });