mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 14:07:06 +08:00
feat: 更新 lazyload 配置,支持原生 lazyload 功能
feat: 代碼優化 feat: 優化 pageType 邏輯 fix: 修復解密文章後, chartjs 沒有加載的 bug
This commit is contained in:
@@ -3,7 +3,7 @@ mixin rightsideItem(array)
|
||||
each item in array
|
||||
case item
|
||||
when 'readmode'
|
||||
if is_post() && readmode
|
||||
if globalPageType === 'post' && readmode
|
||||
button#readmode(type="button" title=_p('rightside.readmode_title'))
|
||||
i.fas.fa-book-open
|
||||
when 'translate'
|
||||
@@ -35,7 +35,7 @@ mixin rightsideItem(array)
|
||||
- const hideArray = enable ? hide && hide.split(',') : ['readmode','translate','darkmode','hideAside']
|
||||
- const showArray = enable ? show && show.split(',') : ['toc','chat','comment']
|
||||
|
||||
|
||||
|
||||
#rightside-config-hide
|
||||
if hideArray
|
||||
+rightsideItem(hideArray)
|
||||
@@ -45,7 +45,7 @@ mixin rightsideItem(array)
|
||||
button#rightside-config(type="button" title=_p("rightside.setting"))
|
||||
i.fas.fa-cog.fa-spin
|
||||
else
|
||||
if is_post()
|
||||
if globalPageType === 'post'
|
||||
if (readmode || translate.enable || (darkmode.enable && darkmode.button))
|
||||
button#rightside-config(type="button" title=_p("rightside.setting"))
|
||||
i.fas.fa-cog.fa-spin
|
||||
|
||||
Reference in New Issue
Block a user