This commit is contained in:
Jerry
2020-07-16 19:30:54 +08:00
parent 5b6e008b84
commit 898cc31c58
93 changed files with 2128 additions and 2151 deletions

View File

@@ -1,12 +1,19 @@
script(src=url_for(theme.CDN.pangu))
if theme.pangu.field === 'post' && is_post()
script.
document.addEventListener('DOMContentLoaded', function() {
pangu.autoSpacingPage()
})
else if theme.pangu.field === 'site'
script.
document.addEventListener('DOMContentLoaded', function() {
pangu.autoSpacingPage()
})
script.
function panguFn () {
if (typeof pangu === 'object') pangu.spacingElementById('content-inner')
else {
$.getScript('!{url_for(theme.CDN.pangu)}', () => {
pangu.spacingElementById('content-inner')
})
}
}
function panguInit () {
if (!{theme.pangu.field === 'post'}){
GLOBAL_CONFIG_SITE.isPost && panguFn()
} else {
panguFn()
}
}
document.addEventListener('DOMContentLoaded', panguFn)