本篇为美化教程的合集

自定义CSS

参考了安知鱼的方案进行修改
原教程butterfly 重装日记

1
2
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
/* 滚动条 */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background-color: rgba(73, 177, 245, 0.2);
border-radius: 2em;
}
::-webkit-scrollbar-thumb {
background-color: #49b1f5;
background-image: -webkit-linear-gradient(
45deg,
rgba(255, 255, 255, 0.4) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, 0.4) 50%,
rgba(255, 255, 255, 0.4) 75%,
transparent 75%,
transparent
);
border-radius: 2em;
}
::-webkit-scrollbar-corner {
background-color: transparent;
}
::-moz-selection {
color: #fff;
background-color: #49b1f5;
}

/* 音乐播放器 */
/* .aplayer .aplayer-lrc {
display: none !important;
} */
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body {
left: -66px !important;
transition: all 0.3s;
/* 默认情况下缩进左侧66px,只留一点箭头部分 */
}
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body:hover {
left: 0 !important;
transition: all 0.3s;
/* 鼠标悬停是左侧缩进归零,完全显示按钮 */
}
.aplayer.aplayer-fixed {
z-index: 999999 !important;
}

/* bilibli番剧插件 */
.bangumi-active {
background: #dbecfe !important;
border-radius: 10px !important;
}
a.bangumi-tab:hover {
text-decoration: none !important;
}
.bangumi-button:hover {
background: #dbecfe !important;
border-radius: 10px !important;
}
a.bangumi-button.bangumi-nextpage:hover {
text-decoration: none !important;
}
.bangumi-button {
padding: 5px 10px !important;
}
a.bangumi-tab {
padding: 5px 10px !important;
}
svg.icon.faa-tada {
font-size: 1.1em;
}

/*top-img黑色透明玻璃效果移除,不建议加,除非你执着于完全一图流或者背景图对比色明显 */
/* #page-header:not(.not-top-img):before {
background-color: transparent !important;
} */

/* 页脚透明 */
#footer {
background: transparent !important;
}

/* 头图透明 */
#page-header {
background: transparent !important;
}

/* 鼠标指针 */
/* 全局默认鼠标指针 */
body,html,.post-meta-date{
cursor: url(/cur/arrow.cur),auto !important;
}
/* 悬停图片时的鼠标指针 */
img{
cursor: url(/cur/link.cur),auto !important;
}
/* 选择链接标签时的鼠标指针 */
a:hover{
cursor: url(/cur/link.cur),auto !important;
}
/* 选中输入框时的鼠标指针 */
#veditor,input:hover{
cursor: url(/cur/input.cur),auto !important;
}
/* 悬停按钮时的鼠标指针 */
button:hover{
cursor: url(/cur/link.cur),auto !important;
}
.reward-button{
cursor: url(/cur/link.cur),auto !important;
}
.swiper-pagination-bullet{
cursor: url(/cur/link.cur),auto !important;
}
#site-name:hover::after{
cursor: url(/cur/link.cur),auto !important;
}
.vcol.vcol-40.vctrl.text-right>span,
.folding-tag>summary,
#scroll-down{
cursor: url(/cur/link.cur),auto !important;
}
.toc-item.toc-level-1,
.code-expand-btn,
.code-expand-btn.expand-done{
cursor: url(/cur/link.cur),auto !important;
}
/* 悬停列表标签时的鼠标指针 */
i:hover{
cursor: url(/cur/link.cur),auto !important;
}
category-list-item::before{
cursor: url(/cur/arrow.cur),auto !important;
}
#aside-content .aside-list > .aside-list-item:hover{
cursor: url(/cur/link.cur),auto !important;
}
/* 悬停页脚链接标签(例如页脚徽标)时的鼠标指针 */
#footer-wrap a:hover{
cursor: url(/cur/link.cur),auto !important;
}
/* 悬停页码时的鼠标指针 */
#pagination .page-number:hover{
cursor: url(/cur/btn.cur),auto !important;
}
/* 悬停菜单栏时的鼠标指针 */
#nav .site-page:hover{
cursor: url(/cur/link.cur),auto !important;
}
/* 音乐播放器 */
.aplayer-pic,
.aplayer-list,
.aplayer-bar,
.aplayer-volume-bar,
.aplayer-volume,
.aplayer-icon,
.aplayer-thumb{
cursor: url(/cur/link.cur),auto !important;
}
div>div>ol>li{
cursor: url(/cur/link.cur),auto !important;
}
.aplayer-music{
cursor: url(/cur/arrow.cur),auto !important;
}

/* 代码框主题 */
#article-container figure.highlight {
border-radius: 10px;
}

/*哔哩哔哩视频适配*/
.aspect-ratio {position: relative;width: 100%;height: 0;padding-bottom: 75%;margin: 3% auto;text-align: center;}
.aspect-ratio iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}

svg.icon {
width: 1em; height: 1em;
/* width和height定义图标的默认宽度和高度*/
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}

/* md网站下划线 */
#article-container a:hover {
text-decoration: none !important;
}

/* 归档样式 */
span.card-archive-list-count {
width: auto;
text-align: left;
font-size: 1.5rem;
line-height: 0.9;
font-weight: 700;
}
.card-archive-list-count-group {
display: flex;
flex-direction: row;
align-items: baseline;
}
#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a span:last-child {
width: fit-content;
margin-left: 4px;
}
span.card-archive-list-count {
width: auto;
text-align: left;
font-size: 1.1rem;
line-height: 0.9;
font-weight: 700;
}
.card-archive-list-date {
font-size: 14px;
opacity: 0.6;
}
li.card-archive-list-item {
width: 100%;
flex: 0 0 48%;
}
#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a:hover {
color: white;
background-color: #5CA1FF;
border-color: #5CA1FF;
box-shadow: 0px 0px 5px #5CA1FF;
border-radius: 8px;
padding-left: 0.5rem;
padding-right: 0.5rem;
}
@media screen and (min-width: 1300px) {
#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a:hover {
transform: scale(1.03);
}
#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a:active {
transform: scale(0.97);
}
}
#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a {
border-radius: 8px;
margin: 4px 0;
display: flex;
border-style: solid;
flex-direction: column;
align-content: space-between;
border-color: #cdd1e0;
}
#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a span:first-child {
width: auto;
flex: inherit;
}
#aside-content .card-archives ul.card-archive-list {
display: flex;
flex-direction: row;
justify-content: space-between;
flex-wrap: wrap;
}

/* 最新文章样式 */
#aside-content .aside-list > .aside-list-item .content > time {
display: none;
}
#aside-content .aside-list > .aside-list-item .content > .title {
-webkit-line-clamp: 3;
font-weight: 700;
padding: 2px 0;
}
#aside-content .aside-list > .aside-list-item {
padding: 8px;
padding-top: 6px !important;
padding-bottom: 6px !important;
border-radius: 12px;
transition: 0.3s;
margin: 4px 0;
cursor: pointer;
}
@media screen and (min-width: 1300px) {
#aside-content .aside-list > .aside-list-item:hover {
transform: scale(1.03);
}
#aside-content .aside-list > .aside-list-item:active {
transform: scale(0.97);
}
}
#aside-content .aside-list > .aside-list-item:hover .thumbnail > img {
transform: scale(1);
}
#aside-content .aside-list > .aside-list-item:not(:last-child) {
border-bottom: 0 dashed #5CA1FF !important;
}
#aside-content .aside-list > .aside-list-item .thumbnail {
border-radius: 8px;
border: var(--style-border);
}
#aside-content .aside-list > .aside-list-item:hover {
background: #5CA1FF;
color: white;
transition: 0.3s;
box-shadow: 0px 0px 5px #5CA1FF;
}
#aside-content .aside-list > .aside-list-item:hover a {
color: white !important;
}
.card-widget.card-recent-post {
padding: 0.4rem 0.6rem !important;
}

/* 404页面 */
#error-wrap {
position: absolute;
top: 40%;
right: 0;
left: 0;
margin: 0 auto;
padding: 0 1rem;
max-width: 1000px;
transform: translate(0, -50%);
}
#error-wrap .error-content {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
margin: 0 1rem;
height: 18rem;
border-radius: 8px;
background: #5CA1FF;
box-shadow: 0px 0px 5px #5CA1FF;
transition: all 0.3s;
}
#error-wrap .error-content .error-img {
box-flex: 1;
flex: 1;
height: 100%;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
background-color: #5CA1FF;
background-position: center;
background-size: cover;
}
#error-wrap .error-content .error-info {
box-flex: 1;
flex: 1;
padding: 0.5rem;
text-align: center;
font-size: 14px;
font-family: Titillium Web, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft JhengHei', 'Microsoft YaHei', sans-serif;
}
#error-wrap .error-content .error-info .error_title {
margin-top: -4rem;
font-size: 9em;
}
#error-wrap .error-content .error-info .error_subtitle {
margin-top: -3.5rem;
word-break: break-word;
font-size: 1.6em;
}
#error-wrap .error-content .error-info a {
display: inline-block;
margin-top: 0.5rem;
padding: 0.3rem 1.5rem;
background: var(--btn-bg);
color: var(--btn-color);
}
#body-wrap.error .aside-list {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
bottom: 0px;
position: absolute;
padding: 1rem;
width: 100%;
overflow: scroll;
}
#body-wrap.error .aside-list .aside-list-group {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
max-width: 1200px;
margin: 0 auto;
}
#body-wrap.error .aside-list .aside-list-item {
padding: 0.5rem;
}
#body-wrap.error .aside-list .aside-list-item img {
width: 100%;
object-fit: cover;
border-radius: 12px;
}
#body-wrap.error .aside-list .aside-list-item .thumbnail {
overflow: hidden;
width: 230px;
height: 143px;
background: var(--heo-card-bg);
display: flex;
}
#body-wrap.error .aside-list .aside-list-item .content .title {
-webkit-line-clamp: 2;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
line-height: 1.5;
justify-content: center;
align-items: flex-end;
align-content: center;
padding-top: 0.5rem;
color: #5CA1FF;
}
#body-wrap.error .aside-list .aside-list-item .content time {
display: none;
}

/* 浮动特效 */
.wowpanels {
transition: all .4s cubic-bezier(.39,.575,.565,1);
}

/* 页面大小 */
/* 电脑端 */
.layout{
max-width:1450px;
}
body,html,.post-meta-date{
font-weight: 700;
}
.recent-posts{
min-width: 1100px;
}
.layout > #post,#page,#category{
min-width: 1100px;
}
/* 手机端 */
@media screen and (max-width: 768px) {
.layout{
max-width: 100%;
}
.recent-posts,#page-header{
min-width: 100%;
}
.layout > #post,#page,#category{
min-width: 100%;
}
}

/* 弹窗样式 */
.swal-modal .swal-text {
font-size: 22px;
text-align: center;
}

/* 页脚颜色 */
.copyright {
color: aqua;
}
.framework-info {
color: aqua;
}
#footer #footer-wrap .framework-info a {
color: orange;
}

/* 个人卡片渐变色 */
#aside-content > .card-widget.card-info {
background: linear-gradient(-45deg, #5CA1FF, #031764, #150136, #67044d);
background-size: 400%;
box-shadow: 0 0 1px black;
animation: gradient 15s ease infinite;
position: relative;
color: white;
}
.site-data > a .headline,.site-data > a .length-num {
color: white;
}
#aside-content > .card-widget.card-info > #card-info-btn{
border-radius: 5px;
background: #425aef;
}

/* 按钮颜色 */
#rightside #rightside-config-show button{
background: #425aef;
}
#rightside #rightside-config-hide button{
background: #425aef;
}
#rightside #rightside-config-hide a{
background: #425aef;
}

站点动态标题

参考了安知鱼的方案进行修改
原教程butterfly 重装日记

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//动态标题
var OriginTitile = document.title;
var titleTime;
document.addEventListener('visibilitychange', function () {
if (document.hidden) {
//离开当前页面时标签显示内容
document.title = 'w(゚Д゚)w 不要走!再看看嘛!';
clearTimeout(titleTime);
} else {
//返回当前页面时标签显示内容
document.title = '♪(^∇^*)欢迎回来!' + OriginTitile;
//两秒后变回正常标题
titleTime = setTimeout(function () {
document.title = OriginTitile;
}, 1000);
}
});

加载渐变条

引入以下css

1
2
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.pace {
-webkit-pointer-events: none;
pointer-events: none;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
z-index: 2000;
position: fixed;
margin: auto;
top: 10px;
left: 0;
right: 0;
height: 8px;
border-radius: 8px;
width: 4rem;
background: #eaecf2;
border: 1px #e3e8f7;
overflow: hidden
}

.pace-inactive .pace-progress {
opacity: 0;
transition: .3s ease-in
}

.pace .pace-progress {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
max-width: 200px;
position: absolute;
z-index: 2000;
display: block;
top: 0;
right: 100%;
height: 100%;
width: 100%;
background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
animation: gradient 1.5s ease infinite;
background-size: 200%
}

.pace.pace-inactive {
opacity: 0;
transition: .3s;
top: -8px
}

@keyframes gradient {
0% {
background-position: 0% 50%;
}

50% {
background-position: 100% 50%;
}

100% {
background-position: 0% 50%;
}
}

修改[Blogroot]\_config.butterfly.yml的inject配置项

1
2
3
4
inject:
head:
- <script data-pjax src="//npm.elemecdn.com/pace-js@1.2.4/pace.min.js"></script>
bottom:

文章链接转码

1
npm install hexo-abbrlink --save

在hexo配置文件或主题配置文件中添加

1
2
3
abbrlink:
alg: crc32 #算法: crc16(default) and crc32
rep: hex #进制: dec(default) and hex: dec #输出进制:十进制和十六进制,默认为10进制。丨dec为十进制,hex为十六进制

文章双栏

1
npm install hexo-butterfly-article-double-row --save

在hexo配置文件或主题配置文件中添加

1
2
butterfly_article_double_row:
enable: true