[opt] toc

This commit is contained in:
xaoxuu 2024-02-09 21:15:07 +08:00
parent 25ebde1d7c
commit 97d3bb4efb
1 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ const util = {
const hourCount = dateDiff / hour const hourCount = dateDiff / hour
const minuteCount = dateDiff / minute const minuteCount = dateDiff / minute
if (dayCount > 7) { if (dayCount > 14) {
result = null result = null
} else if (dayCount >= 1) { } else if (dayCount >= 1) {
result = parseInt(dayCount) + ' ' + stellar.config.date_suffix.day result = parseInt(dayCount) + ' ' + stellar.config.date_suffix.day
@ -159,10 +159,10 @@ const init = {
}); });
}) })
}, },
leftbar: () => { sidebar: () => {
stellar.jQuery(() => { stellar.jQuery(() => {
$("#data-toc a.toc-link").click(function (e) { $("#data-toc a.toc-link").click(function (e) {
l_body.classList.remove("leftbar"); sidebar.dismiss();
}); });
}) })
}, },
@ -210,7 +210,7 @@ const init = {
// init // init
init.toc() init.toc()
init.leftbar() init.sidebar()
init.relativeDate(document.querySelectorAll('#post-meta time')) init.relativeDate(document.querySelectorAll('#post-meta time'))
init.registerTabsTag() init.registerTabsTag()