mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-17 04:40:53 +08:00
Compare commits
100 Commits
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
@@ -8,11 +8,12 @@
|
||||
else
|
||||
!= `©${currentYear} By ${config.author}`
|
||||
if theme.footer.copyright
|
||||
- const v = getVersion()
|
||||
.framework-info
|
||||
span= _p('footer.framework') + ' '
|
||||
a(href='https://hexo.io')= 'Hexo'
|
||||
a(href='https://hexo.io')= `Hexo ${v.hexo}`
|
||||
span.footer-separator |
|
||||
span= _p('footer.theme') + ' '
|
||||
a(href='https://github.com/jerryc127/hexo-theme-butterfly')= 'Butterfly'
|
||||
a(href='https://github.com/jerryc127/hexo-theme-butterfly')= `Butterfly ${v.theme}`
|
||||
if theme.footer.custom_text
|
||||
.footer_custom_text!= theme.footer.custom_text
|
||||
10
layout/includes/third-party/pjax.pug
vendored
10
layout/includes/third-party/pjax.pug
vendored
@@ -7,10 +7,12 @@ if theme.pjax.exclude
|
||||
|
||||
- let choose = theme.comments.use
|
||||
if choose
|
||||
if theme.Open_Graph_meta.enable && (choose.includes('Livere') || choose.includes('Utterances') || choose.includes('Giscus'))
|
||||
- pjaxSelectors.unshift('meta[property="og:image"]', 'meta[property="og:title"]', 'meta[property="og:url"]')
|
||||
if choose.includes('Utterances') || choose.includes('Giscus')
|
||||
if choose.includes('Livere') || choose.includes('Utterances') || choose.includes('Giscus')
|
||||
- pjaxSelectors.unshift('link[rel="canonical"]')
|
||||
if theme.Open_Graph_meta.enable
|
||||
- pjaxSelectors.unshift('meta[property="og:image"]', 'meta[property="og:title"]', 'meta[property="og:url"]', 'meta[property="og:description"]')
|
||||
else
|
||||
- pjaxSelectors.unshift('meta[name="description"]')
|
||||
|
||||
script(src=url_for(theme.asset.pjax))
|
||||
script.
|
||||
@@ -57,7 +59,7 @@ script.
|
||||
|
||||
document.addEventListener('pjax:error', e => {
|
||||
if (e.request.status === 404) {
|
||||
pjax.loadUrl('!{url_for("/404.html")}')
|
||||
window.location.href = e.request.responseURL
|
||||
}
|
||||
})
|
||||
})()
|
||||
@@ -1,6 +1,6 @@
|
||||
.addtoany
|
||||
.a2a_kit.a2a_kit_size_32.a2a_default_style
|
||||
- let addtoanyItem = theme.addtoany.item.split(',')
|
||||
- let addtoanyItem = theme.share.addtoany.item.split(',')
|
||||
each name in addtoanyItem
|
||||
a(class="a2a_button_" + name)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hexo-theme-butterfly",
|
||||
"version": "5.3.1",
|
||||
"version": "5.3.3",
|
||||
"description": "A Simple and Card UI Design theme for Hexo",
|
||||
"main": "package.json",
|
||||
"scripts": {
|
||||
|
||||
16
plugins.yml
16
plugins.yml
@@ -9,7 +9,7 @@ activate_power_mode:
|
||||
algolia_search:
|
||||
name: algoliasearch
|
||||
file: dist/lite/builds/browser.umd.js
|
||||
version: 5.19.0
|
||||
version: 5.20.2
|
||||
aplayer_css:
|
||||
name: aplayer
|
||||
file: dist/APlayer.min.css
|
||||
@@ -66,12 +66,12 @@ docsearch_css:
|
||||
name: '@docsearch/css'
|
||||
other_name: docsearch-css
|
||||
file: dist/style.css
|
||||
version: 3.8.2
|
||||
version: 3.8.3
|
||||
docsearch_js:
|
||||
name: '@docsearch/js'
|
||||
other_name: docsearch-js
|
||||
file: dist/umd/index.js
|
||||
version: 3.8.2
|
||||
version: 3.8.3
|
||||
egjs_infinitegrid:
|
||||
name: '@egjs/infinitegrid'
|
||||
other_name: egjs-infinitegrid
|
||||
@@ -111,17 +111,17 @@ instantpage:
|
||||
instantsearch:
|
||||
name: instantsearch.js
|
||||
file: dist/instantsearch.production.min.js
|
||||
version: 4.75.7
|
||||
version: 4.77.3
|
||||
katex:
|
||||
name: katex
|
||||
file: dist/katex.min.css
|
||||
other_name: KaTeX
|
||||
version: 0.16.19
|
||||
version: 0.16.21
|
||||
katex_copytex:
|
||||
name: katex
|
||||
file: dist/contrib/copy-tex.min.js
|
||||
other_name: KaTeX
|
||||
version: 0.16.19
|
||||
version: 0.16.21
|
||||
lazyload:
|
||||
name: vanilla-lazyload
|
||||
file: dist/lazyload.iife.min.js
|
||||
@@ -203,9 +203,9 @@ waline_css:
|
||||
name: '@waline/client'
|
||||
file: dist/waline.css
|
||||
other_name: waline
|
||||
version: 3.4.3
|
||||
version: 3.5.2
|
||||
waline_js:
|
||||
name: '@waline/client'
|
||||
file: dist/waline.js
|
||||
other_name: waline
|
||||
version: 3.4.3
|
||||
version: 3.5.2
|
||||
|
||||
@@ -29,7 +29,6 @@ hexo.extend.generator.register('post', locals => {
|
||||
previousIndexes.shift()
|
||||
}
|
||||
|
||||
console.log(defaultCover[index])
|
||||
return defaultCover[index]
|
||||
}
|
||||
|
||||
@@ -64,9 +63,20 @@ hexo.extend.generator.register('post', locals => {
|
||||
return data
|
||||
}
|
||||
|
||||
return locals.posts.sort('date').map(post => ({
|
||||
data: handleImg(post),
|
||||
layout: 'post',
|
||||
path: post.path
|
||||
}))
|
||||
// https://github.com/hexojs/hexo/blob/master/lib%2Fplugins%2Fgenerator%2Fpost.ts
|
||||
const posts = locals.posts.sort('date').toArray()
|
||||
const { length } = posts
|
||||
|
||||
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
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -145,3 +145,8 @@ hexo.extend.helper.register('getPageType', (page, isHome) => {
|
||||
if (isHome) return 'home'
|
||||
return 'post'
|
||||
})
|
||||
|
||||
hexo.extend.helper.register('getVersion', () => {
|
||||
const { version } = require('../../package.json')
|
||||
return { hexo: hexo.version, theme: version }
|
||||
})
|
||||
|
||||
@@ -12,11 +12,10 @@
|
||||
width: 100% !important
|
||||
|
||||
.pagination-related
|
||||
width: 50%
|
||||
height: 150px
|
||||
|
||||
+maxWidth768()
|
||||
width: 100%
|
||||
+minWidth768()
|
||||
flex: 1
|
||||
|
||||
.info-1
|
||||
.info-item-2
|
||||
@@ -31,6 +30,10 @@
|
||||
margin-top: 40px
|
||||
width: 100%
|
||||
addBorderRadius()
|
||||
display: flex
|
||||
|
||||
+maxWidth768()
|
||||
flex-direction: column
|
||||
|
||||
.layout
|
||||
.pagination
|
||||
|
||||
Reference in New Issue
Block a user