fixup! split page_footer.html from footer.html

This commit is contained in:
Reorx 2022-05-19 22:41:42 +08:00
parent 24749f16d0
commit 3f1e99e8b4
1 changed files with 5 additions and 2 deletions

View File

@ -57,10 +57,13 @@
// every page loaded by InstantClick should run the <script> tags again. // every page loaded by InstantClick should run the <script> tags again.
(function() { (function() {
const enableTocScroll = '{{- if (and (eq .Kind "page") (.Content) (.Param "ShowToc") (.Param "TocSide")) }}1{{ end }}' == '1' const enableTocScroll = '{{- if (and (eq .Kind "page") (.Content) (.Param "ShowToc") (.Param "TocSide")) }}1{{ end }}' == '1'
// always get an array here if (!enableTocScroll) {
let scrollListeners = window.scrollListeners return
}
// console.log('enable toc scroll') // console.log('enable toc scroll')
// always get an array here
const scrollListeners = window.scrollListeners
const headings = document.querySelectorAll('h1[id],h2[id],h3[id],h4[id],h5[id]'); const headings = document.querySelectorAll('h1[id],h2[id],h3[id],h4[id],h5[id]');
const activeClass = 'active'; const activeClass = 'active';