mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
feat: 完全移除 jquery feat: 清除配置文件的CDN, 默認 CDN 不再顯示在 config feat: 切換夜間模式後, mermaid 也會切換夜間主題 feat: 移除騰訊分析 feat: 移除右下角字體調整按鈕 feat: 本地搜索可處理 json feat: 右下角按鈕自定義順序 feat: 右小角按鈕 UI 微調 improvement: 手機端更改閲讀模式退出按鈕到右下角 improvement: photofigcaption 和 fancybox 的 figcaption 優先顯示 圖片的title屬性,然後是 alt 屬性 improvement: 首頁ui微調 improvement: 禁止一些瀏覽器會出現點擊左下角按鈕出現放大網頁的行為 improvement: js 優化 fix: 修復窗口大小改變時,導航欄的ui 可能會錯亂的 bug fix: 修復 pjax 下, twikoo 評論獲取是上一篇評論的 bug fix: 壓縮 html 代碼後, mermaid 顯示正常
60 lines
2.3 KiB
Plaintext
60 lines
2.3 KiB
Plaintext
- const { readmode, translate, darkmode, aside, chat_btn } = theme
|
|
mixin rightsideItem(array)
|
|
each item in array
|
|
case item
|
|
when 'readmode'
|
|
if is_post() && readmode
|
|
button#readmode(type="button" title=_p('rightside.readmode_title'))
|
|
i.fas.fa-book-open
|
|
when 'translate'
|
|
if translate.enable
|
|
button#translateLink(type="button" title=_p('rightside.translate_title'))= translate.default
|
|
when 'darkmode'
|
|
if darkmode.enable && darkmode.button
|
|
button#darkmode(type="button" title=_p('rightside.night_mode_title'))
|
|
i.fas.fa-adjust
|
|
when 'hideAside'
|
|
if aside.enable && aside.button && page.aside !== false
|
|
button#hide-aside-btn(type="button" title=_p('rightside.aside'))
|
|
i.fas.fa-arrows-alt-h
|
|
when 'toc'
|
|
if showToc
|
|
button#mobile-toc-button.close(type="button" title=_p("rightside.toc"))
|
|
i.fas.fa-list-ul
|
|
when 'chat'
|
|
if chat_btn
|
|
button#chat_btn(type="button" title=_p("rightside.chat_btn"))
|
|
i.fas.fa-sms
|
|
when 'comment'
|
|
if commentsJsLoad
|
|
a#to_comment(href="#post-comment" title=_p("rightside.scroll_to_comment"))
|
|
i.fas.fa-comments
|
|
|
|
#rightside
|
|
- const { enable, hide, show } = theme.rightside_item_order
|
|
- 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)
|
|
#rightside-config-show
|
|
if enable
|
|
if hide
|
|
button#rightside_config(type="button" title=_p("rightside.setting"))
|
|
i.fas.fa-cog.fa-spin
|
|
else
|
|
if is_post()
|
|
if (readmode || translate.enable || (darkmode.enable && darkmode.button))
|
|
button#rightside_config(type="button" title=_p("rightside.setting"))
|
|
i.fas.fa-cog.fa-spin
|
|
else if translate.enable || (darkmode.enable && darkmode.button)
|
|
button#rightside_config(type="button" title=_p("rightside.setting"))
|
|
i.fas.fa-cog.fa-spin
|
|
|
|
if showArray
|
|
+rightsideItem(showArray)
|
|
|
|
button#go-up(type="button" title=_p("rightside.back_to_top"))
|
|
i.fas.fa-arrow-up |