mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 19:40:55 +08:00
4.11
This commit is contained in:
@@ -40,7 +40,7 @@ if (theme.pwa && theme.pwa.enable)
|
||||
|
||||
//- main css
|
||||
link(rel='stylesheet', href=url_for(theme.asset.main_css))
|
||||
link(rel='stylesheet', href=url_for(theme.asset.fontawesome) media="print" onload="this.media='all'")
|
||||
link(rel='stylesheet', href=url_for(theme.asset.fontawesome))
|
||||
|
||||
if (theme.snackbar && theme.snackbar.enable)
|
||||
link(rel='stylesheet', href=url_for(theme.asset.snackbar_css) media="print" onload="this.media='all'")
|
||||
|
||||
@@ -78,9 +78,11 @@
|
||||
}
|
||||
|
||||
let highlight = 'undefined';
|
||||
if ((config.highlight && config.highlight.enable) || (config.prismjs && config.prismjs.enable)) {
|
||||
let syntaxHighlighter = config.syntax_highlighter;
|
||||
let highlightEnable = syntaxHighlighter ? ['highlight.js', 'prismjs'].includes(syntaxHighlighter) : (config.highlight.enable || config.prismjs.enable);
|
||||
if (highlightEnable) {
|
||||
highlight = JSON.stringify({
|
||||
plugin: config.highlight.enable ? 'highlighjs' : 'prismjs',
|
||||
plugin: syntaxHighlighter ? syntaxHighlighter : config.highlight.enable ? 'highlight.js' : 'prismjs',
|
||||
highlightCopy: theme.highlight_copy,
|
||||
highlightLang: theme.highlight_lang,
|
||||
highlightHeightLimit: theme.highlight_height_limit
|
||||
|
||||
@@ -40,7 +40,7 @@ script.
|
||||
}
|
||||
|
||||
let $dom = document.querySelector('#card-newest-comments .aside-list')
|
||||
$dom.innerHTML= result
|
||||
$dom && ($dom && ($dom.innerHTML= result))
|
||||
window.lazyLoadInstance && window.lazyLoadInstance.update()
|
||||
window.pjax && window.pjax.refresh($dom)
|
||||
}
|
||||
@@ -90,7 +90,7 @@ script.
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
const $dom = document.querySelector('#card-newest-comments .aside-list')
|
||||
$dom.innerHTML= "!{_p('aside.card_newest_comments.error')}"
|
||||
$dom.textContent= "!{_p('aside.card_newest_comments.error')}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ script.
|
||||
}
|
||||
|
||||
let $dom = document.querySelector('#card-newest-comments .aside-list')
|
||||
$dom.innerHTML= result
|
||||
$dom && ($dom.innerHTML= result)
|
||||
window.lazyLoadInstance && window.lazyLoadInstance.update()
|
||||
window.pjax && window.pjax.refresh($dom)
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ script.
|
||||
}
|
||||
|
||||
let $dom = document.querySelector('#card-newest-comments .aside-list')
|
||||
$dom.innerHTML= result
|
||||
$dom && ($dom.innerHTML= result)
|
||||
window.lazyLoadInstance && window.lazyLoadInstance.update()
|
||||
window.pjax && window.pjax.refresh($dom)
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ script.
|
||||
}
|
||||
|
||||
let $dom = document.querySelector('#card-newest-comments .aside-list')
|
||||
$dom.innerHTML= result
|
||||
$dom && ($dom.innerHTML= result)
|
||||
window.lazyLoadInstance && window.lazyLoadInstance.update()
|
||||
window.pjax && window.pjax.refresh($dom)
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ script.
|
||||
}
|
||||
|
||||
let $dom = document.querySelector('#card-newest-comments .aside-list')
|
||||
$dom.innerHTML= result
|
||||
$dom && ($dom.innerHTML= result)
|
||||
window.lazyLoadInstance && window.lazyLoadInstance.update()
|
||||
window.pjax && window.pjax.refresh($dom)
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ script.
|
||||
}
|
||||
|
||||
let $dom = document.querySelector('#card-newest-comments .aside-list')
|
||||
$dom.innerHTML= result
|
||||
$dom && ($dom.innerHTML= result)
|
||||
window.lazyLoadInstance && window.lazyLoadInstance.update()
|
||||
window.pjax && window.pjax.refresh($dom)
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ script.
|
||||
}
|
||||
|
||||
let $dom = document.querySelector('#card-newest-comments .aside-list')
|
||||
$dom.innerHTML= result
|
||||
$dom && ($dom.innerHTML= result)
|
||||
window.lazyLoadInstance && window.lazyLoadInstance.update()
|
||||
window.pjax && window.pjax.refresh($dom)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user