基于Butterfly主题的魔改记录
关于背景
首先是背景图片
在_config.butterfly.yml中修改:
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 
 | index_img: ./img/bk.jpg
 
 
 
 background: url(https://raw.githubusercontent.com/Sekka16/Sekka16.github.io/main/source/images/bk.jpg)
 
 
 
 default_top_img: transparent
 
 
 
 footer_bg: transparent
 
 
 | 
透明度设置
butterfly主题的source/css文件夹下新建transparent.css,内容如下
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 
 | .layout_post>#post {
 
 background: rgba(255, 255, 255, .7);
 }
 
 
 #aside_content .card-widget,
 #recent-posts>.recent-post-item,
 .layout_page>div:first-child:not(.recent-posts),
 .layout_post>#page,
 .layout_post>#post,
 .read-mode .layout_post>#post {
 
 background: rgba(255, 255, 255, .7);
 }
 
 
 :root {
 --card-bg: rgba(255, 255, 255, .7);
 }
 
 
 #footer {
 
 background: rgba(255, 255, 255, .0);
 }
 
 | 
之后在_config.butterfly.yml中修改:
| 12
 3
 4
 5
 6
 7
 
 | 
 
 inject:
 head:
 
 - <link rel="stylesheet" href="/css/transparent.css">
 
 |