mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 17:40:55 +08:00
feat: 修改newest_comments的leancloud為valine,並刪除其配置,改為讀取valine配置
feat: 增加waline最新評論模塊 feat: 增加waline評論數顯示 feat: 增加waline評論 fix: 修復jquery在一些界面仍然加載問題
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#vcomment
|
||||
#vcomment,
|
||||
#waline
|
||||
font-size: 1.1em
|
||||
|
||||
.vbtn
|
||||
@@ -9,12 +10,9 @@
|
||||
&:hover
|
||||
background: var(--btn-hover-color)
|
||||
|
||||
if hexo-config('valine.bg')
|
||||
textarea
|
||||
background: url(hexo-config('valine.bg')) 100% 100% no-repeat
|
||||
|
||||
&:focus
|
||||
background-image: none
|
||||
textarea
|
||||
&:focus
|
||||
background-image: none
|
||||
|
||||
.vimg
|
||||
transition: all .3s
|
||||
@@ -27,6 +25,16 @@
|
||||
&:after
|
||||
z-index: 22
|
||||
|
||||
if hexo-config('valine.bg')
|
||||
#vcomment
|
||||
textarea
|
||||
background: url(hexo-config('valine.bg')) 100% 100% no-repeat
|
||||
|
||||
if hexo-config('waline.bg')
|
||||
#waline
|
||||
textarea
|
||||
background: url(hexo-config('waline.bg')) 100% 100% no-repeat
|
||||
|
||||
.fireworks
|
||||
position: fixed
|
||||
top: 0
|
||||
|
||||
@@ -288,15 +288,17 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
}
|
||||
|
||||
const jqLoadAndRun = () => {
|
||||
const isFancybox = GLOBAL_CONFIG.lightbox === 'fancybox'
|
||||
const $fancyboxEle = isFancybox ? document.querySelectorAll('#article-container :not(a):not(.gallery-group) > img, #article-container > img') : null
|
||||
const $fancyboxEle = GLOBAL_CONFIG.lightbox === 'fancybox'
|
||||
? document.querySelectorAll('#article-container :not(a):not(.gallery-group) > img, #article-container > img')
|
||||
: []
|
||||
const fbLengthNoZero = $fancyboxEle.length > 0
|
||||
const $jgEle = document.querySelectorAll('#article-container .justified-gallery')
|
||||
const jgEleLength = $jgEle.length
|
||||
const jgLengthNoZero = $jgEle.length > 0
|
||||
|
||||
if (jgEleLength || $fancyboxEle !== null) {
|
||||
if (jgLengthNoZero || fbLengthNoZero) {
|
||||
btf.isJqueryLoad(() => {
|
||||
jgEleLength && runJustifiedGallery($jgEle)
|
||||
isFancybox && addFancybox($fancyboxEle)
|
||||
jgLengthNoZero && runJustifiedGallery($jgEle)
|
||||
fbLengthNoZero && addFancybox($fancyboxEle)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user