Skip to content

Commit efb612c

Browse files
committed
bring back numbers to TOC
1 parent 7b711c6 commit efb612c

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

_includes/bottom.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
$(document).ready(function() {
2727
$('.toc').toc({
2828
title: '',
29-
listType: 'ul',
29+
listType: 'ol',
3030
minimumHeaders: 2,
3131
headers: 'h2, h3, h4, h5, h6',
3232
linkHere: true,

css/style.css

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,10 +814,20 @@ body.learning h4.resource {
814814
}
815815

816816
/* Jekyll Table of Contents */
817+
ol.jekyll-toc,
818+
ol.jekyll-toc ol {
819+
counter-reset: item;
820+
}
817821
ol.jekyll-toc {
818-
margin: 0.3125em 0 0 3.125em;
822+
margin: 0.3125em 0 0 2.3076923076923075em;
823+
}
824+
ol.jekyll-toc ol {
825+
margin: 0.625em 0 0 0;
826+
margin-bottom: -0.8em;
827+
}
828+
ol.jekyll-toc li {
829+
display: block;
819830
}
820-
ol.jekyll-toc li { display: block }
821831
ol.jekyll-toc li:before {
822832
content: counters(item, ".") " ";
823833
counter-increment: item;
@@ -829,6 +839,10 @@ ol.jekyll-toc li {
829839
line-height: 1.3em;
830840
padding-bottom: 0.8em;
831841
}
842+
ol.jekyll-toc li a {
843+
position:relative;
844+
left: 0.3076923076923077em;
845+
}
832846

833847
/* heading */
834848
.jekyll-toc-header {

0 commit comments

Comments
 (0)