Skip to content

Commit a8410be

Browse files
committed
Differentiate the table of contents a bit more
1 parent 9f2a5ae commit a8410be

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

assets/sass/dark-mode.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
$main-border: #e2e0d8;
2323
$bg-color: #f0efe7 url($baseurl + "images/bg/body.jpg");
2424
$sidebar-bg-color: #efefe7;
25+
$sidebar-toc-bg-color: lighten($sidebar-bg-color, 4%);
2526
$no-changes-bg-color: #f5f5f3;
2627
$dropdown-active-bg-color: #fff;
2728
$versions-footer-bg-color: #eae9e0;
@@ -55,6 +56,7 @@
5556
$main-border: #5e5e5a;
5657
$bg-color: #2a2a2aff;
5758
$sidebar-bg-color: #3d3d3a;
59+
$sidebar-toc-bg-color: #{$main-bg};
5860
$no-changes-bg-color: #515150;
5961
$dropdown-active-bg-color: #515150;
6062
$versions-footer-bg-color: #1f1f1e;
@@ -185,6 +187,7 @@
185187
--main-bg: #{$main-bg};
186188
--main-border: #{$main-border};
187189
--sidebar-bg-color: #{$sidebar-bg-color};
190+
--sidebar-toc-bg-color: #{$sidebar-toc-bg-color};
188191
--bg-color: #{$bg-color};
189192
--no-changes-bg-color: #{$no-changes-bg-color};
190193
--dropdown-active-bg-color: #{$dropdown-active-bg-color};

assets/sass/layout.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ aside {
3737
padding-top: 46px;
3838
}
3939

40+
#toc {
41+
border: 1px solid var(--main-border);
42+
padding: .5em;
43+
margin-top: 1rem;
44+
border-top: 1px solid var(--main-border);
45+
background: var(--sidebar-toc-bg-color);
46+
}
47+
48+
#toc li {
49+
/* use margin instead of line height for spacing because sometimes the
50+
headings wrap onto multiple lines */
51+
line-height: 1.2em;
52+
margin: 6px 0;
53+
}
54+
4055
#content {
4156
width: 702px;
4257
}

layouts/partials/sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
{{ $headings := .Params.headings }}
5454
{{ if $headings }}
55-
<ul>
55+
<ul id="toc">
5656
<li> Table of Contents
5757
<ul class="expanded">
5858
{{ range $i, $item := $headings }}

0 commit comments

Comments
 (0)