Skip to content

Commit 607ae1d

Browse files
author
Joseph Lowinske
committed
implement toc in right gutter and in original location when screen width < 1500px
1 parent 5ce8fb9 commit 607ae1d

File tree

7 files changed

+80
-17
lines changed

7 files changed

+80
-17
lines changed

_layouts/default.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
{% endif %}
2020
{{content}}
2121
</div>
22-
<div class="toc-col"></div>
22+
<div class="toc-col">
23+
<div id="toc-right"></div>
24+
</div>
2325
</div>
2426
</div>
2527
{% include footer.html %}

css/components/_callout.scss

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

3434
h4, .bs-callout__label {
3535
color: $cl_green;
36-
}
36+
}
3737
}
3838

3939
&--danger {

css/components/_toc.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
@charset "UTF-8";
22

3+
.toc-col {
4+
display: none;
5+
6+
@include at-query($min, 1500px) {
7+
margin: 30px;
8+
min-width: 360px;
9+
display: inline-block;
10+
}
11+
}
12+
313
#toc {
14+
display: block;
15+
max-width: 500px;
16+
17+
@include at-query($min, 1500px) {
18+
display: none;
19+
}
20+
}
21+
22+
#toc,
23+
#toc-right {
24+
425
> ul {
526
background-color: $cl_green_light;
627
padding: 20px 30px;

css/customstyles.css

Lines changed: 41 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/customstyles.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/layouts/_content.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
padding-top: 62px;
55
width: 100%;
66
z-index: 1000;
7-
// @include groovy(all);
87
@include box-shadow(5px, 0, 4px, 0, rgba(0, 0, 0, 0.1));
98
overflow: auto;
109

1110
#main-content {
1211
margin: 0 15px;
1312

1413
@include at-query($min, $screen-md) {
15-
margin: 0 30px 0 0;
14+
margin: 0;
1615
min-height: 625px;
1716
}
1817

@@ -23,12 +22,17 @@
2322
@include at-query($min, $screen-md) {
2423
min-height: 625px;
2524
padding-left: 365px;
25+
padding-right: 30px;
2626

2727
&-border {
2828
border-left: 1px solid $cl_gray_medium;
2929
}
3030
}
3131

32+
@include at-query($min, 1500px) {
33+
padding-right: 0;
34+
}
35+
3236
&--landing {
3337
padding-top: 30px;
3438
}

js/customscripts.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ function renderTOC() {
1111
showSpeed: 0,
1212
headers: pageConfig.tocNotNested ? 'h2:visible' : 'h2:visible,h3:visible'
1313
});
14+
15+
$('#toc-right').toc({
16+
minimumHeaders: 0,
17+
listType: 'ul',
18+
showSpeed: 0,
19+
headers: pageConfig.tocNotNested ? 'h2:visible' : 'h2:visible,h3:visible'
20+
});
1421
}
1522

1623
var $versionSwitcher, versionSwitcherBottom = Infinity;

0 commit comments

Comments
 (0)