init...
This commit is contained in:
20
themes/butterfly/layout/includes/third-party/pangu.pug
vendored
Normal file
20
themes/butterfly/layout/includes/third-party/pangu.pug
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
script.
|
||||
function panguFn () {
|
||||
if (typeof pangu === 'object') pangu.autoSpacingPage()
|
||||
else {
|
||||
getScript('!{url_for(theme.asset.pangu)}')
|
||||
.then(() => {
|
||||
pangu.autoSpacingPage()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function panguInit () {
|
||||
if (!{theme.pangu.field === 'post'}){
|
||||
GLOBAL_CONFIG_SITE.isPost && panguFn()
|
||||
} else {
|
||||
panguFn()
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', panguInit)
|
||||
Reference in New Issue
Block a user