diff options
author | uPagge <upagge@mail.ru> | 2021-01-10 04:29:29 +0300 |
---|---|---|
committer | uPagge <upagge@mail.ru> | 2021-01-10 04:29:29 +0300 |
commit | 5389974f61c7fd234df34c77ce23510772a50b3e (patch) | |
tree | f55e49760515f6daaf337f78e632cdd0e029f4d4 /src | |
parent | 8f1fe24343454b95125825b10dad57b8045fafa3 (diff) |
NEW FEATURES
Diffstat (limited to 'src')
-rw-r--r-- | src/js/theme.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/js/theme.js b/src/js/theme.js index 84b24c5..18fc189 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -381,7 +381,7 @@ class Theme { } initTable() { - this.util.forEach(document.querySelectorAll('.content table'), $table => { + this.util.forEach(document.querySelectorAll('.single table'), $table => { const $wrapper = document.createElement('div'); $wrapper.className = 'table-wrapper'; $table.parentElement.replaceChild($wrapper, $table); @@ -415,7 +415,7 @@ class Theme { $tocContentAuto.appendChild($tocCore); } const $toc = document.getElementById('toc-auto'); - const $page = document.getElementsByClassName('page')[0]; + const $page = document.getElementsByClassName('content-block')[0]; const rect = $page.getBoundingClientRect(); $toc.style.left = `${rect.left + rect.width + 20}px`; $toc.style.maxWidth = `${$page.getBoundingClientRect().left - 20 + 314}px`; @@ -429,7 +429,7 @@ class Theme { const minTocTop = $toc.offsetTop; const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight); this._tocOnScroll = this._tocOnScroll || (() => { - const footerTop = document.getElementById('post-footer').offsetTop; + const footerTop = document.getElementById('toc-final').offsetTop; const maxTocTop = footerTop - $toc.getBoundingClientRect().height; const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight); if (this.newScrollTop < minScrollTop) { |