fix theme...
This commit is contained in:
19
themes/anzhiyu/layout/includes/third-party/card-post-count/artalk.pug
vendored
Normal file
19
themes/anzhiyu/layout/includes/third-party/card-post-count/artalk.pug
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
- const { server, site } = theme.artalk
|
||||
|
||||
script.
|
||||
(() => {
|
||||
const getArtalkCount = () => {
|
||||
const runWidget = () => {
|
||||
Artalk.loadCountWidget({
|
||||
server: '!{server}',
|
||||
site: '!{site}',
|
||||
countEl: '.artalk-count'
|
||||
})
|
||||
}
|
||||
|
||||
if (typeof Artalk === 'function') runWidget()
|
||||
else getScript('!{theme.asset.artalk_js}').then(runWidget)
|
||||
}
|
||||
|
||||
window.pjax ? getArtalkCount() : window.addEventListener('load', getArtalkCount)
|
||||
})()
|
||||
Reference in New Issue
Block a user