Skip to content

Commit 6664087

Browse files
committed
feat: adjust right sidebar layout and styling
- add "on this page" title to toc - adjust toc styling - pin github action links to the bottom
1 parent 98182b1 commit 6664087

File tree

4 files changed

+54
-1
lines changed

4 files changed

+54
-1
lines changed

assets/scss/main.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ footer {
5454
}
5555
}
5656

57+
.td-toc a {
58+
font-size: 0.9rem;
59+
font-weight: normal;
60+
line-height: 1.35;
61+
padding-bottom: 0.5rem;
62+
}
63+
64+
.td-search {
65+
width: 100%;
66+
}
67+
5768
// Adjust anchors vs the fixed menu.
5869
@include media-breakpoint-up(md) {
5970
.td-offset-anchor:target {

layouts/docs/baseof.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!doctype html>
2+
<html itemscope itemtype="http://schema.org/WebPage" lang="{{ .Site.Language.Lang }}" class="no-js">
3+
<head>
4+
{{ partial "head.html" . }}
5+
</head>
6+
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
7+
<header>
8+
{{ partial "navbar.html" . }}
9+
</header>
10+
<div class="container-fluid td-outer">
11+
<div class="td-main">
12+
<div class="row flex-xl-nowrap min-vh-100">
13+
<aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
14+
{{ partial "sidebar.html" . }}
15+
</aside>
16+
<aside class="d-flex flex-column col-xl-2 td-sidebar-toc d-print-none">
17+
{{ partial "toc.html" . }}
18+
{{ partial "taxonomy_terms_clouds.html" . }}
19+
{{ partial "page-meta-links.html" . }}
20+
</aside>
21+
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
22+
{{ partial "version-banner.html" . }}
23+
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
24+
{{ block "main" . }}{{ end }}
25+
</main>
26+
</div>
27+
</div>
28+
{{ partial "footer.html" . }}
29+
</div>
30+
{{ partial "scripts.html" . }}
31+
</body>
32+
</html>

layouts/partials/page-meta-links.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{{ $issueURL := (printf "%s/issues/new?%s" $gh_repo $queryString) }}
1414
{{ $github_discuss_category := ($.Param "github_discuss_category" | default "general") }}
1515

16-
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
16+
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0 mt-auto">
1717
{{ if $gh_repo }}
1818
{{ $discussionURL := (printf "%s/discussions/categories/%s" $gh_repo $github_discuss_category) }}
1919
{{ $newDiscussionURL := (printf "%s/discussions/new?category=%s" $gh_repo $github_discuss_category) }}

layouts/partials/toc.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{ if not .Params.notoc -}}
2+
{{ with .TableOfContents -}}
3+
{{ if ne . `<nav id="TableOfContents"></nav>` -}}
4+
<p class="pb-2 border-bottom border-primary text-primary"><b>On this page</b></p>
5+
<div class="flex-grow-1 td-toc">
6+
{{ . }}
7+
</div>
8+
{{ end -}}
9+
{{ end -}}
10+
{{ end -}}

0 commit comments

Comments
 (0)