mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 19:40:55 +08:00
feat: 增加部分特效 Mobile設置(activate_power_mode/fireworks/click_heart/ClickShowText) feat: aside 分類 收縮/展開 增加slide效果 improvement: 更改canvas_ribbon_piao 為 canvas_fluttering_ribbon improvement: darkmode 字體顔色加深 improvement: 優化nav的進入,應該修復一些用户在本地測試中無法顯示nav的bugs improvement: 部分css和html優化 fix: 修復鼠標點擊文字特效,文字過長導致頁面有滾動條的bugs remove: 移除anime js, 集成在fireworks的js裏 remove: 刪除特效js,改為cdn引入
46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
- let emojiMaps = '""'
|
|
if site.data.valine
|
|
- emojiMaps = JSON.stringify(site.data.valine)
|
|
|
|
script.
|
|
function loadValine () {
|
|
function initValine () {
|
|
const initData = {
|
|
el: '#vcomment',
|
|
appId: '#{theme.valine.appId}',
|
|
appKey: '#{theme.valine.appKey}',
|
|
placeholder: '#{theme.valine.placeholder}',
|
|
avatar: '#{theme.valine.avatar}',
|
|
meta: '#{theme.valine.guest_info }'.split(','),
|
|
pageSize: '#{theme.valine.pageSize}',
|
|
lang: '#{theme.valine.lang}',
|
|
recordIP: #{theme.valine.recordIP},
|
|
serverURLs: '#{theme.valine.serverURLs}',
|
|
emojiCDN: '#{theme.valine.emojiCDN}',
|
|
emojiMaps: !{emojiMaps},
|
|
enableQQ: #{theme.valine.enableQQ},
|
|
path: window.location.pathname,
|
|
}
|
|
|
|
if (!{Boolean(theme.valine.requiredFields)}) {
|
|
initData.requiredFields= ('!{theme.valine.requiredFields}'.split(','))
|
|
}
|
|
|
|
const valine = new Valine(initData)
|
|
}
|
|
|
|
if (typeof Valine === 'function') initValine()
|
|
else $.getScript('!{url_for(theme.CDN.valine)}', initValine)
|
|
}
|
|
|
|
if ('!{theme.comments.use[0]}' === 'Valine' || !!{theme.comments.lazyload}) {
|
|
if (!{theme.comments.lazyload}) btf.loadComment(document.querySelector('#vcomment'),loadValine)
|
|
else setTimeout(() => loadValine(), 0)
|
|
} else {
|
|
function loadOtherComment () {
|
|
loadValine()
|
|
}
|
|
}
|
|
|
|
|