参考教程

替换footer.pug

在themes/butterfly/layout/includes/footer.pug中替换即可

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
 
#footer_button
ul.buttons
li.icon.QQ
span.bubble QQ
a(href='')
i.fa-brands.fa-qq
li.icon.Email
span.bubble Email
a(href='mailto:')
i.fa-solid.fa-envelope
img.footer_mini_logo.entered.loading(style="border-radius:50%" src='/img/avatar.jpg' onclick="btf.scrollToDest(0,500)" title="返回顶部")
li.icon.steam
span.bubble Steam
a(href='https://steamcommunity.com/profiles/76561199220910224')
i.fa-brands.fa-steam
li.icon.github
span.bubble Github
a(href='https://github.com/wemissleexc')
i.fab.fa-github

#footer-wrap
#footer-group-container
.footer-group
span.footer-group-title= '导航'
a.footer-group-item(href="https://home.beerlee.cn") 我的主页
a.footer-group-item(href="/essay") 个人动态
a.footer-group-item(href="/archives") 文章总览
.footer-group
span.footer-group-title= '分类'
a.footer-group-item(href=url_for(config.category_dir) + '/学习笔记/')= '学习笔记'
a.footer-group-item(href=url_for(config.category_dir) + '/魔改教程/')= '魔改教程'
a.footer-group-item(href=url_for(config.category_dir) + '/分享转载/')= '分享转载'
a.footer-group-item(href=url_for(config.category_dir) + '/作品案例/')= '作品案例'
.footer-group
span.footer-group-title= '关于'
a.footer-group-item(href='/notice/')= '博客统计'
a.footer-group-item(href='/update/')= '更新日志'
a.footer-group-item(href="/comments/")= '给我留言'
.footer-group
span.footer-group-title= '推荐'
a.footer-group-item(href="/websites") 网站簿
a.footer-group-item(href="/recommend") 安利馆
a.footer-group-item(href="/bangumis") 追番页
a.footer-group-item(href="/games") 游戏录
.footer-group#footer-group-flink
span.footer-group-title= '友链'
i.fas.fa-sync(title="随机友链" onclick="eurkon.footerRandomFlink(flinks, 3);")
a.footer-group-item(href="/link") 友链

.footer-group
span.footer-group-title= '协议'
a.footer-group-item(href="/agreement") 用户协议
a.footer-group-item(href="/privacy") 隐私条款

#footer-banner
#footer-banner-container
.footer-banner
if theme.footer.owner.enable
- var now = new Date()
- var nowYear = now.getFullYear()
if theme.footer.owner.since && theme.footer.owner.since != nowYear
.copyright!= `Copyright © ${theme.footer.owner.since} - ${nowYear} By ${config.author}.`
else
.copyright!= `Copyright © ${nowYear} By ${config.author}.`
if theme.footer.copyright
.footer-banner
.framework-info
span= _p('footer.framework') + ' '
a(href='https://hexo.io')= 'Hexo'
span.footer-separator |
span= _p('footer.theme') + ' '
a(href='https://github.com/jerryc127/hexo-theme-butterfly')= 'Butterfly 4.90'
if theme.footer.custom_text
.footer_custom_text!=`${theme.footer.custom_text}`
.footer-banner
a(href='https://beian.miit.gov.cn')!= ''
a(href='http://creativecommons.org/licenses/by-nc-sa/4.0/' title=" CC协议" )
i.fab.fa-creative-commons

添加并引入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
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
/* 页脚 */
#footer {
background: linear-gradient(180deg, transparent 0, var(--card-bg) 60%);
}

#footer::before {
display: none;
}

#footer #footer-wrap {
padding: 0;
color: var(--text-highlight-color);
}

#footer #footer-banner {
background: var(--tab-botton-bg);
border: var(--card-border);
}

#footer #footer-banner #footer-banner-container a {
margin: 0 .5rem;
font-weight: bold;
}

#footer #footer-banner #footer-banner-container {
padding: 1rem;
margin: 0 auto;
display: flex;
justify-content: space-between !important;
}

#footer-wrap a {
color: var(--text-highlight-color);
}

#footer-wrap a:hover {
color: var(--theme-color) !important;
}

#footer #footer-group-container {
display: flex;
margin: 1rem auto;
}

#footer #footer-group-container .footer-group {
margin: 0 auto;
min-width: 100px;
max-width: 185px;
}

#footer #footer-group-container .footer-group .footer-group-title {
display: block;
font-size: 1.2rem;
font-weight: bold;
}

#footer #footer-group-container .footer-group .footer-group-item {
display: block;
}

#footer #footer-group-container .footer-group#footer-group-flink .footer-group-title i {
font-size: 80%;
margin-left: .3em;
opacity: .8;
cursor: var(--pointer-cursor), pointer !important;
}

#footer #footer-social-container {
justify-content: center;
display: flex;
align-items: center;
}

#footer #footer-social-container .footer-social-img {
width: 55px;
height: 55px;
margin: 0 2%;
border-radius: 50%;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}

#footer #footer-social-container .footer-social-icon {
font-size: 1.5rem;
line-height: 1.5rem;
margin: 0 1.5%;
color: var(--text-highlight-color);
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}

#footer #footer-social-container .footer-social-img:hover {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1);
}

@media (max-width: 768px) {

#footer #footer-group-container,
#footer #footer-social-container {
display: none;
}

#footer #footer-banner #footer-banner-container {
display: block;
}
}

/* 页脚按钮 */
#footer_button {
display: grid;
justify-items: center;
align-items: center;
margin: 0;
padding: 2rem 0 0 0;
}

#footer_button i {
font-size: 1.6rem;
transition: .3s;
line-height: 1.3rem;
height: 1.3rem;
}

.buttons {
display: grid;
width: 50%;
padding: 0;
justify-items: center;
align-items: center;
grid-template-columns: repeat(5,1fr);
}

.buttons .icon {
display: grid;
justify-items: center;
align-items: center;
background: rgba(255, 255, 255, 0.4);
border-radius: 50%;
padding: 5px;
margin: 0px;
width: 50px;
height: 50px;
box-shadow: 1px 10px 10px 1px rgba(0, 0, 0, 0.1);
cursor: pointer;
transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.buttons a {
display: block;
height: 28px;
width: 26px;
font-size:18px;
line-height: 35px;
color: var(--font-color);
}

.buttons .bubble {
position: absolute;
top: 0;
font-size: 14px;
background: #ffffff;
color: #ffffff;
padding: 5px 8px;
border-radius: 5px;
box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
opacity: 0;
pointer-events: none;
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.buttons .bubble::before {
position: absolute;
content: "";
height: 8px;
width: 8px;
background: #ffffff;
bottom: -4px;
left: 50%;
transform: translate(-50%) rotate(45deg);
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.buttons .icon:hover .bubble {
top: -15px;
opacity: 1;
visibility: visible;
pointer-events: auto;
}

.buttons .icon:hover span,
.buttons .icon:hover .bubble {
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1);
}

.buttons .Email:hover,
.buttons .Email:hover .bubble,
.buttons .Email:hover .bubble::before {
background: #1877F2;
color: #ffffff;
}
.buttons .Email:hover a {
color: #ffffff;
}

.buttons .QQ:hover,
.buttons .QQ:hover .bubble,
.buttons .QQ:hover .bubble::before {
background: #f30404;
color: #ffffff;
}
.buttons .QQ:hover a {
color: #ffffff;
}


img.footer_mini_logo {
width: 50px;
height: 50px;
margin: 0 1rem;
filter: drop-shadow(0 0 8px #39c5bb)!important;
cursor: pointer;
transition: cubic-bezier(0, 0, 0, 1.29) .5s

}

.buttons .github:hover,
.buttons .github:hover .bubble,
.buttons .github:hover .bubble::before {
background: #090909;
color: #ffffff;
}
.buttons .github:hover a {
color: #ffffff;
}

.buttons .steam:hover,
.buttons .steam:hover .bubble,
.buttons .steam:hover .bubble::before {
background: #064980;
color: #ffffff;
}
.buttons .steam:hover a {
color: #ffffff;
}

/* 自适应 */

@media screen and (max-width: 780px) {
.buttons {
width: 80%;
}
}

@media screen and (max-width: 1450px) and (min-width: 780px) {
.buttons {
width: 60%;
}
}