diff --git a/_includes/toc.html b/_includes/toc.html index 883bf135d55..4dccb2a6cf7 100644 --- a/_includes/toc.html +++ b/_includes/toc.html @@ -2,7 +2,7 @@ {% if enable_toc %}
-
+ diff --git a/_javascript/modules/components/toc/toc-desktop.js b/_javascript/modules/components/toc/toc-desktop.js index 5021a72a082..0aaba48fcc7 100644 --- a/_javascript/modules/components/toc/toc-desktop.js +++ b/_javascript/modules/components/toc/toc-desktop.js @@ -15,8 +15,11 @@ export class TocDesktop { } static init() { - if (document.getElementById('toc-wrapper')) { + const $tocWrapper = document.getElementById('toc-wrapper'); + + if ($tocWrapper) { tocbot.init(this.options); + $tocWrapper.classList.remove('invisible'); } } } diff --git a/_sass/pages/_post.scss b/_sass/pages/_post.scss index 19adf3fa66e..caa2fe6ece2 100644 --- a/_sass/pages/_post.scss +++ b/_sass/pages/_post.scss @@ -234,14 +234,11 @@ header { @keyframes fade-up { from { opacity: 0; - position: relative; - top: 2rem; + margin-top: 4rem; } to { opacity: 1; - position: relative; - top: 0; } }