mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 22:17:06 +08:00
Merge branch 'dev'
This commit is contained in:
2
layout/includes/third-party/abcjs/abcjs.pug
vendored
2
layout/includes/third-party/abcjs/abcjs.pug
vendored
@@ -1,5 +1,5 @@
|
|||||||
script.
|
script.
|
||||||
(() = {
|
(() => {
|
||||||
const abcjsInit = () => {
|
const abcjsInit = () => {
|
||||||
const abcjsFn = () => {
|
const abcjsFn = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
script.
|
script.
|
||||||
(() => {
|
(() => {
|
||||||
const getCommentUrl = () => {
|
const getCommentUrl = () => {
|
||||||
const eleGroup = document.querySelectorAll('#recent-posts .article-title')
|
const eleGroup = document.querySelectorAll('#recent-posts .article-title')
|
||||||
let urlArray = []
|
let urlArray = []
|
||||||
@@ -18,7 +18,9 @@ script.
|
|||||||
includeReply: false
|
includeReply: false
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
document.querySelectorAll('#recent-posts .twikoo-count').forEach((item,index) => {
|
document.querySelectorAll('#recent-posts .twikoo-count').forEach((item,index) => {
|
||||||
item.textContent = res[index].count
|
if (res[index]) {
|
||||||
|
item.textContent = res[index].count
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ hr.custom-hr
|
|||||||
.comment-headline
|
.comment-headline
|
||||||
i.fas.fa-comments.fa-fw
|
i.fas.fa-comments.fa-fw
|
||||||
span= ' ' + _p('comment')
|
span= ' ' + _p('comment')
|
||||||
|
|
||||||
if theme.comments.use.length > 1
|
if theme.comments.use.length > 1
|
||||||
.comment-switch
|
.comment-switch
|
||||||
span.first-comment=defaultComment
|
span.first-comment=defaultComment
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ script.
|
|||||||
: window.loadOtherComment = loadLivere
|
: window.loadOtherComment = loadLivere
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('!{use[0]}' === 'Livere' || !!{lazyload}) {
|
if ('!{use[0]}' === 'Livere' || !!{lazyload}) {
|
||||||
if (!{lazyload}) btf.loadComment(document.getElementById('lv-container'), loadLivere)
|
if (!{lazyload}) btf.loadComment(document.getElementById('lv-container'), loadLivere)
|
||||||
else loadLivere()
|
else loadLivere()
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
script.
|
script.
|
||||||
(() => {
|
(() => {
|
||||||
const isShuoshuo = GLOBAL_CONFIG_SITE.pageType === 'shuoshuo'
|
const isShuoshuo = GLOBAL_CONFIG_SITE.pageType === 'shuoshuo'
|
||||||
const option = !{JSON.stringify(option)}
|
const options = !{JSON.stringify(option)}
|
||||||
|
|
||||||
const loadScript = src => {
|
const loadScript = src => {
|
||||||
const script = document.createElement('script')
|
const script = document.createElement('script')
|
||||||
@@ -42,8 +42,8 @@ script.
|
|||||||
host: '!{host}',
|
host: '!{host}',
|
||||||
site_id: '!{siteId}',
|
site_id: '!{siteId}',
|
||||||
theme: document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light',
|
theme: document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light',
|
||||||
...option,
|
...options,
|
||||||
url: isShuoshuo ? window.location.origin + path : (option && option.url) || window.location.origin + window.location.pathname
|
url: isShuoshuo ? window.location.origin + path : (options && options.url) || window.location.origin + window.location.pathname
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.REMARK42) {
|
if (window.REMARK42) {
|
||||||
@@ -68,7 +68,7 @@ script.
|
|||||||
: window.loadOtherComment = loadRemark42
|
: window.loadOtherComment = loadRemark42
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('!{theme.comments.use[0]}' === 'Remark42' || !!{theme.comments.lazyload}) {
|
if ('!{theme.comments.use[0]}' === 'Remark42' || !!{theme.comments.lazyload}) {
|
||||||
if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('remark42'), loadRemark42)
|
if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('remark42'), loadRemark42)
|
||||||
else loadRemark42()
|
else loadRemark42()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "5.4.1",
|
"version": "5.4.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": {
|
||||||
|
|||||||
Reference in New Issue
Block a user