summaryrefslogtreecommitdiff
path: root/_includes/sidebar
diff options
context:
space:
mode:
Diffstat (limited to '_includes/sidebar')
-rw-r--r--_includes/sidebar/article-menu.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/_includes/sidebar/article-menu.html b/_includes/sidebar/article-menu.html
index ff984b6..96a4968 100644
--- a/_includes/sidebar/article-menu.html
+++ b/_includes/sidebar/article-menu.html
@@ -7,7 +7,7 @@
</style>
<div class="post-menu">
- <div class="post-menu-title">Contents</div>
+ <div class="post-menu-title">TOC</div>
<div class="post-menu-content"></div>
</div>
@@ -49,7 +49,8 @@
var headerHeight = headerTop + headerHeight + 20;
if (headingRect.top <= headerHeight) {
var id = 'h-' + h.getAttribute('id');
- var curActive = menuContent.querySelector('a[href="#' + id + '"]');
+ var a = menuContent.querySelector('a[href="#' + id + '"]');
+ var curActive = a.parentNode;
if (curActive) {
curActive.classList.add('active');
}