mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 19:30:54 +08:00
Breaking change 1. 手機端界面卡片化,同時,手機端也可以顯示側邊欄的內容 2. 修復當menu過多時,header界面出現錯亂的bug。當menu過多時,會變為sidebar模式 3. 增加medium-zoom大圖查看模式 4. 增加鼠標點擊特效:文字和愛心 兩個點擊特效 5. 主頁subtitle可以調用第三方api(金山詞霸每日一句、一言網的一句話、一句網、今日詩詞) 6. 添加 snackbar 彈窗 7. 修改nightshift為darkmode,darkmode可隨系統設置而自動切換,可設置隨時間而切換darkmode 8. 修復hexo自帶的標籤外掛(Tag Plugins)顯示bug(Block Quote、Code Block With caption、Gist、Youtube、Vimeo) 9. 主題所需要的css和js可根據需要配置CDN 10. 更改darkmode的加載方式,網站設置dark mode後,現在進入網頁不會在'閃'一下 11. 背景特效和背景圖片在手機界面也會顯示 12. 增加justified-gallery圖片顯示(Tag Plugins) Feature 1. 文章頁面,字數統計、閲讀時長和閲讀量前面添加icon 2. 更改懶加載js 3. 升級typed.js/instantpage.js到最新版 4. 搜索和右下角按鈕添加退出特效 Fixed 1. 修復在 Hexo 4.0.0下,一些按鈕點擊會跳出一個空白頁的bug 2. 修復在 Hexo 4.0.0下,分頁按鈕出現代碼的bug 3. 修復當沒有設置評論時,右下角依舊出現'直達評論'按鈕的bug 4. 優化sidebar的打開速度 5. 修復文章頁標題左右邊距不平等的bug 6. 修復keywords讀取的bug 7. 修復當post/page 內容為空時,footer位置錯亂的bug 8. 修復在手機safari,toc sidebar底部內容被遮擋的bug 9. 完善Dark mode,一些界面的配色 10. 修復 card-archives 查看更多 跳轉bug Remove 1. 移除Gitment 2. 移除Gallery
292 lines
5.5 KiB
Stylus
292 lines
5.5 KiB
Stylus
// https://github.com/equinusocio/vsc-material-theme
|
|
@require "theme"
|
|
@require "diff"
|
|
|
|
wordWrap = !hexo-config("rootConfig.highlight.line_number") && hexo-config("code_word_wrap")
|
|
|
|
$code-block
|
|
overflow: auto
|
|
margin: 1rem 0
|
|
padding: 0
|
|
padding-top: 1.4rem
|
|
background: $highlight-background
|
|
color: $highlight-foreground
|
|
font-size: $code-font-size
|
|
line-height: $line-height-code-block
|
|
|
|
if wordWrap
|
|
counter-reset: line
|
|
white-space: pre-wrap
|
|
|
|
figure.highlight
|
|
position: relative
|
|
|
|
blockquote
|
|
margin: 0
|
|
padding: 0.1rem 0.8rem
|
|
border-left: 0.2rem solid $blockquote-padding-color
|
|
color: $blockquote-color
|
|
background-color: lighten($blockquote-padding-color,33)
|
|
|
|
p
|
|
margin: 0 !important
|
|
padding: 0.5rem 0
|
|
|
|
footer
|
|
padding: 0 0 0.5rem 0
|
|
cite
|
|
&:before
|
|
content: "—"
|
|
padding: 0 .3em
|
|
|
|
.article-container
|
|
pre,
|
|
code
|
|
font-family: $code-font !important
|
|
|
|
code
|
|
padding: 0.1rem 0.2rem
|
|
background: $code-background
|
|
color: $code-foreground
|
|
word-wrap: break-word
|
|
font-size: $code-font-size
|
|
|
|
pre
|
|
@extend $code-block
|
|
|
|
code
|
|
padding: 0
|
|
background: none
|
|
color: $highlight-foreground
|
|
text-shadow: none
|
|
|
|
figure.highlight
|
|
&:after
|
|
position: absolute
|
|
top: 0
|
|
z-index: 0
|
|
min-width: 100%
|
|
height: 1.4rem
|
|
background: darken($highlight-background, 5)
|
|
content: ""
|
|
|
|
.highlight
|
|
@extend $code-block
|
|
position: relative
|
|
border-radius: 1px
|
|
|
|
pre
|
|
margin: 0
|
|
padding: 8px 0
|
|
border: none
|
|
|
|
.line
|
|
&::selection
|
|
background: $highlight-selection
|
|
color: $highlight-foreground
|
|
|
|
if wordWrap
|
|
&:before
|
|
display: inline-block
|
|
padding: 0 0.3rem 0 0
|
|
min-width: 1.6rem
|
|
color: $highlight-gutter.color
|
|
content: counter(line)
|
|
counter-increment: line
|
|
text-align: left
|
|
|
|
table
|
|
position: relative
|
|
margin: 0
|
|
width: auto
|
|
border: none
|
|
|
|
if hexo-config('highlight_shrink') == true
|
|
display: none
|
|
|
|
&:after
|
|
position: absolute
|
|
top: -1.4rem
|
|
z-index: 0
|
|
width: 100%
|
|
height: 1.4rem
|
|
background: darken($highlight-background, 5)
|
|
content: ""
|
|
|
|
td
|
|
padding: 0
|
|
border: none
|
|
|
|
figcaption
|
|
clearfix()
|
|
position: absolute
|
|
z-index: 1
|
|
margin-bottom: 1em
|
|
padding: 0.2em 0 0.2em 0.7rem
|
|
width: 100%
|
|
height: 1.4em
|
|
color: $highlight-foreground
|
|
font-size: 1em
|
|
line-height: 1em
|
|
|
|
span
|
|
float: left
|
|
overflow: hidden
|
|
max-width: 100%
|
|
text-overflow: ellipsis
|
|
white-space: nowrap
|
|
|
|
a
|
|
float: right
|
|
padding-right: 10px
|
|
color: $highlight-foreground
|
|
|
|
&:hover
|
|
border-bottom-color: $highlight-foreground
|
|
|
|
&+table
|
|
margin-top: 1em
|
|
|
|
&:before
|
|
margin-top: -2.1rem
|
|
|
|
&:after
|
|
top: -2.1rem
|
|
|
|
.gutter pre
|
|
padding-right: 0.5rem
|
|
padding-left: 0.5rem
|
|
background-color: $highlight-gutter.bg-color
|
|
color: $highlight-gutter.color
|
|
text-align: right
|
|
|
|
.code pre
|
|
padding-right: 0.5rem
|
|
padding-left: 0.5rem
|
|
width: 100%
|
|
background-color: $highlight-background
|
|
|
|
.line
|
|
height: 1rem
|
|
|
|
.gutter
|
|
user-select: none
|
|
-webkit-user-select: none
|
|
-moz-user-select: none
|
|
-ms-user-select: none
|
|
|
|
.gist table
|
|
width: auto
|
|
|
|
td
|
|
border: none
|
|
|
|
// For diff highlight
|
|
pre .deletion
|
|
background: $highlight-deletion
|
|
|
|
pre .addition
|
|
background: $highlight-addition
|
|
|
|
pre .meta
|
|
color: $highlight-purple
|
|
|
|
pre
|
|
.comment
|
|
color: $highlight-comment
|
|
|
|
&::selection
|
|
background: $highlight-selection
|
|
color: $highlight-foreground
|
|
|
|
.variable,
|
|
.attribute,
|
|
.regexp,
|
|
.ruby .constant,
|
|
.xml .tag .title,
|
|
.xml .pi,
|
|
.xml .doctype,
|
|
.html .doctype,
|
|
.css .id,
|
|
.tag .name,
|
|
.css .class,
|
|
.css .pseudo
|
|
color: $highlight-red
|
|
|
|
&::selection
|
|
background: $highlight-selection
|
|
color: $highlight-foreground
|
|
|
|
.tag
|
|
color: $highlight-aqua
|
|
|
|
&::selection
|
|
background: $highlight-selection
|
|
color: $highlight-foreground
|
|
|
|
.number,
|
|
.preprocessor,
|
|
.literal,
|
|
.params,
|
|
.constant,
|
|
.command
|
|
color: $highlight-orange
|
|
|
|
&::selection
|
|
background: $highlight-selection
|
|
color: $highlight-foreground
|
|
|
|
.built_in
|
|
color: $highlight-yellow
|
|
|
|
&::selection
|
|
background: $highlight-selection
|
|
color: $highlight-foreground
|
|
|
|
.ruby .class .title,
|
|
.css .rules .attribute,
|
|
.string,
|
|
.value,
|
|
.inheritance,
|
|
.header,
|
|
.ruby .symbol,
|
|
.xml .cdata,
|
|
.special,
|
|
.number,
|
|
.formula
|
|
color: $highlight-green
|
|
|
|
&::selection
|
|
background: $highlight-selection
|
|
color: $highlight-foreground
|
|
|
|
.keyword,
|
|
.title,
|
|
.css .hexcolor
|
|
color: $highlight-aqua
|
|
|
|
&::selection
|
|
background: $highlight-selection
|
|
color: $highlight-foreground
|
|
|
|
.function,
|
|
.python .decorator,
|
|
.python .title,
|
|
.ruby .function .title,
|
|
.ruby .title .keyword,
|
|
.perl .sub,
|
|
.javascript .title,
|
|
.coffeescript .title
|
|
color: $highlight-blue
|
|
|
|
&::selection
|
|
background: $highlight-selection
|
|
color: $highlight-foreground
|
|
|
|
.tag .attr,
|
|
.javascript .function
|
|
color: $highlight-purple
|
|
|
|
&::selection
|
|
background: $highlight-selection
|
|
color: $highlight-foreground |