From ce2015e47b8240da52cf88ca4fedf68a458b6f28 Mon Sep 17 00:00:00 2001 From: GeoSot Date: Mon, 22 Mar 2021 23:50:33 +0200 Subject: [PATCH] use scrollspy on docs pages --- site/assets/scss/_toc.scss | 13 +++++++++++-- site/layouts/_default/docs.html | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/site/assets/scss/_toc.scss b/site/assets/scss/_toc.scss index 512a11b420..27dd95465e 100644 --- a/site/assets/scss/_toc.scss +++ b/site/assets/scss/_toc.scss @@ -1,4 +1,5 @@ // stylelint-disable selector-max-type +// stylelint-disable selector-no-qualifying-type .bd-toc { @include media-breakpoint-up(lg) { @@ -29,10 +30,18 @@ } a { + padding: .1rem .2rem; color: inherit; + text-decoration: none; + @include border-radius(.2rem); - &:not(:hover) { - text-decoration: none; + &:hover, + &.active { + color: $bd-purple; + background-color: $bd-purple-light; + } + &.active { + font-weight: 500; } code { diff --git a/site/layouts/_default/docs.html b/site/layouts/_default/docs.html index 27314c37d0..8ed914ab17 100644 --- a/site/layouts/_default/docs.html +++ b/site/layouts/_default/docs.html @@ -1,3 +1,4 @@ +{{ define "body_override" }}{{ end }} {{ define "main" }}