mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-17 04:40:53 +08:00
1. 不再支持hexo 4.0.0以下版本 2. 添加hexo fragment_cache,加快生成速度 3. 完善V5圖標顯示,不再需要同時加載V4和v5圖標 4. 去除cheerio依賴 5. 整合豆瓣配置,增加配置遊戲,圖書頁面top_img,可設置是否設置meta,解決部分瀏覽器無法顯示圖片問題 6. 友情鏈接除列表外可自定義內容 7. 可設置主頁標題距離頂部距離 8. 側邊欄可隱藏,可設置手機頁面是否隱藏 9. 增加disqusjs和utterances 兩個評論 10. 主頁文章增加tags和更新日期顯示,可以配置post_meta 11. 首頁subtitle可關閉打字效果,可設置打字效果顯示一次或loop 12. 增加valine和gitalk的配置 13. darkmode配置整理 14. 增加404頁面 15. post_beautify改為beautify,頁面美化不再只限於post頁,page頁也一樣 16. 可設置是否顯示cover,可設置各位置的cover顯示 17. 增加mermaid,可畫流程圖、狀態圖、時序圖、甘特圖等等 18. 增加pangu配置,中英文之間添加空格 19. 整合部分配置 20. post-copyright增加decode網址 (可以顯示中文) 21. 增加部分顏色配置 Feature 1. 適配IE 2. 增加一個Tag Plugins: 圖庫集 3. 增加一個Tag Plugins: tag-hide 功能 inline/block 4. 去除page頁開頭顯示與標題一樣的內容 5. aside 公告欄設置,支持html代碼 6. 手機界面sidebar顯示進度條和加深對應的標題 7. 主頁subtitle 的 hitokoto 顯示內容出處 9. footer 的hexo鏈接改為https 10. 修改手機下,menus和toc的打開效果 11. 手機頁面下,搜索界面全屏顯示 12. SEO優化,標題欄改為h1顯示 13. 閲讀模式優化,可根據light mode 和darkmode調整背景 14. 當屏蔽js時,header會出現(之前用js控制,會隱藏) Fixed 1. 修復Tencent Analytics的script加載為https #105 2. 修復相關文章,日期顯示錯誤bug 3. 修復gitalk報錯問題 4. 修復當valine background 是絕對地址時無法顯示的bug 5. 修復medium-zoom 無法使用的bug 6. 修復在safari下,點擊或移動到首頁文章cover,圓角變成正方形的bug #114 7. 修復在部分瀏覽器下,aside,友情鏈接頭像轉動變形的bug 8. 修復在寬度限制下,表格內容溢出屏幕外而出現滾動條的bug \#138 9. 修復gitalk js 在一些沒有設置評論的page里加載的bug 10. 修復tag plugins 的gist 在不同主題下的背景顏色問題(黑色主題下,文字不易觀看) 11. 修復highlight figcaption 顯示不全的bug 12. 修復disqus評論數無法獲取的bug 13. 修復子目錄在觸摸屏下點擊,偶爾不出現的bug 14. 修復a標籤太長(連續英文字母)不會換行的bug 15. 修復toc滾動時,閲讀進度條也跟著滾動的bug 16. 修復aside的圖片,可點擊顯示大圖bug 17. 修復activate-power-mode設置參數無效bug 18. 修復語言上的錯誤 \#156 19. 修復主頁在safari桌面端,首頁滾動卡頓的bug
340 lines
6.1 KiB
Stylus
340 lines
6.1 KiB
Stylus
#article-container
|
|
if hexo-config('beautify.enable')
|
|
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
|
|
cursor: pointer
|
|
transition: all .2s ease-out
|
|
|
|
&:before
|
|
position: absolute
|
|
top: calc(50% - .35rem)
|
|
color: $title-prefix-icon-color
|
|
content: $title-prefix-icon
|
|
font-style: normal
|
|
font-variant: normal
|
|
line-height: 1
|
|
transition: all .2s ease-out
|
|
text-rendering: auto
|
|
-webkit-font-smoothing: antialiased
|
|
|
|
if hexo-config('fontawesome_v5') && hexo-config('fontawesome_v5.enable')
|
|
font-weight: 600
|
|
font-family: 'Font Awesome 5 Free'
|
|
else
|
|
font-weight: normal
|
|
font-family: FontAwesome
|
|
|
|
&: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
|
|
|
|
p
|
|
margin: 0 0 .5rem
|
|
|
|
ol,
|
|
ul
|
|
padding-left: .5rem
|
|
|
|
li
|
|
position: relative
|
|
margin: .2rem 0
|
|
padding: .1rem .5rem .1rem 1.5rem
|
|
|
|
&:hover
|
|
&:before
|
|
transform: rotate(360deg)
|
|
|
|
&:before
|
|
position: absolute
|
|
top: 0
|
|
left: 0
|
|
background: $light-blue
|
|
color: $card-bg
|
|
cursor: pointer
|
|
transition: all .3s ease-out
|
|
|
|
ol
|
|
> li
|
|
&:before
|
|
margin-top: .2rem
|
|
width: w = 1.2rem
|
|
height: h = w
|
|
border-radius: .5 * w
|
|
content: counter(li)
|
|
counter-increment: li
|
|
text-align: center
|
|
font-size: .6rem
|
|
line-height: h
|
|
|
|
ul
|
|
> li
|
|
&:hover
|
|
&:before
|
|
border-color: $theme-button-hover-color
|
|
|
|
&:before
|
|
$w = .3rem
|
|
top: 10px
|
|
margin-left: .45rem
|
|
width: w = $w
|
|
height: h = w
|
|
border: .5 * w solid $light-blue
|
|
border-radius: w
|
|
background: transparent
|
|
content: ''
|
|
line-height: h
|
|
else
|
|
ol,
|
|
ul
|
|
margin-top: .4rem
|
|
counter-reset: li
|
|
|
|
p
|
|
margin: 0 0 .5rem
|
|
|
|
ol,
|
|
ul
|
|
padding-left: .5rem
|
|
|
|
li
|
|
position: relative
|
|
margin: .3rem 0
|
|
padding-left: .3rem
|
|
|
|
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
|
|
|
|
p
|
|
margin: 0 0 .8rem
|
|
|
|
img
|
|
max-width: 100%
|
|
transition: all .2s
|
|
|
|
// highlight
|
|
.highlight-tools
|
|
.code-expand
|
|
position: absolute
|
|
top: 0
|
|
z-index: 1
|
|
padding: 7px 10px
|
|
color: $highlight-foreground
|
|
cursor: pointer
|
|
transition: all .3s
|
|
transform: rotate(0)
|
|
|
|
& + .code-lang
|
|
left: 30px
|
|
|
|
&.code-closed
|
|
transition: all .3s
|
|
transform: rotate(-90deg) !important
|
|
|
|
.code-lang
|
|
position: absolute
|
|
left: 15px
|
|
z-index: 1
|
|
color: $highlight-foreground
|
|
text-transform: capitalize
|
|
font-weight: bold
|
|
font-size: .8rem
|
|
line-height: 1.4rem
|
|
cursor: pointer
|
|
|
|
.copy-notice
|
|
position: absolute
|
|
top: 0
|
|
right: 0
|
|
z-index: 1
|
|
background: darken($highlight-background, 5)
|
|
color: $highlight-aqua
|
|
opacity: 0
|
|
|
|
.fa-clipboard
|
|
position: absolute
|
|
top: .4rem
|
|
right: 10px
|
|
z-index: 1
|
|
color: $highlight-aqua
|
|
cursor: pointer
|
|
transition: color .2s
|
|
|
|
&:hover
|
|
color: darken($highlight-aqua, 20%)
|
|
|
|
.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: 12px
|
|
cursor: pointer
|
|
transition: all .2s ease-in-out
|
|
|
|
&:hover
|
|
background: $light-blue
|
|
color: $button-color
|
|
|
|
.post_share
|
|
display: inline-block
|
|
float: right
|
|
margin: .4rem 0
|
|
width: fit-content
|
|
|
|
.social-share
|
|
font-size: 12px
|
|
|
|
.social-share-icon
|
|
margin: 0 4px
|
|
width: 26px
|
|
height: 26px
|
|
font-size: 15px
|
|
line-height: 25px
|
|
|
|
.post-copyright
|
|
position: relative
|
|
margin: 2rem 0 .5rem
|
|
padding: .5rem .8rem
|
|
border: 1px solid $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: $white
|
|
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
|
|
a
|
|
color: $theme-link-color
|
|
|
|
&:hover
|
|
text-decoration: underline
|
|
|
|
img
|
|
margin: 0 auto .8rem
|
|
|
|
@media screen and (max-width: 1024px)
|
|
.layout_post
|
|
width: auto
|
|
|
|
@media screen and (max-width: $sm)
|
|
.layout_post
|
|
padding: 1rem 5px
|
|
|
|
& > #post
|
|
padding: 1.8rem .7rem |