diff --git a/layout/includes/pagination.pug b/layout/includes/pagination.pug index 86f0faf..8bb76a9 100644 --- a/layout/includes/pagination.pug +++ b/layout/includes/pagination.pug @@ -6,11 +6,7 @@ escape: false } -if(!is_post()) - nav#pagination - div.pagination - !=paginator(options) -else +if is_post() - let prev = theme.post_pagination === 1 ? page.prev : page.next - let next = theme.post_pagination === 1 ? page.next : page.prev nav#pagination.pagination-post @@ -38,4 +34,10 @@ else img.next-cover(src=url_for(pagination_cover) onerror=`onerror=null;src='${url_for(theme.error_img.post_page)}'` alt='cover of next post') .pagination-info .label=_p('pagination.next') - .next_info=next.title \ No newline at end of file + .next_info=next.title +else + nav#pagination + .pagination + if is_home() + - options.format = 'page/%d/#content-inner' + !=paginator(options) \ No newline at end of file diff --git a/package.json b/package.json index 0dc250b..18e69ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-butterfly", - "version": "3.7.0-b8", + "version": "3.7.0-b9", "description": "A Simple and Card UI Design theme for Hexo", "main": "package.json", "scripts": { diff --git a/source/js/main.js b/source/js/main.js index 197dddb..9658c73 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -146,7 +146,7 @@ document.addEventListener('DOMContentLoaded', function () { const highlightShrinkFn = (ele) => { const $nextEle = [...ele.parentNode.children].slice(1) ele.firstChild.classList.toggle('closed') - if (btf.isHidden($nextEle[0])) { + if (btf.isHidden($nextEle[$nextEle.length - 1])) { $nextEle.forEach(e => { e.style.display = 'block' }) } else { $nextEle.forEach(e => { e.style.display = 'none' })