add theme
This commit is contained in:
20
themes/butterfly/layout/includes/third-party/card-post-count/valine.pug
vendored
Normal file
20
themes/butterfly/layout/includes/third-party/card-post-count/valine.pug
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
script.
|
||||
(() => {
|
||||
function loadValine () {
|
||||
function initValine () {
|
||||
let initData = {
|
||||
el: '#vcomment',
|
||||
appId: '#{theme.valine.appId}',
|
||||
appKey: '#{theme.valine.appKey}',
|
||||
serverURLs: '#{theme.valine.serverURLs}'
|
||||
}
|
||||
|
||||
const valine = new Valine(initData)
|
||||
}
|
||||
|
||||
if (typeof Valine === 'function') initValine()
|
||||
else btf.getScript('!{url_for(theme.asset.valine)}').then(initValine)
|
||||
}
|
||||
|
||||
window.pjax ? loadValine() : window.addEventListener('load', loadValine)
|
||||
})()
|
||||
Reference in New Issue
Block a user