hexo/node_modules/hexo-theme-butterfly/layout/includes/third-party/pangu.pug

21 lines
441 B
Plaintext

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)