improvement: 主頁分頁會定位到文章區域 close #519

fix: 修復設置highlight_height_limit後,highlight_shrink點擊無效的bug close #520
This commit is contained in:
Jerry 2021-03-17 17:27:35 +08:00
parent ae09fb89b5
commit 1952046a8a
3 changed files with 10 additions and 8 deletions

View File

@ -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
.next_info=next.title
else
nav#pagination
.pagination
if is_home()
- options.format = 'page/%d/#content-inner'
!=paginator(options)

View File

@ -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": {

View File

@ -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' })