mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-08 12:07:06 +08:00
- 新增本地搜索分頁配置 (enablePagination, hitsPerPage) - 重構 Algolia 搜索邏輯,支援多索引和更好的錯誤處理 - 優化搜索 UI 樣式,包括分頁按鈕和響應式設計 - 改進搜索結果顯示,新增編號和更好的高亮處理 📦 依賴項更新: - 更新 plugins.yml 中的多個插件版本 (abcjs, algolia, aplayer 等) - 更新 package.json 版本號為 5.5.0 🎨 UI/UX 優化: - 改進側邊欄和目錄的動畫效果 - 優化樣式佈局,調整寬度百分比 - 新增說說頁面的分頁導航組件 - 改進右側邊欄按鈕樣式 🐛 錯誤處理和代碼優化: - 修復 Umami Analytics 的錯誤處理和數據驗證 - 改進懶加載圖片的正則表達式,避免匹配腳本標籤 - 移除未使用的變數和改進代碼結構 - 新增說說內容的 Markdown 渲染支援 🔧 其他改進: - 更新翻譯功能,移除箭頭函數語法以提升相容性
97 lines
2.3 KiB
Stylus
97 lines
2.3 KiB
Stylus
#sidebar
|
||
#menu-mask
|
||
position: fixed
|
||
z-index: 102
|
||
display: none
|
||
width: 100%
|
||
height: 100%
|
||
background: alpha($dark-black, .8)
|
||
|
||
#sidebar-menus
|
||
position: fixed
|
||
top: 0
|
||
right: -($sidebar-width)
|
||
z-index: 103
|
||
overflow-x: hidden
|
||
overflow-y: scroll
|
||
padding-left: 5px
|
||
width: $sidebar-width
|
||
height: 100%
|
||
background: var(--sidebar-bg)
|
||
transition: all .5s
|
||
|
||
&.open
|
||
transform: translate3d(-100%, 0, 0)
|
||
|
||
& > .avatar-img
|
||
margin: 20px auto
|
||
|
||
.site-data
|
||
padding: 0 10px
|
||
|
||
hr
|
||
margin: 20px auto
|
||
|
||
.menus_items
|
||
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
|
||
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)
|
||
box-shadow: 0 2px 8px rgba(0, 0, 0, .1)
|
||
color: var(--white)
|
||
transition: all .2s ease
|
||
transform: translateX(3px)
|
||
|
||
i:first-child
|
||
width: 15%
|
||
text-align: left
|
||
|
||
&.group
|
||
& > i:last-child
|
||
position: absolute
|
||
top: .6em
|
||
right: 10px
|
||
transition: transform .3s
|
||
|
||
&.hide
|
||
& > i:last-child
|
||
transform: rotate(90deg)
|
||
|
||
& + .menus_item_child
|
||
overflow: hidden
|
||
max-height: 0
|
||
opacity: 0
|
||
transform: scaleY(0)
|
||
transform-origin: top
|
||
|
||
.menus_item_child
|
||
margin: 0
|
||
padding-left: 25px
|
||
max-height: 0
|
||
list-style: none
|
||
opacity: 0
|
||
transition: transform .3s ease, opacity .3s ease, max-height .3s ease
|
||
transform: scaleY(0)
|
||
transform-origin: top
|
||
will-change: transform, opacity, max-height
|
||
|
||
// 當父元素沒有 .hide 類時,顯示子目錄
|
||
.site-page.group:not(.hide) + .menus_item_child
|
||
max-height: 1000px
|
||
opacity: 1
|
||
transform: scaleY(1) |