mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
2. feat: 可隱藏Mobile sidebar 子菜單 3. refactor: archives和card-post 改為flex佈局 4. feat: 當寬度小於1024時,點擊toc滾動,增加滾動效果 5. feat: 點擊滾動,如果滾動是向上時,將會偏移60px, 避免導航欄遮擋 close #317 6. feat: 可配置font-size 7. refactor: 去除字體放大、縮小按鈕 8. refactor: 部分css由'px'改為'em',適應font-size值改變而改變 9. feat: pjax增加exclude配置 10. fix: 修復canvas_nest 配置沒有生效的Bugs 11. feat: 新增 cnzz_analytics 12. feat: 騰訊分析改為騰訊移動分析,並適配pjax 13. perf: 改cookies為localstore存儲 14. feat: 設置中的theme_color可單獨配置幾個,而不需要全部開啟 close #314 15. feat: butterfly.yml 採用deepMerge, 與_config文件進行合併而不是替換 16. fix: 修復rightsize-bottom配置無效的bug 17. refactor: aside增加position sticky 18. refactor: 調整webinfo 寬度小時的顯示 19. feat: 更改addtoany item的寫法 20. refactor: aside 內容邊距調整 21. feat: 增加最後更新時間顯示
326 lines
6.0 KiB
Stylus
326 lines
6.0 KiB
Stylus
#page-header
|
|
position: relative
|
|
width: 100%
|
|
background-color: $light-blue
|
|
background-attachment: scroll
|
|
background-position: center center
|
|
background-size: cover
|
|
background-repeat: no-repeat
|
|
transition: all .5s
|
|
|
|
// index
|
|
&.full_page
|
|
height: $index_top_img_height
|
|
background-attachment: fixed
|
|
|
|
#site-info
|
|
position: absolute
|
|
top: $index_site_info_top
|
|
padding: 0 .5rem
|
|
width: 100%
|
|
|
|
#site_title,
|
|
#site_subtitle,
|
|
#scroll_down .scroll-down-effects
|
|
text-align: center
|
|
text-shadow: .1rem .1rem .2rem rgba(0, 0, 0, .15)
|
|
line-height: 1.5
|
|
|
|
#site_title
|
|
margin: 0
|
|
color: var(--white)
|
|
font-size: 1.85em
|
|
|
|
+minWidth768()
|
|
font-size: 2.85em
|
|
|
|
#site_subtitle
|
|
color: var(--light-grey)
|
|
font-size: 1.15em
|
|
|
|
+minWidth768()
|
|
font-size: 1.72em
|
|
|
|
#site_social_icons
|
|
display: none
|
|
margin: 0 auto
|
|
width: 15rem
|
|
text-align: center
|
|
|
|
+maxWidth768()
|
|
display: block
|
|
|
|
.social-icon
|
|
margin: 0 .5rem
|
|
color: var(--light-grey)
|
|
text-shadow: .1rem .1rem .2rem rgba(0, 0, 0, .15)
|
|
font-size: 1.43em
|
|
cursor: pointer
|
|
|
|
#scroll_down
|
|
position: absolute
|
|
bottom: 0
|
|
width: 100%
|
|
cursor: pointer
|
|
|
|
.scroll-down-effects
|
|
position: relative
|
|
width: 100%
|
|
color: var(--light-grey)
|
|
font-size: 30px
|
|
|
|
// page
|
|
&.not-index-bg
|
|
height: 20rem
|
|
|
|
+maxWidth768()
|
|
height: 14rem
|
|
|
|
#page_site-info
|
|
position: absolute
|
|
top: 10rem
|
|
padding: 0 .5rem
|
|
width: 100%
|
|
|
|
+maxWidth768()
|
|
top: 7rem
|
|
|
|
// post
|
|
&.post-bg
|
|
height: 20rem
|
|
|
|
+maxWidth768()
|
|
height: 18rem
|
|
|
|
&:before
|
|
position: absolute
|
|
top: 0
|
|
left: 0
|
|
display: block
|
|
width: 100%
|
|
height: 100%
|
|
background-color: alpha($dark-black, .5)
|
|
content: ''
|
|
|
|
#post-info
|
|
position: absolute
|
|
bottom: 1.5rem
|
|
padding: 0 8%
|
|
width: 100%
|
|
text-align: left
|
|
|
|
+maxWidth768()
|
|
bottom: 1.1rem
|
|
padding: 0 1.1rem
|
|
|
|
#post-title
|
|
margin-bottom: .4rem
|
|
font-size: 2.15em
|
|
|
|
+maxWidth768()
|
|
font-size: 1.72em
|
|
|
|
.posttitle
|
|
@extend .limit-more-line
|
|
color: var(--white)
|
|
line-height: 1.5
|
|
-webkit-line-clamp: 3
|
|
|
|
#post-meta
|
|
color: var(--light-grey)
|
|
font-size: 95%
|
|
|
|
+minWidth768()
|
|
> .meta-secondline
|
|
> span:first-child
|
|
display: none
|
|
|
|
+maxWidth768()
|
|
font-size: 90%
|
|
|
|
> .meta-firstline,
|
|
> .meta-secondline
|
|
display: inline
|
|
|
|
.post-meta
|
|
&-separator
|
|
margin: 0 .25rem
|
|
|
|
&-icon
|
|
margin-right: .2rem
|
|
|
|
&-label
|
|
if hexo-config('post_meta.post.label')
|
|
margin-right: .2rem
|
|
else
|
|
display: none
|
|
|
|
a
|
|
color: var(--light-grey)
|
|
transition: all .3s ease-out
|
|
|
|
&:hover
|
|
color: $text-hover
|
|
text-decoration: underline
|
|
|
|
// css hack
|
|
// all browser in ios and safari in all apple device
|
|
_::-webkit-full-page-media,
|
|
_:future,
|
|
:root #page-header.full_page
|
|
background-attachment: scroll !important
|
|
|
|
#nav
|
|
position: absolute
|
|
top: 0
|
|
z-index: 90
|
|
display: flex
|
|
flex-wrap: wrap
|
|
align-items: center
|
|
padding: 0 36px
|
|
width: 100%
|
|
height: 60px
|
|
font-size: 1.3em
|
|
opacity: 0
|
|
transition: all .5s
|
|
|
|
+maxWidth768()
|
|
padding: 0 16px
|
|
|
|
&:not(.fixed)
|
|
.menus
|
|
padding-right: 0 !important
|
|
|
|
#blog_name
|
|
flex: 1
|
|
|
|
.toggle-menu
|
|
display: none
|
|
padding: .1rem 0 0 .3rem
|
|
vertical-align: top
|
|
|
|
&:hover
|
|
color: var(--white)
|
|
|
|
a
|
|
color: var(--light-grey)
|
|
|
|
&:hover
|
|
color: var(--white)
|
|
|
|
&.fixed
|
|
position: fixed
|
|
top: -62px
|
|
z-index: 91
|
|
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
|
|
|
|
a,
|
|
#site-name,
|
|
.toggle-menu
|
|
color: var(--font-color)
|
|
text-shadow: none
|
|
|
|
&:hover
|
|
color: $light-blue
|
|
|
|
&.visible
|
|
transition: all .5s
|
|
transform: translate3d(0, 100%, 0)
|
|
|
|
#site-name
|
|
text-shadow: .1rem .1rem .2rem rgba($dark-black, .15)
|
|
font-weight: bold
|
|
cursor: pointer
|
|
|
|
.menus_items
|
|
display: inline
|
|
|
|
.menus_item
|
|
position: relative
|
|
display: inline-block
|
|
padding: 0 0 0 .7rem
|
|
|
|
&:hover
|
|
.menus_item_child
|
|
display: block
|
|
|
|
i.expand
|
|
transform: rotate(180deg) !important
|
|
|
|
i.expand
|
|
padding: 4px
|
|
transition: transform .3s
|
|
|
|
& > a
|
|
&:after
|
|
position: absolute
|
|
bottom: 0
|
|
left: 0
|
|
z-index: -1
|
|
width: 0
|
|
height: 3px
|
|
background-color: lighten($theme-color, 30%)
|
|
content: ''
|
|
transition: all .3s ease-in-out
|
|
|
|
&:hover
|
|
&:after
|
|
width: 100%
|
|
|
|
.menus_item_child
|
|
position: absolute
|
|
right: 0
|
|
display: none
|
|
margin-top: 8px
|
|
padding: 0
|
|
width: max-content
|
|
background-color: var(--sidebar-bg)
|
|
box-shadow: 0 5px 20px -4px rgba($dark-black, .5)
|
|
animation: sub_menus .3s .1s ease both
|
|
|
|
&:before
|
|
position: absolute
|
|
top: -8px
|
|
left: 0
|
|
width: 100%
|
|
height: 20px
|
|
content: ''
|
|
|
|
li
|
|
list-style: none
|
|
|
|
&:hover
|
|
background: var(--text-bg-hover)
|
|
|
|
a
|
|
display: inline-block
|
|
padding: .3rem .7rem
|
|
width: 100%
|
|
color: var(--font-color)
|
|
text-shadow: none
|
|
|
|
&.hide-menu
|
|
.toggle-menu
|
|
display: inline-block !important
|
|
|
|
.site-page
|
|
font-size: inherit
|
|
|
|
.menus_items
|
|
display: none !important
|
|
|
|
#search_button span
|
|
display: none !important
|
|
|
|
#search_button
|
|
display: inline
|
|
padding: 0 0 0 .7rem
|
|
|
|
.site-page
|
|
position: relative
|
|
padding-bottom: .3rem
|
|
text-shadow: .05rem .05rem .1rem rgba($dark-black, .3)
|
|
font-size: .78em
|
|
cursor: pointer |