mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +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: 增加最後更新時間顯示
335 lines
5.8 KiB
Stylus
335 lines
5.8 KiB
Stylus
beautify()
|
|
headStyle(fontsize)
|
|
padding-left: unit(fontsize + .4, 'rem')
|
|
|
|
code
|
|
font-size: unit(fontsize, 'rem')
|
|
|
|
&:before
|
|
margin-left: unit((-(fontsize + .2)), 'rem')
|
|
font-size: unit(fontsize, 'rem')
|
|
|
|
&:hover
|
|
padding-left: unit(fontsize + .6, 'rem')
|
|
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6
|
|
transition: all .2s ease-out
|
|
|
|
&:before
|
|
position: absolute
|
|
top: calc(50% - .35rem)
|
|
color: $title-prefix-icon-color
|
|
content: $title-prefix-icon
|
|
line-height: 1
|
|
transition: all .2s ease-out
|
|
@extend .fontawesomeIcon
|
|
|
|
&:hover
|
|
&:before
|
|
color: $light-blue
|
|
|
|
h1
|
|
headStyle(1)
|
|
|
|
h2
|
|
headStyle(.9)
|
|
|
|
h3
|
|
headStyle(.8)
|
|
|
|
h4
|
|
headStyle(.7)
|
|
|
|
h5
|
|
headStyle(.6)
|
|
|
|
h6
|
|
headStyle(.6)
|
|
|
|
ol,
|
|
ul
|
|
margin-top: .4rem
|
|
padding: 0 0 0 .8rem
|
|
list-style: none
|
|
counter-reset: li
|
|
|
|
+maxWidth768()
|
|
padding: 0 0 0 .4rem
|
|
|
|
p
|
|
margin: 0 0 .5rem
|
|
|
|
ol,
|
|
ul
|
|
padding-left: .6rem
|
|
|
|
+maxWidth768()
|
|
padding-left: .2rem
|
|
|
|
li
|
|
&:not(.tab)
|
|
position: relative
|
|
margin: .2rem 0
|
|
|
|
&:hover
|
|
&:before
|
|
transform: rotate(360deg)
|
|
|
|
&:before
|
|
position: absolute
|
|
top: 0
|
|
left: 0
|
|
background: $light-blue
|
|
color: $white
|
|
cursor: pointer
|
|
transition: all .3s ease-out
|
|
|
|
ol
|
|
> li
|
|
&:not(.tab)
|
|
padding: .2em .2em .2em 1.8em
|
|
|
|
&:before
|
|
margin-top: .65em
|
|
width: w = 1.45em
|
|
height: h = w
|
|
border-radius: .5 * w
|
|
content: counter(li)
|
|
counter-increment: li
|
|
text-align: center
|
|
font-size: .85em
|
|
line-height: h
|
|
|
|
ul
|
|
> li:not(.tab)
|
|
padding: .2em .2em .2em 1.4em
|
|
|
|
&:hover
|
|
&:before
|
|
border-color: $pseudo-hover
|
|
|
|
&:before
|
|
$w = .42em
|
|
top: .78em
|
|
width: w = $w
|
|
height: h = w
|
|
border: .5 * w solid $light-blue
|
|
border-radius: w
|
|
background: transparent
|
|
content: ''
|
|
line-height: h
|
|
|
|
no-beautify()
|
|
ol,
|
|
ul
|
|
margin-top: .4rem
|
|
|
|
p
|
|
margin: 0 0 .5rem
|
|
|
|
ol,
|
|
ul
|
|
padding-left: .5rem
|
|
|
|
li
|
|
position: relative
|
|
margin: .3rem 0
|
|
padding-left: .3rem
|
|
|
|
#article-container
|
|
if hexo-config('beautify.enable') && hexo-config('beautify.field') == 'site'
|
|
beautify()
|
|
else if hexo-config('beautify.enable') && hexo-config('beautify.field') == 'post'
|
|
no-beautify()
|
|
|
|
&.post-content
|
|
beautify()
|
|
else
|
|
no-beautify()
|
|
|
|
a
|
|
color: $a-link-color
|
|
text-decoration: none
|
|
word-wrap: break-word
|
|
transition: all .2s
|
|
overflow-wrap: break-word
|
|
|
|
&:hover
|
|
color: $light-blue
|
|
|
|
a.fancybox
|
|
outline: none
|
|
|
|
&:focus
|
|
outline: none
|
|
|
|
display: inline-block
|
|
width: 100%
|
|
text-align: center
|
|
|
|
img
|
|
max-width: 100%
|
|
transition: all .2s
|
|
|
|
.katex-wrap
|
|
overflow: auto
|
|
|
|
if hexo-config('katex') && hexo-config('katex.hide_scrollbar')
|
|
&::-webkit-scrollbar
|
|
display: none
|
|
|
|
.layout_post
|
|
margin: 0 auto
|
|
padding: 2rem 15px
|
|
max-width: 1000px
|
|
|
|
img
|
|
display: block
|
|
|
|
.tag_share
|
|
.post-meta
|
|
&__tag-list
|
|
display: inline-block
|
|
|
|
&__tags
|
|
display: inline-block
|
|
margin: .4rem .4rem .4rem 0
|
|
padding: 0 .6rem
|
|
width: fit-content
|
|
border: 1px solid $light-blue
|
|
border-radius: .6rem
|
|
color: $light-blue
|
|
font-size: .85em
|
|
transition: all .2s ease-in-out
|
|
|
|
&:hover
|
|
background: $light-blue
|
|
color: var(--white)
|
|
|
|
.post_share
|
|
display: inline-block
|
|
float: right
|
|
margin: .4rem 0
|
|
width: fit-content
|
|
|
|
.social-share
|
|
font-size: .85em
|
|
|
|
.social-share-icon
|
|
margin: 0 4px
|
|
width: w = 1.85em
|
|
height: w
|
|
font-size: 1.2em
|
|
line-height: w
|
|
|
|
.post-copyright
|
|
position: relative
|
|
margin: 2rem 0 .5rem
|
|
padding: .5rem .8rem
|
|
border: 1px solid var(--light-grey)
|
|
transition: box-shadow .3s ease-in-out
|
|
|
|
&:before
|
|
position: absolute
|
|
top: t = .5rem
|
|
right: t
|
|
width: w = .8rem
|
|
height: w
|
|
border-radius: w
|
|
background: $light-blue
|
|
content: ''
|
|
|
|
&:after
|
|
position: absolute
|
|
top: t = .7rem
|
|
right: t
|
|
width: w = .4rem
|
|
height: w
|
|
border-radius: w
|
|
background: var(--card-bg)
|
|
content: ''
|
|
|
|
&:hover
|
|
box-shadow: 0 0 8px 0 rgba(232, 237, 250, .6), 0 2px 4px 0 rgba(232, 237, 250, .5)
|
|
|
|
.post-copyright
|
|
&-meta
|
|
color: $light-blue
|
|
font-weight: bold
|
|
|
|
&-info
|
|
padding-left: .3rem
|
|
|
|
a
|
|
text-decoration: underline
|
|
word-break: break-word
|
|
|
|
&:hover
|
|
text-decoration: none
|
|
|
|
#article-container
|
|
word-wrap: break-word
|
|
overflow-wrap: break-word
|
|
|
|
a
|
|
color: $theme-link-color
|
|
|
|
&:hover
|
|
text-decoration: underline
|
|
|
|
img
|
|
margin: 0 auto .8rem
|
|
|
|
p
|
|
margin: 0 0 .8rem
|
|
|
|
iframe
|
|
margin: 0 0 1rem
|
|
|
|
.post-outdate-notice
|
|
position: relative
|
|
margin: 0 0 1rem
|
|
padding: .5em 1.2em
|
|
border-radius: 3px
|
|
background-color: $noticeOutdate-bg
|
|
color: $noticeOutdate-color
|
|
|
|
if hexo-config('noticeOutdate.style') == 'flat'
|
|
padding: .5em 1em .5em 2.6em
|
|
border-left: 5px solid $noticeOutdate-border
|
|
|
|
&:before
|
|
@extend .fontawesomeIcon
|
|
position: absolute
|
|
top: 50%
|
|
left: .9em
|
|
color: $noticeOutdate-border
|
|
content: '\f071'
|
|
transform: translateY(-50%)
|
|
|
|
+maxWidth1024()
|
|
.layout_post
|
|
width: auto
|
|
|
|
+maxWidth768()
|
|
.layout_post
|
|
padding: 1rem 5px
|
|
|
|
& > #post
|
|
padding: 1.8rem .7rem
|
|
|
|
// adjust the layout width in big screen
|
|
+minWidth2000()
|
|
.layout_post
|
|
max-width: 1300px
|
|
|
|
.layout_page
|
|
max-width: 1500px
|
|
|
|
&.hide-aside
|
|
max-width: 1300px |