diff --git a/site/assets/scss/_toc.scss b/site/assets/scss/_toc.scss index 9e7de3c2b9..cc9a6d6ddf 100644 --- a/site/assets/scss/_toc.scss +++ b/site/assets/scss/_toc.scss @@ -1,17 +1,37 @@ // stylelint-disable selector-max-type, selector-max-compound-selectors -.bd-toc nav { - padding-top: .125em; - padding-bottom: .125em; - border-left: .25em solid $gray-200; +.bd-toc-wrap { + @include media-breakpoint-up(lg) { + @supports (position: sticky) { + position: sticky; + top: 5rem; + right: 0; + z-index: 2; + height: subtract(100vh, 7rem); + overflow-y: auto; + } + } +} - > ul { - margin-bottom: 0; +.bd-toc nav { + @include font-size(.875rem); + + ul { + padding-left: 0; + list-style: none; + + ul { + padding-left: 1rem; + margin-top: .25rem; + } } - li ul li { + li { margin-bottom: .25rem; - list-style-type: disc; + } + + a { + color: inherit; } a:not(:hover) { diff --git a/site/layouts/_default/docs.html b/site/layouts/_default/docs.html index 383ff0f0c1..c3eff6ec82 100644 --- a/site/layouts/_default/docs.html +++ b/site/layouts/_default/docs.html @@ -9,16 +9,18 @@ {{ partial "docs-navbar" . }} {{ partial "docs-subnav" . }} -
+
-
+
{{ partial "docs-sidebar" . }}
-
-

{{ .Title | markdownify }}

-

{{ .Page.Params.Description | markdownify }}

- {{ partial "ads" . }} +
+
+

{{ .Title | markdownify }}

+

{{ .Page.Params.Description | markdownify }}

+ {{ partial "ads" . }} +
{{ if .Page.Params.sections }}
@@ -33,14 +35,22 @@
{{ end }} - {{ if (eq .Page.Params.toc true) }} - On this page - - {{ end }} +
+
+ {{ if (eq .Page.Params.toc true) }} +
+ On this page +
+ {{ .TableOfContents }} +
+
+ {{ end }} +
+
+ {{ .Content }} +
+
- {{ .Content }}