Skip to content

Commit

Permalink
[opt] toc
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoxuu committed Feb 9, 2024
1 parent 25ebde1 commit 97d3bb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const util = {
const hourCount = dateDiff / hour
const minuteCount = dateDiff / minute

if (dayCount > 7) {
if (dayCount > 14) {
result = null
} else if (dayCount >= 1) {
result = parseInt(dayCount) + ' ' + stellar.config.date_suffix.day
Expand Down Expand Up @@ -159,10 +159,10 @@ const init = {
});
})
},
leftbar: () => {
sidebar: () => {
stellar.jQuery(() => {
$("#data-toc a.toc-link").click(function (e) {
l_body.classList.remove("leftbar");
sidebar.dismiss();
});
})
},
Expand Down Expand Up @@ -210,7 +210,7 @@ const init = {

// init
init.toc()
init.leftbar()
init.sidebar()
init.relativeDate(document.querySelectorAll('#post-meta time'))
init.registerTabsTag()

Expand Down

0 comments on commit 97d3bb4

Please sign in to comment.