mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
由於整合了多個設定並更改了部分設定名稱,升級到 5.0 版本時,請重新設定 _config.yml 文件。
1. 新增 macstyle 設定,取消 mac / mac light 主題設定 2. 整合搜索相關設定 3. 修改程式碼區塊設定 4. 主頁文章新增多種版面配置 5. 新增說說頁面 6. 適配 hexo-blog-encrypt 加密插件 7. 改善手機端目錄的開啟效果 8. 新增平滑滾動功能 9. 支持以程式碼區塊方式撰寫 mermaid 圖表 10. 可自訂文章標題位置 11. 新增程式碼全螢幕按鈕 12. 友情連結頭像改為圓角設計 13. 優化程式碼,使用 hexo-util 的參數和 hexo 內建參數 14. 可自訂搜索框提示文字 15. 未設定選單時,不顯示側邊欄目錄和按鈕 16. 螢幕寬度超過 2000px 時,增加卡片高度 17. 根據語言設定調整字體:簡體中文使用雅黑,其他使用正黑體 18. 更新 plugins.yml 19. 全新的側邊欄界面設計 20. 新增 giscus 的 js 設定 21. 調整 utterances js 的設定位置 22. 新增 utterances option 設定 23. 修改 giscus 的主題設定 24. 多個界面元素改為圓角設計 25. 可選擇圓角或直角界面風格 26. 圖庫加載按鈕新增圖標 27. 改善標籤頁面的滑鼠懸停效果 28. 調整側邊欄的滑鼠懸停效果 29. 微調部分界面元素 1. 修復 Hexo 新版本下 Prism.js 無法正確高亮的問題 2. 修復文章標籤為空時可能出現的錯誤 3. 修正 mermaid 圖表可能出現的錯誤 4. 解決未設定選單時控制台報錯的問題 5. 修復 Algolia 搜索的每頁顯示數量設定無效的問題 6. 解決 Algolia 搜索結果出現滾動條的問題 7. 修正滾動條出現上下按鈕的問題 8. 修復圖庫遠程連結未加前綴的問題 9. 修正 label 標籤外掛右側多餘空格的問題 10. 解決 APlayer 報告內存洩漏的問題 1. 優化 PJAX 下的函數調用 2. 整體代碼優化 3. 提升兼容性 4. 改善 Lighthouse 評分 5. 在 PJAX 關閉時減少不必要的全局變量 6. 優化 Waline 的 import 兼容性 7. 改善頁面進入效果 8. 優化程式碼區塊工具列顯示邏輯 9. 改善不同螢幕寬度下文章標題位置的顯示 10. 優化標籤顏色生成算法,避免過暗或過亮 11. 調整 Artalk 和 Waline 在夜間模式下的字體顏色,與主題保持一致 12. 調整 Algolia 搜索加載動畫位置,避免換行 13. 優化 Algolia 搜索結果為空時的處理 14. 改善系列文章的滑鼠懸停效果 15. 優化 404 頁面代碼 16. 解決搜索和側邊欄開啟時窗口抖動的問題 17. 優化 tabs 標籤外掛的代碼和效能 18. 改善 tabs 中使用 gallery 標籤外掛時的圖片加載邏輯 19. 優化目錄滾動效果,使當前標題保持在中間 20. 調整螢幕寬度超過 1024px 時 gallerygroup 的顯示數量
This commit is contained in:
@@ -8,19 +8,14 @@
|
||||
padding-right: 15px
|
||||
|
||||
+maxWidth900()
|
||||
margin-top: 20px
|
||||
width: 100%
|
||||
|
||||
> .card-widget:first-child
|
||||
margin-top: 0
|
||||
|
||||
+maxWidth900()
|
||||
margin-top: 20px
|
||||
|
||||
.card-widget
|
||||
@extend .cardHover
|
||||
position: relative
|
||||
overflow: hidden
|
||||
margin-top: 20px
|
||||
margin-bottom: 20px
|
||||
padding: 20px 24px
|
||||
|
||||
if hexo-config('aside.mobile') == false
|
||||
@@ -28,16 +23,19 @@
|
||||
&:not(#card-toc)
|
||||
display: none
|
||||
|
||||
&:last-child
|
||||
margin-bottom: 0
|
||||
|
||||
.card-info
|
||||
.author-info
|
||||
&__name
|
||||
&-name
|
||||
font-weight: 500
|
||||
font-size: 1.57em
|
||||
|
||||
&__description
|
||||
&-description
|
||||
margin-top: -.42em
|
||||
|
||||
.card-info-data
|
||||
.site-data
|
||||
margin: 14px 0 4px
|
||||
|
||||
.card-info-social-icons
|
||||
@@ -61,6 +59,7 @@
|
||||
color: var(--btn-color)
|
||||
text-align: center
|
||||
line-height: 2.4
|
||||
addBorderRadius(7)
|
||||
|
||||
&:hover
|
||||
background-color: var(--btn-hover-color)
|
||||
@@ -86,6 +85,7 @@
|
||||
a
|
||||
display: inline-block
|
||||
padding: 0 4px
|
||||
line-height: 1.8
|
||||
|
||||
&:hover
|
||||
color: $text-hover !important
|
||||
@@ -112,8 +112,9 @@
|
||||
|
||||
.thumbnail
|
||||
overflow: hidden
|
||||
width: w = 4.2em
|
||||
width: w = 4em
|
||||
height: w
|
||||
addBorderRadius()
|
||||
|
||||
:first-child
|
||||
@extend .imgHover
|
||||
@@ -130,14 +131,14 @@
|
||||
& > time,
|
||||
& > .name
|
||||
display: block
|
||||
color: $theme-meta-color
|
||||
font-size: 85%
|
||||
color: var(--card-meta)
|
||||
font-size: .85em
|
||||
|
||||
& > .title,
|
||||
& > .comment
|
||||
@extend .limit-more-line
|
||||
color: var(--font-color)
|
||||
font-size: 95%
|
||||
// font-size: 95%
|
||||
line-height: 1.5
|
||||
-webkit-line-clamp: 2
|
||||
|
||||
@@ -158,13 +159,16 @@
|
||||
a
|
||||
display: flex
|
||||
flex-direction: row
|
||||
padding: 3px 10px
|
||||
padding: 2px 8px
|
||||
margin: 2px 0
|
||||
color: var(--font-color)
|
||||
transition: all .4s
|
||||
transition: all .3s
|
||||
addBorderRadius()
|
||||
|
||||
&:hover
|
||||
padding: 3px 17px
|
||||
padding: 2px 12px
|
||||
background-color: var(--text-bg-hover)
|
||||
color: var(--white)
|
||||
|
||||
span
|
||||
@extend .limit-one-line
|
||||
@@ -288,9 +292,10 @@
|
||||
.toc-link
|
||||
display: block
|
||||
margin: 4px 0
|
||||
padding: 1px 6px
|
||||
padding: 1px 8px
|
||||
color: var(--toc-link-color)
|
||||
transition: all .2s ease-in-out
|
||||
addBorderRadius()
|
||||
|
||||
&:hover
|
||||
color: $theme-color
|
||||
@@ -397,9 +402,9 @@
|
||||
.card-recent-post
|
||||
order: hexo-config('aside.card_recent_post.sort_order')
|
||||
|
||||
if hexo-config('newest_comments.sort_order')
|
||||
if hexo-config('aside.card_newest_comments.sort_order')
|
||||
#card-newest-comments
|
||||
order: hexo-config('newest_comments.sort_order')
|
||||
order: hexo-config('aside.card_newest_comments.sort_order')
|
||||
|
||||
if hexo-config('aside.card_categories.sort_order')
|
||||
.card-categories
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
// chat
|
||||
if hexo-config('chat_btn') == true && hexo-config('chatra.enable')
|
||||
#chatra:not(.chatra--expanded)
|
||||
visibility: hidden !important
|
||||
width: 1px !important
|
||||
height: 1px !important
|
||||
opacity: 0 !important
|
||||
pointer-events: none
|
||||
if hexo-config('chat.rightside_button') == true
|
||||
if hexo-config('chat.use') == 'chatra'
|
||||
#chatra:not(.chatra--expanded)
|
||||
visibility: hidden !important
|
||||
width: 1px !important
|
||||
height: 1px !important
|
||||
opacity: 0 !important
|
||||
pointer-events: none
|
||||
|
||||
if hexo-config('chat_btn') == true && hexo-config('messenger.enable')
|
||||
.fb_dialog,
|
||||
.fb-customerchat
|
||||
visibility: hidden !important
|
||||
width: 1px !important
|
||||
height: 1px !important
|
||||
opacity: 0 !important
|
||||
pointer-events: none
|
||||
if hexo-config('chat.use') == 'messenger'
|
||||
.fb_dialog,
|
||||
.fb-customerchat
|
||||
visibility: hidden !important
|
||||
width: 1px !important
|
||||
height: 1px !important
|
||||
opacity: 0 !important
|
||||
pointer-events: none
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
background-position: bottom
|
||||
background-size: cover
|
||||
|
||||
if hexo-config('footer_bg') != false && hexo-config('mask.footer')
|
||||
if hexo-config('footer_img') != false && hexo-config('mask.footer')
|
||||
&:before
|
||||
position: absolute
|
||||
width: 100%
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
background: rgba(255, 255, 255, .8)
|
||||
box-shadow: 0 5px 6px -5px alpha($grey, .6)
|
||||
transition: transform .2s ease-in-out, opacity .2s ease-in-out
|
||||
will-change: transform
|
||||
|
||||
#blog-info
|
||||
color: var(--font-color)
|
||||
@@ -345,10 +346,10 @@
|
||||
margin-top: 8px
|
||||
padding: 0
|
||||
width: max-content
|
||||
border-radius: 5px
|
||||
background-color: var(--sidebar-bg)
|
||||
box-shadow: 0 5px 20px -4px rgba($dark-black, .5)
|
||||
animation: sub_menus .3s .1s ease both
|
||||
addBorderRadius(5)
|
||||
|
||||
&:before
|
||||
position: absolute
|
||||
@@ -364,13 +365,14 @@
|
||||
&:hover
|
||||
background: var(--text-bg-hover)
|
||||
|
||||
&:first-child
|
||||
border-top-left-radius: 5px
|
||||
border-top-right-radius: 5px
|
||||
if hexo-config('rounded_corners_ui')
|
||||
&:first-child
|
||||
border-top-left-radius: 5px
|
||||
border-top-right-radius: 5px
|
||||
|
||||
&:last-child
|
||||
border-bottom-right-radius: 5px
|
||||
border-bottom-left-radius: 5px
|
||||
&:last-child
|
||||
border-bottom-right-radius: 5px
|
||||
border-bottom-left-radius: 5px
|
||||
|
||||
a
|
||||
display: inline-block
|
||||
|
||||
@@ -37,47 +37,40 @@
|
||||
.prev-post,
|
||||
.next-post
|
||||
@extend .postImgHover
|
||||
position: relative
|
||||
overflow: hidden
|
||||
width: 50%
|
||||
height: 150px
|
||||
|
||||
+maxWidth768()
|
||||
width: 100%
|
||||
|
||||
a
|
||||
position: relative
|
||||
display: block
|
||||
overflow: hidden
|
||||
height: 150px
|
||||
|
||||
&.pagination-post
|
||||
overflow: hidden
|
||||
margin-top: 40px
|
||||
width: 100%
|
||||
background: $dark-black
|
||||
addBorderRadius()
|
||||
|
||||
.layout
|
||||
& > .recent-posts
|
||||
.pagination
|
||||
& > *
|
||||
display: inline-block
|
||||
margin: 0 6px
|
||||
width: w = 2.5em
|
||||
height: w
|
||||
line-height: w
|
||||
.pagination
|
||||
& > *
|
||||
display: inline-block
|
||||
margin: 0 6px
|
||||
width: w = 2.5em
|
||||
height: w
|
||||
line-height: w
|
||||
|
||||
& > *:not(.space)
|
||||
@extend .cardHover
|
||||
& > *:not(.space)
|
||||
@extend .cardHover
|
||||
|
||||
&:hover
|
||||
background: var(--btn-hover-color)
|
||||
color: var(--btn-color)
|
||||
&:hover
|
||||
background: var(--btn-hover-color)
|
||||
color: var(--btn-color)
|
||||
|
||||
& > div:not(.recent-posts)
|
||||
.pagination
|
||||
.page-number
|
||||
display: inline-block
|
||||
margin: 0 4px
|
||||
min-width: w = 24px
|
||||
height: w
|
||||
text-align: center
|
||||
line-height: w
|
||||
cursor: pointer
|
||||
#archive
|
||||
.pagination
|
||||
margin-top: 30px
|
||||
|
||||
& > *:not(.space)
|
||||
box-shadow: none
|
||||
@@ -87,6 +87,7 @@ beautify()
|
||||
margin: 0 auto 20px
|
||||
max-width: 100%
|
||||
transition: filter 375ms ease-in .2s
|
||||
addBorderRadius()
|
||||
|
||||
p
|
||||
margin: 0 0 16px
|
||||
@@ -98,7 +99,6 @@ beautify()
|
||||
margin: 0 3px
|
||||
padding: 3px 5px
|
||||
border: 1px solid #b4b4b4
|
||||
border-radius: 3px
|
||||
background-color: #f8f8f8
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, .25), 0 2px 1px 0 rgba(255, 255, 255, .6) inset
|
||||
color: #34495e
|
||||
@@ -107,6 +107,7 @@ beautify()
|
||||
font-size: .9em
|
||||
font-family: Monaco, 'Ubuntu Mono', monospace
|
||||
line-height: 1em
|
||||
addBorderRadius(3)
|
||||
|
||||
if hexo-config('anchor.click_to_scroll')
|
||||
h1,
|
||||
@@ -181,7 +182,7 @@ beautify()
|
||||
background: $light-blue
|
||||
color: var(--white)
|
||||
|
||||
.post_share
|
||||
.post-share
|
||||
display: inline-block
|
||||
float: right
|
||||
margin: 8px 0 0
|
||||
@@ -203,6 +204,7 @@ beautify()
|
||||
padding: 10px 16px
|
||||
border: 1px solid var(--light-grey)
|
||||
transition: box-shadow .3s ease-in-out
|
||||
addBorderRadius()
|
||||
|
||||
&:before
|
||||
@extend .fontawesomeIcon
|
||||
@@ -238,9 +240,9 @@ beautify()
|
||||
position: relative
|
||||
margin: 0 0 20px
|
||||
padding: .5em 1.2em
|
||||
border-radius: 3px
|
||||
background-color: $noticeOutdate-bg
|
||||
color: $noticeOutdate-color
|
||||
addBorderRadius(3)
|
||||
|
||||
if hexo-config('noticeOutdate.style') == 'flat'
|
||||
padding: .5em 1em .5em 2.6em
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
font-size: 1.43em
|
||||
|
||||
& > .relatedPosts-list
|
||||
& > div
|
||||
& > a
|
||||
position: relative
|
||||
display: inline-block
|
||||
overflow: hidden
|
||||
@@ -17,6 +17,7 @@
|
||||
background: $dark-black
|
||||
vertical-align: bottom
|
||||
@extend .postImgHover
|
||||
addBorderRadius()
|
||||
|
||||
+maxWidth768()
|
||||
margin: 2px
|
||||
@@ -27,11 +28,8 @@
|
||||
width: calc(100% - 4px)
|
||||
|
||||
.content
|
||||
position: absolute
|
||||
top: 50%
|
||||
padding: 0 20px
|
||||
width: 100%
|
||||
transform: translate(0, -50%)
|
||||
@extend .verticalCenter
|
||||
|
||||
.date
|
||||
color: var(--light-grey)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
background: var(--btn-bg)
|
||||
color: var(--btn-color)
|
||||
cursor: pointer
|
||||
addBorderRadius()
|
||||
|
||||
i
|
||||
margin-right: 5px
|
||||
@@ -33,12 +34,12 @@
|
||||
display: none
|
||||
padding: 0 0 15px
|
||||
width: 100%
|
||||
addBorderRadius()
|
||||
|
||||
.reward-all
|
||||
display: inline-block
|
||||
margin: 0
|
||||
padding: 20px 10px
|
||||
border-radius: 4px
|
||||
background: var(--reward-pop)
|
||||
|
||||
&:before
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
margin-bottom: 5px
|
||||
width: w = 35px
|
||||
height: w
|
||||
border-radius: 5px
|
||||
background-color: var(--btn-bg)
|
||||
color: var(--btn-color)
|
||||
text-align: center
|
||||
font-size: 16px
|
||||
line-height: w
|
||||
addBorderRadius(5)
|
||||
|
||||
&:hover
|
||||
background-color: var(--btn-hover-color)
|
||||
|
||||
@@ -26,27 +26,33 @@
|
||||
& > .avatar-img
|
||||
margin: 20px auto
|
||||
|
||||
.sidebar-site-data
|
||||
.site-data
|
||||
padding: 0 10px
|
||||
|
||||
hr
|
||||
margin: 20px auto
|
||||
|
||||
.menus_items
|
||||
padding: 0 10px
|
||||
margin: 20px
|
||||
padding: 15px
|
||||
background: var(--sidebar-menu-bg)
|
||||
box-shadow: 0 0 1px 1px rgba(7, 17, 27, .05)
|
||||
addBorderRadius(10)
|
||||
|
||||
.site-page
|
||||
@extend .limit-one-line
|
||||
position: relative
|
||||
display: block
|
||||
padding: 3px 28px 3px 20px
|
||||
border-radius: 6px
|
||||
margin: 4px 0
|
||||
padding: 2px 23px 2px 15px
|
||||
color: var(--font-color)
|
||||
font-size: 1.15em
|
||||
cursor: pointer
|
||||
addBorderRadius(6)
|
||||
|
||||
&:hover
|
||||
background: var(--text-bg-hover)
|
||||
color: var(--white)
|
||||
|
||||
i:first-child
|
||||
width: 15%
|
||||
@@ -55,8 +61,8 @@
|
||||
&.group
|
||||
& > i:last-child
|
||||
position: absolute
|
||||
top: .78em
|
||||
right: 13px
|
||||
top: .6em
|
||||
right: 10px
|
||||
transition: transform .3s
|
||||
|
||||
&.hide
|
||||
|
||||
@@ -79,31 +79,45 @@ if hexo-config('mermaid.enable')
|
||||
margin: 0 0 .8em
|
||||
padding: 6px 0 16px
|
||||
|
||||
.katex-display
|
||||
overflow: auto hidden
|
||||
padding: 5px
|
||||
if hexo-config('math.use')
|
||||
.katex-display
|
||||
overflow: auto hidden
|
||||
padding: 5px
|
||||
|
||||
if hexo-config('katex') && hexo-config('katex.hide_scrollbar')
|
||||
&::-webkit-scrollbar
|
||||
display: none
|
||||
.katex-show
|
||||
display: block
|
||||
|
||||
// Mathjax
|
||||
mjx-container
|
||||
overflow-x: auto
|
||||
overflow-y: hidden
|
||||
padding-bottom: 4px
|
||||
max-width: 100%
|
||||
.katex
|
||||
display: none
|
||||
|
||||
&[display]
|
||||
display: block !important
|
||||
min-width: auto !important
|
||||
&.katex-show
|
||||
display: inline
|
||||
|
||||
&:not([display])
|
||||
display: inline-grid !important
|
||||
if hexo-config('math.hide_scrollbar')
|
||||
.katex-display,
|
||||
mjx-container
|
||||
scrollbar-width: none
|
||||
|
||||
mjx-assistive-mml
|
||||
right: 0
|
||||
bottom: 0
|
||||
&::-webkit-scrollbar
|
||||
display: none
|
||||
|
||||
// Mathjax
|
||||
mjx-container
|
||||
overflow-x: auto
|
||||
overflow-y: hidden
|
||||
padding-bottom: 4px
|
||||
max-width: 100%
|
||||
|
||||
&[display]
|
||||
display: block !important
|
||||
min-width: auto !important
|
||||
|
||||
&:not([display])
|
||||
display: inline-grid !important
|
||||
|
||||
mjx-assistive-mml
|
||||
right: 0
|
||||
bottom: 0
|
||||
|
||||
.aplayer
|
||||
color: $font-black
|
||||
|
||||
Reference in New Issue
Block a user