From 1952046a8a04f8db41570d5bac202e3155fc53f2 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 17 Mar 2021 17:27:35 +0800 Subject: [PATCH] =?UTF-8?q?improvement:=20=E4=B8=BB=E9=A0=81=E5=88=86?= =?UTF-8?q?=E9=A0=81=E6=9C=83=E5=AE=9A=E4=BD=8D=E5=88=B0=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E5=8D=80=E5=9F=9F=20close=20#519=20fix:=20=E4=BF=AE=E5=BE=A9?= =?UTF-8?q?=E8=A8=AD=E7=BD=AEhighlight=5Fheight=5Flimit=E5=BE=8C=EF=BC=8Ch?= =?UTF-8?q?ighlight=5Fshrink=E9=BB=9E=E6=93=8A=E7=84=A1=E6=95=88=E7=9A=84b?= =?UTF-8?q?ug=20close=20#520?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/includes/pagination.pug | 14 ++++++++------ package.json | 2 +- source/js/main.js | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) 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' })