8000 docs: improve ToC · coreui/coreui@b3f5c73 · GitHub
[go: up one dir, main page]

Skip to content

Commit b3f5c73

Browse files
committed
docs: improve ToC
1 parent c62f5eb commit b3f5c73

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

docs/layouts/_default/docs.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,17 @@ <h2>Other frameworks</h2>
3333
</div>
3434

3535
{{ if (eq .Page.Params.toc true) }}
36-
<div class="docs-toc mt-4 mb-5 my-md-0 ps-xl-5 mb-lg-5 text-muted">
37-
<strong class="d-block h6 mb-2 pb-2 border-bottom">On this page</strong>
38-
{{ .TableOfContents }}
36+
<div class="docs-toc mt-4 mb-5 my-md-0 ps-xl-5 mb-lg-5 text-body-secondary">
37+
<button class="btn btn-link p-md-0 mb-2 mb-md-0 text-decoration-none docs-toc-toggle d-md-none" type="button" data-coreui-toggle="collapse" data-coreui-target="#tocContents" aria-expanded="false" aria-controls="tocContents">
38+
On this page
39+
<svg xmlns="http://www.w3.org/2000/svg" class="icon d-md-none ms-2" aria-hidden="true" viewBox="0 0 512 512">
40+
<polygon fill="var(--ci-primary-color, currentColor)" points="256 382.627 60.687 187.313 83.313 164.687 256 337.372 428.687 164.687 451.313 187.313 256 382.627" class="ci-primary"/>
41+
</svg>
42+
</button>
43+
<strong class="d-none d-md-block h6 mb-2 pb-2 border-bottom">On this page</strong>
44+
<div class="collapse docs-toc-collapse" id="tocContents">
45+
{{ .TableOfContents }}
46+
</div>
3947
</div>
4048
{{ end }}
4149

0 commit comments

Comments
 (0)
0