NexT 主题美化修改记录(一)

基于 NexT 主题 V8.10.1,第一波美化修改记录。

主要修改为:

  • 添加文章结束分割线
  • 添加上吊猫个性化回到顶部
  • 添加畅言评论系统

git status 结果

1
2
3
4
5
6
7
8
Changed files:
modified: layout/_macro/post.njk
modified: layout/_partials/footer.njk
modified: layout/_partials/page/tags.njk
modified: source/css/_common/components/back-to-top.styl

Untracked files:
layout/_macro/passage-end-tag.njk

新文件 layout/_macro/passage-end-tag.njk 内容:

1
2
3
4
5
<div>
{% if not is_index %}
<div style="text-align:center;color: #ccc;font-size:14px;">------------- 本文结束 <i class="fa fa-heartbeat"></i> 步履不止 -------------</div>
{% endif %}
</div>

git diff 结果

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
diff --git a/layout/_macro/post.njk b/layout/_macro/post.njk
index 27851de..6c994b4 100644
--- a/layout/_macro/post.njk
+++ b/layout/_macro/post.njk
@@ -102,6 +102,12 @@
{{ partial('_partials/post/post-related.njk') }}
{%- endif %}

+<div>
+ {% if not is_index %}
+ {% include 'passage-end-tag.njk' %}
+ {% endif %}
+</div>
+
<footer class="post-footer">
{%- if is_index %}
<div class="post-eof"></div>
diff --git a/layout/_partials/footer.njk b/layout/_partials/footer.njk
index d39307a..a060418 100644
--- a/layout/_partials/footer.njk
+++ b/layout/_partials/footer.njk
@@ -19,7 +19,7 @@
</span>
<span class="author" itemprop="copyrightHolder">{{ theme.footer.copyright or author }}</span>
</div>
-
+<!--
{%- if config.symbols_count_time.total_symbols or config.symbols_count_time.total_time %}
<div class="wordcount">
{%- if config.symbols_count_time.total_symbols %}
@@ -47,7 +47,7 @@
{%- endif %}
</div>
{%- endif %}
-
+-->
{%- if theme.busuanzi_count.enable %}
<div class="busuanzi-count">
{%- if theme.busuanzi_count.total_visitors %}
@@ -73,14 +73,14 @@
{%- endif %}
</div>
{%- endif %}
-
+<!--
{%- if theme.footer.powered %}
<div class="powered-by">
{%- set next_site = 'https://theme-next.js.org' if theme.scheme === 'Gemini' else 'https://theme-next.js.org/' + theme.scheme | lower + '/' %}
{{- __('footer.powered', next_url('https://hexo.io', 'Hexo') + ' & ' + next_url(next_site, 'NexT.' + theme.scheme)) }}
</div>
{%- endif %}
-
+-->
{%- if theme.add_this_id %}
<div class="addthis_inline_share_toolbox">
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ theme.add_this_id }}" async="async"></script>
diff --git a/layout/_partials/page/tags.njk b/layout/_partials/page/tags.njk
index c6e55cc..7cbc75c 100644
--- a/layout/_partials/page/tags.njk
+++ b/layout/_partials/page/tags.njk
@@ -13,4 +13,4 @@
})
}}
</div>
-</div>
+</div>
\ No newline at end of file
diff --git a/source/css/_common/components/back-to-top.styl b/source/css/_common/components/back-to-top.styl
index d1c9152..89af070 100644
--- a/source/css/_common/components/back-to-top.styl
+++ b/source/css/_common/components/back-to-top.styl
@@ -43,3 +43,26 @@ if (hexo-config('back2top.enable')) {
}
}
}
+
+/* 这里已经注释掉,若想生效取消注释即可,其他不用设置
+//自定义回到顶部样式-上吊猫
+.back-to-top {
+ right: 60px;
+ width: 70px; //图片素材宽度
+ height: 900px; //图片素材高度
+ top: -900px;
+ bottom: unset;
+ transition: all .5s ease-in-out;
+ background: url("/images/scroll.png");
+
+ //隐藏箭头图标
+ > i {
+ display: none;
+ }
+
+ &.back-to-top-on {
+ bottom: unset;
+ top: 100vh < (900px + 200px) ? calc( 100vh - 900px - 200px ) : 0px;
+ }
+}
+*/
\ No newline at end of file

_config.yml 修改情况

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
24c24
< #sidebar: source/_data/sidebar.njk
---
> sidebar: source/_data/sidebar.njk
53,54c53,54
< small: /images/favicon-16x16-next.png
< medium: /images/favicon-32x32-next.png
---
> small: /images/favicon-50.png # favicon-16x16-next.png
> medium: /images/favicon-100.png # favicon-32x32-next.png
98,102c98,102
< #home: / || fa fa-home
< #about: /about/ || fa fa-user
< #tags: /tags/ || fa fa-tags
< #categories: /categories/ || fa fa-th
< #archives: /archives/ || fa fa-archive
---
> home: / || fa fa-home
> categories: /categories/ || fa fa-folder-open
> tags: /tags/ || fa fa-tags
> archives: /archives/ || fa fa-calendar # fa fa-archive
> about: /about/ || fa fa-user
120,121c120,121
< position: left
< #position: right
---
> #position: left
> position: right
143c143
< url: #/images/avatar.gif
---
> url: /images/avatar.jpg
145c145
< rounded: false
---
> rounded: true
147c147
< rotated: false
---
> rotated: true
157,158c157,158
< #GitHub: https://github.com/yourname || fab fa-github
< #E-Mail: mailto:yourname@gmail.com || fa fa-envelope
---
> #GitHub: https://github.com/liu-paopao || fab fa-github
> #E-Mail: mailto:liupaopao520@163.com || fa fa-envelope
170c170
< icons_only: false
---
> icons_only: true
212c212
< name: fa fa-heart
---
> name: fa fa-heartbeat
222c222
< powered: true
---
> powered: false
262a263
>
264c265
< tag_icon: false
---
> tag_icon: true
375c376
< enable: false
---
> enable: true
384c385
< scrollpercent: false
---
> scrollpercent: true
409c410
< permalink: https://github.com/yourname
---
> permalink: https://github.com/liu-paopao
529c530
< fancybox: false
---
> fancybox: true
610,612c611,613
< enable: false
< appid:
< appkey:
---
> enable: true
> appid: cyw09gPog
> appkey: 4488e6b82bfe3d819f4971a5e5c115f4
745c746
< enable: false
---
> enable: true
857c858
< enable: false
---
> enable: true