mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-10-04 14:22:01 +08:00
✨ 評論增加lazyload
✨ 頭像/打賞圖片 增加lazyload ✨ 調整移動端 ol ul 的邊距 #267 🐛 修復Valine 的requiredFields設置為空 無效的bugs
This commit is contained in:
1 parent
d5cf43a6b4
commit
d2943bbbb1
26 files changed
+176
-161
No files matched your search
@@ -43,10 +43,10 @@ div
|
||||
|
||||
//- 鼠標特效
|
||||
if theme.click_heart
|
||||
script(src=url_for(theme.CDN.click_heart))
|
||||
script(src=url_for(theme.CDN.click_heart) async)
|
||||
|
||||
if theme.ClickShowText && theme.ClickShowText.enable
|
||||
script(src=url_for(theme.CDN.ClickShowText))
|
||||
script(src=url_for(theme.CDN.ClickShowText) async)
|
||||
|
||||
if theme.pangu && theme.pangu.enable
|
||||
include ./third-party/pangu.pug
|
||||
@@ -76,11 +76,6 @@ div
|
||||
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
|
||||
script(async src=url_for(theme.CDN.busuanzi))
|
||||
|
||||
if theme.pjax && theme.comments && theme.comments.use
|
||||
!=partial('includes/comments/js-load-all', {}, {cache:theme.fragment_cache})
|
||||
else if commentsJsLoad
|
||||
!=partial('includes/comments/js-load-all', {}, {cache:theme.fragment_cache})
|
||||
|
||||
if theme.aplayerInject && !config.aplayer.asset_inject
|
||||
if theme.pjax
|
||||
include ./head/aplayer.pug
|
||||
|
||||
@@ -13,30 +13,27 @@ script.
|
||||
})
|
||||
}
|
||||
|
||||
if (window.DISQUS) {
|
||||
disqusReset()
|
||||
} else {
|
||||
if (window.DISQUS) disqusReset()
|
||||
else {
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script')
|
||||
s.src = 'https://!{theme.disqus.shortname}.disqus.com/embed.js'
|
||||
s.setAttribute('data-timestamp', +new Date())
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = 'https://!{theme.disqus.shortname}.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
}
|
||||
}
|
||||
|
||||
if ('!{defaultComment}' === 'Disqus' || !{theme.comments.load_begin}) {
|
||||
loadDisqus()
|
||||
}
|
||||
else {
|
||||
if ('!{theme.comments.use[0]}' === 'Disqus' || !!{theme.comments.lazyload}) {
|
||||
if (!{theme.comments.lazyload}) loadComment(document.getElementById('disqus_thread'), loadDisqus)
|
||||
else loadDisqus()
|
||||
} else {
|
||||
function loadOtherComment () {
|
||||
loadDisqus()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if is_post() && theme.comments.count && defaultComment === 'Disqus'
|
||||
if is_post() && !theme.comments.lazyload && theme.comments.count && theme.comments.use[0] === 'Disqus'
|
||||
script.
|
||||
if (window.DISQUSWIDGETS === undefined) {
|
||||
var d = document, s = d.createElement('script');
|
||||
|
||||
@@ -33,8 +33,9 @@ script.
|
||||
}
|
||||
}
|
||||
|
||||
if ('!{defaultComment}' === 'Disqusjs' || !{theme.comments.load_begin}) {
|
||||
loadDisqusjs()
|
||||
if ('!{theme.comments.use[0]}' === 'Disqusjs' || !!{theme.comments.lazyload}) {
|
||||
if (!{theme.comments.lazyload}) loadComment(document.getElementById('disqus_thread'), loadDisqusjs)
|
||||
else loadDisqusjs()
|
||||
}
|
||||
else {
|
||||
function loadOtherComment () {
|
||||
@@ -43,7 +44,7 @@ script.
|
||||
}
|
||||
|
||||
|
||||
if is_post() && theme.comments.count && defaultComment === 'Disqusjs'
|
||||
if is_post() && !theme.comments.lazyload && theme.comments.count && theme.comments.use[0] === 'Disqusjs'
|
||||
script.
|
||||
if (window.DISQUSWIDGETS === undefined) {
|
||||
var d = document, s = d.createElement('script');
|
||||
|
||||
Loaded 3 of 26 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user