mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
feat: 增加twikoo評論數顯示 feat: 增加toc簡潔模式 feat: 最新評論頭像增加lazyload feat: fontawesome和google字體增加異步加載 fix: 修復上個版本導致的圖庫報沒有jQuery的bugs fix: 修復上個版本導致aside 分類展開/收縮按鈕的bugs improvement: toc點擊時改用document.getElementById獲取參數,避免有些字符導致無法跳轉 close #426 improvement: icp圖片限制大小 close #434 improvement: 最新評論優化,當沒有評論時顯示 '沒有評論' improvement: 若瀏覽器支持,scroll將採用原生瀏覽器支持的滾動方法 improvement: 當屏幕沒有滾動條時,rightside會直接顯示
35 lines
1.7 KiB
Plaintext
35 lines
1.7 KiB
Plaintext
if theme.fireworks && theme.fireworks.enable
|
|
canvas.fireworks(mobile=`${theme.fireworks.mobile}`)
|
|
script(src=url_for(theme.CDN.fireworks))
|
|
|
|
if (theme.canvas_ribbon && theme.canvas_ribbon.enable)
|
|
script(defer id="ribbon" src=url_for(theme.CDN.canvas_ribbon) size=theme.canvas_ribbon.size
|
|
alpha=theme.canvas_ribbon.alpha zIndex=theme.canvas_ribbon.zIndex mobile=`${theme.canvas_ribbon.mobile}` data-click=`${theme.canvas_ribbon.click_to_change}`)
|
|
|
|
if (theme.canvas_fluttering_ribbon && theme.canvas_fluttering_ribbon.enable)
|
|
script(defer id="fluttering_ribbon" mobile=`${theme.canvas_fluttering_ribbon.mobile}` src=url_for(theme.CDN.canvas_fluttering_ribbon))
|
|
|
|
if (theme.canvas_nest && theme.canvas_nest.enable)
|
|
script#canvas_nest(defer color=theme.canvas_nest.color opacity=theme.canvas_nest.opacity zIndex=theme.canvas_nest.zIndex count=theme.canvas_nest.count mobile=`${theme.canvas_nest.mobile}` src=url_for(theme.CDN.canvas_nest))
|
|
|
|
if theme.activate_power_mode.enable
|
|
script(src=url_for(theme.CDN.activate_power_mode))
|
|
script.
|
|
POWERMODE.colorful = !{theme.activate_power_mode.colorful};
|
|
POWERMODE.shake = !{theme.activate_power_mode.shake};
|
|
POWERMODE.mobile = !{theme.activate_power_mode.mobile};
|
|
document.body.addEventListener('input', POWERMODE);
|
|
|
|
//- 鼠標特效
|
|
if theme.click_heart && theme.click_heart.enable
|
|
script#click-heart(src=url_for(theme.CDN.click_heart) async mobile=`${theme.click_heart.mobile}`)
|
|
|
|
if theme.ClickShowText && theme.ClickShowText.enable
|
|
script#click-show-text(
|
|
src= url_for(theme.CDN.ClickShowText)
|
|
data-mobile= `${theme.ClickShowText.mobile}`
|
|
data-text= theme.ClickShowText.text.join(",")
|
|
data-fontsize= theme.ClickShowText.fontSize
|
|
data-random= `${theme.ClickShowText.random}`
|
|
async
|
|
) |