mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +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
468 lines
7.8 KiB
Stylus
468 lines
7.8 KiB
Stylus
if hexo-config("post_beautify.enable")
|
|
headStyle(fontsize)
|
|
padding-left: unit(fontsize + 0.3, "rem")
|
|
|
|
code
|
|
font-size: unit(fontsize, "rem")
|
|
|
|
&:before
|
|
top: calc(50% - unit(fontsize / 2 - 0.05, "rem"))
|
|
font-size: unit(fontsize, "rem")
|
|
|
|
&:hover
|
|
padding-left: unit(fontsize + 0.2, "rem")
|
|
|
|
|
|
#post-title
|
|
font-size: 1.4rem
|
|
|
|
#post
|
|
overflow: hidden
|
|
|
|
&-meta
|
|
text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
|
|
|
|
#post-meta
|
|
color: $grey
|
|
|
|
a
|
|
text-decoration: none
|
|
|
|
i.fa.fa-comment-o
|
|
margin-right: 0.2rem
|
|
|
|
#top-container
|
|
position: relative
|
|
margin-bottom: 1rem
|
|
background-color: $light-blue
|
|
background-attachment: local
|
|
background-position: center
|
|
background-size: cover
|
|
height: 19rem
|
|
|
|
&:before
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
content: '';
|
|
width: 100%;
|
|
height: 100%;
|
|
opacity: 0.5;
|
|
background-color: #394245;
|
|
background-image: linear-gradient(234deg, #394245 0%, #000 100%);
|
|
|
|
a
|
|
color: $light-grey
|
|
text-decoration: none
|
|
transition: all 0.3s ease-out
|
|
|
|
&:hover
|
|
color: $white
|
|
|
|
#top-img
|
|
padding: 0
|
|
border: none
|
|
|
|
#site-name
|
|
font-weight: bold
|
|
cursor: pointer
|
|
|
|
#post-info
|
|
width: 100%
|
|
color: $light-grey
|
|
text-align: left
|
|
padding: 0 8%
|
|
position: absolute
|
|
bottom: 1.5rem
|
|
|
|
#post-title
|
|
text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
|
|
font-size: 1.5rem
|
|
margin-bottom: 0.4rem
|
|
|
|
.posttitle
|
|
line-height: 1.5
|
|
|
|
i.fa.fa-angle-right
|
|
margin: 0 0.3rem 0 0.2rem
|
|
|
|
.post-meta
|
|
&__separator
|
|
margin: 0 0.3rem
|
|
|
|
&__icon
|
|
margin-right: 0.2rem
|
|
|
|
&__tags
|
|
display: inline-block
|
|
width: fit-content
|
|
margin: 0.4rem 0.4rem 0.4rem 0
|
|
padding: 0rem 0.6rem
|
|
border: 1px solid $light-blue
|
|
border-radius: 0.6rem
|
|
background: $white
|
|
color: $light-blue
|
|
text-decoration: none
|
|
font-size: 12px
|
|
cursor: pointer
|
|
transition: all 0.2s ease-in-out
|
|
|
|
&:hover
|
|
background: $light-blue
|
|
color: $white
|
|
|
|
|
|
#post-content
|
|
|
|
if hexo-config("post_beautify.enable")
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6
|
|
cursor: pointer
|
|
transition: all 0.2s ease-out
|
|
|
|
&:before
|
|
position: absolute
|
|
top: calc(50% - 0.35rem)
|
|
left: 0
|
|
color: $title-prefix-icon-color
|
|
content: $title-prefix-icon
|
|
font: normal normal normal 14px / 1 FontAwesome
|
|
font-size: 0.8rem
|
|
transition: all 0.2s ease-out
|
|
|
|
&:hover
|
|
padding-left: 1.1rem
|
|
|
|
&:before
|
|
color: $light-blue
|
|
|
|
h1
|
|
headStyle(1)
|
|
|
|
h2
|
|
headStyle(0.9)
|
|
|
|
h3
|
|
headStyle(0.8)
|
|
|
|
h4
|
|
headStyle(0.7)
|
|
|
|
h5
|
|
headStyle(0.6)
|
|
|
|
h6
|
|
headStyle(0.6)
|
|
|
|
ol,
|
|
ul
|
|
margin-top: 0.4rem
|
|
padding: 0 0 0 0.8rem
|
|
list-style: none
|
|
counter-reset: li
|
|
|
|
p
|
|
margin: 0
|
|
|
|
ol,
|
|
ul
|
|
padding-left: 0.5rem
|
|
|
|
li
|
|
position: relative
|
|
margin: 0.2rem 0
|
|
padding: 0.1rem 0.5rem 0.1rem 1.5rem
|
|
|
|
&:hover
|
|
&:before
|
|
transform: rotate(360deg)
|
|
|
|
&:before
|
|
position: absolute
|
|
top: 0
|
|
left: 0
|
|
background: $light-blue
|
|
color: $white
|
|
cursor: pointer
|
|
transition: all 0.3s ease-out
|
|
|
|
ol
|
|
> li
|
|
&:before
|
|
margin-top: 0.2rem
|
|
width: w = 1.2rem
|
|
height: h = w
|
|
border-radius: 0.5 * w
|
|
content: counter(li)
|
|
counter-increment: li
|
|
text-align: center
|
|
font-size: 0.6rem
|
|
line-height: h
|
|
|
|
ul
|
|
> li
|
|
&:hover
|
|
&:before
|
|
border-color: $ruby
|
|
|
|
&:before
|
|
$w = 0.3rem
|
|
top: 10px
|
|
margin-left: 0.45rem
|
|
width: w = $w
|
|
height: h = w
|
|
border: 0.5 * w solid $light-blue
|
|
border-radius: w
|
|
background: $white
|
|
content: ""
|
|
line-height: h
|
|
|
|
else
|
|
ol,
|
|
ul
|
|
margin-top: 0.4rem
|
|
counter-reset: li
|
|
|
|
p
|
|
margin: 0
|
|
|
|
ol,
|
|
ul
|
|
padding-left: 0.5rem
|
|
|
|
li
|
|
position: relative
|
|
margin: 0.3rem 0
|
|
padding-left: 0.3rem
|
|
|
|
a
|
|
color: $a-link-color
|
|
transition: all 0.2s
|
|
|
|
&:hover
|
|
color: $light-blue
|
|
text-decoration: none
|
|
|
|
&#site-name
|
|
text-decoration: none
|
|
|
|
a.fancybox
|
|
outline: none
|
|
|
|
&:focus
|
|
outline: none
|
|
|
|
display: inline-block
|
|
width: 100%
|
|
text-align: center
|
|
text-decoration: none
|
|
|
|
img
|
|
padding: $img-border-padding
|
|
max-width: 100%
|
|
transition: all 0.2s
|
|
|
|
&:hover
|
|
box-shadow: 0 0 8px 0 rgba(232, 237, 250, 0.6), 0 2px 4px 0 rgba(232, 237, 250, 0.5)
|
|
|
|
.code-area-wrap
|
|
position: relative
|
|
|
|
.fa-clipboard
|
|
position: absolute
|
|
top: 0.4rem
|
|
right: 10px
|
|
z-index: 1
|
|
color: $highlight-aqua
|
|
cursor: pointer
|
|
transition: color 0.2s
|
|
|
|
&:hover
|
|
color: darken($highlight-aqua, 20%)
|
|
|
|
.code_lang
|
|
position: absolute
|
|
font-weight: bold;
|
|
font-size: 0.8rem;
|
|
line-height: 1.4rem;
|
|
color: $highlight-foreground
|
|
left: 30px
|
|
z-index: 1
|
|
cursor: pointer
|
|
|
|
.code-expand
|
|
position: absolute
|
|
top: 0
|
|
color: $highlight-foreground
|
|
padding: 7px 10px
|
|
z-index: 1
|
|
cursor: pointer
|
|
transition: all .3s
|
|
transform: rotate(0deg)
|
|
|
|
.code-closed
|
|
transform: rotate(-90deg) !important
|
|
transition: all .3s
|
|
|
|
|
|
.copy-notice
|
|
position: absolute
|
|
top: 0
|
|
right: 0
|
|
z-index: 1
|
|
background: darken($highlight-background, 5)
|
|
color: $highlight-aqua
|
|
opacity: 0
|
|
|
|
.post-copyright
|
|
position: relative
|
|
margin: 1rem 0 0.5rem 0
|
|
padding: 0.5rem 0.8rem
|
|
border: 1px solid $light-grey
|
|
transition: box-shadow 0.3s ease-in-out
|
|
|
|
&:before
|
|
position: absolute
|
|
top: t = 0.5rem
|
|
right: t
|
|
width: w = 0.8rem
|
|
height: w
|
|
border-radius: w
|
|
background: $light-blue
|
|
content: ""
|
|
|
|
&:after
|
|
position: absolute
|
|
top: t = 0.7rem
|
|
right: t
|
|
width: w = 0.4rem
|
|
height: w
|
|
border-radius: w
|
|
background: $white
|
|
content: ""
|
|
|
|
&:hover
|
|
box-shadow: 0 0 8px 0 rgba(232, 237, 250, 0.6), 0 2px 4px 0 rgba(232, 237, 250, 0.5)
|
|
|
|
&-meta
|
|
color: $light-blue
|
|
font-weight: bold
|
|
|
|
&-info
|
|
a
|
|
word-break: break-word
|
|
|
|
|
|
@media screen and (max-width: $sm)
|
|
#top-container
|
|
#post-title
|
|
font-size: 1rem
|
|
|
|
#post-title
|
|
font-size: 1.1rem
|
|
|
|
|
|
@media screen and (min-width: $md)
|
|
.layout_post
|
|
width: $content-large-width
|
|
|
|
.katex-wrap
|
|
overflow: auto
|
|
if hexo-config("katex") && hexo-config("katex.hide_scrollbar")
|
|
&::-webkit-scrollbar
|
|
display: none
|
|
|
|
|
|
// 文章字體
|
|
#post-content p
|
|
font-size: 1.1em
|
|
|
|
|
|
#post-content ol,
|
|
#post-content ul
|
|
font-size: 1em
|
|
|
|
|
|
|
|
.layout_post
|
|
padding: 50px
|
|
box-shadow: 0 4px 8px 6px rgba(7,17,27,0.06)
|
|
border-radius: 8px
|
|
transition: all 0.3s
|
|
background: #fff
|
|
margin: 40px auto
|
|
max-width: 1000px
|
|
|
|
&:hover
|
|
box-shadow: 0 4px 12px 12px rgba(7,17,27,0.15)
|
|
|
|
img
|
|
display:block
|
|
|
|
.tag_share
|
|
display: block
|
|
|
|
.post-meta__tag-list
|
|
display: inline-block
|
|
|
|
.post_share
|
|
width: fit-content;
|
|
display: inline-block;
|
|
float: right;
|
|
margin: 0.4rem 0
|
|
|
|
.social-share
|
|
font-size: 12px
|
|
|
|
.social-share .social-share-icon
|
|
width: 26px;
|
|
height: 26px;
|
|
font-size: 15px;
|
|
line-height: 25px;
|
|
|
|
.social-share a
|
|
margin: 0 4px;
|
|
|
|
|
|
#post
|
|
a
|
|
text-decoration: none
|
|
color: $light-blue
|
|
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6
|
|
margin: 1rem 0 0.8rem 0
|
|
|
|
img
|
|
margin: 0 auto 0.8rem
|
|
|
|
blockquote,
|
|
p
|
|
margin: 0 0 0.8rem 0
|
|
|
|
iframe,.note
|
|
margin: 0 0 0.8rem 0
|
|
|
|
.layout_post,
|
|
.layout_page
|
|
opacity: 1
|
|
|
|
@media screen and (max-width: 1024px)
|
|
.layout_post
|
|
margin: 0 15px
|
|
width: auto
|
|
|
|
@media screen and (max-width:768px)
|
|
.layout_post
|
|
padding: 1.8rem 1rem
|
|
margin: 30px 5px
|