將主題內的配置檔 /themes/butterfly/_config.yml
複製到根目錄 /
,並重新命名成 _config.butterfly.yml
,這樣根目錄的配置檔案設定會覆蓋主題內的配置檔案設定,在升級主題時比較好升級。
/source/css/_global/index.styl
// 滾動條
*::-webkit-scrollbar
width: 12px
height: 12px
// 滾動條背景
*::-webkit-scrollbar-track
background-color: transparent
// 滾動條背景: 懸停
::-webkit-scrollbar-track:hover
// 滾動條方塊
*::-webkit-scrollbar-thumb
background: var(--btn-bg)
border-radius: 8px
// 滾動條方塊: 懸停
*::-webkit-scrollbar-thumb:hover
background-color: var(--btn-hover-color)
// 滾動條方塊: 點擊
*::-webkit-scrollbar-thumb:active
顏色取代
個別調整
[data-theme='dark']
// 調整 1
--card-bg: lighten(#2F3437, 5)
// 調整 2
--btn-bg: lighten(#2F3437, 10)
#page-header:before
// 調整 3
background-color: darken(#2F3437, 2)
#article-container
figure.highlight
box-shadow: none
.highlight-tools
// 調整 4
background: lighten(#2F3437, 0) !important
個別調整
if hexo-config('readmode')
[data-theme='dark']
.read-mode
--readmode-light-color: darken(#2F3437, 2)
讓卡片經過判斷後產生
/themes/butterfly/layout/includes/widget/index.pug
<!-- 刪除 -->
#aside_content.aside_content
- if theme.aside.card_author.enable
- !=partial('includes/widget/card_author', {}, {cache:theme.fragment_cache})
- if theme.aside.card_announcement.enable
- !=partial('includes/widget/card_announcement', {}, {cache:theme.fragment_cache})
.sticky_layout
<!-- 新增 -->
else
+ if theme.aside.card_author.enable
+ !=partial('includes/widget/card_author', {}, {cache:theme.fragment_cache})
+ if theme.aside.card_announcement.enable
+ !=partial('includes/widget/card_announcement', {}, {cache:theme.fragment_cache})
if theme.aside.card_recent_post.enable
!=partial('includes/widget/card_recent_post', {}, {cache:theme.fragment_cache})