mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
fix: 文章頁分頁不顯示的 bug
improvement: 優化部分插件導致文章頁分頁樣式錯亂的 bug
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "5.3.1",
|
"version": "5.3.2",
|
||||||
"description": "A Simple and Card UI Design theme for Hexo",
|
"description": "A Simple and Card UI Design theme for Hexo",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ hexo.extend.generator.register('post', locals => {
|
|||||||
previousIndexes.shift()
|
previousIndexes.shift()
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(defaultCover[index])
|
|
||||||
return defaultCover[index]
|
return defaultCover[index]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,9 +63,20 @@ hexo.extend.generator.register('post', locals => {
|
|||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
return locals.posts.sort('date').map(post => ({
|
// https://github.com/hexojs/hexo/blob/master/lib%2Fplugins%2Fgenerator%2Fpost.ts
|
||||||
data: handleImg(post),
|
const posts = locals.posts.sort('date').toArray()
|
||||||
layout: 'post',
|
const { length } = posts
|
||||||
path: post.path
|
|
||||||
}))
|
return posts.map((post, i) => {
|
||||||
|
if (i) post.prev = posts[i - 1]
|
||||||
|
if (i < length - 1) post.next = posts[i + 1]
|
||||||
|
|
||||||
|
post.__post = true
|
||||||
|
|
||||||
|
return {
|
||||||
|
data: handleImg(post),
|
||||||
|
layout: 'post',
|
||||||
|
path: post.path
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -12,11 +12,10 @@
|
|||||||
width: 100% !important
|
width: 100% !important
|
||||||
|
|
||||||
.pagination-related
|
.pagination-related
|
||||||
width: 50%
|
|
||||||
height: 150px
|
height: 150px
|
||||||
|
|
||||||
+maxWidth768()
|
+minWidth768()
|
||||||
width: 100%
|
flex: 1
|
||||||
|
|
||||||
.info-1
|
.info-1
|
||||||
.info-item-2
|
.info-item-2
|
||||||
@@ -31,6 +30,10 @@
|
|||||||
margin-top: 40px
|
margin-top: 40px
|
||||||
width: 100%
|
width: 100%
|
||||||
addBorderRadius()
|
addBorderRadius()
|
||||||
|
display: flex
|
||||||
|
|
||||||
|
+maxWidth768()
|
||||||
|
flex-direction: column
|
||||||
|
|
||||||
.layout
|
.layout
|
||||||
.pagination
|
.pagination
|
||||||
|
|||||||
Reference in New Issue
Block a user