Skip to content

Commit c9fca7e

Browse files
author
wu-kan
committed
### 2019-08-30 v2.3.0
- 更换cdn为[jsdelivr](https://www.jsdelivr.com/) - 升级fontaswsomev4.7.0至fontawesome-freev5.10.2,支持的图标数量由675增加至1535 - 所有脚本和插件JSLoader化,增加移植性和访问速度 - 界面调整 - 正文部分增加背景,从而减少动态ribbon背景影响的阅读体验 - sidebar微调 - layout删除document页
1 parent 4cf041c commit c9fca7e

File tree

5 files changed

+61
-63
lines changed

5 files changed

+61
-63
lines changed

README.md

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ Live2D来自于[stevenjoezhang/live2d-widget](https://github.com/stevenjoezhang/
5252
- [ ] 重写博客首页,做一个有意思的封面,不再显示文章
5353
- [x] 加入评论系统,暂时考虑用valine+leancloud实现
5454
- [x] 基于valine的阅读量统计
55-
- [x] 加入不蒜子统计
56-
- [x] <i class="fab fa-font-awesome"></i> Font Awesome
55+
- [x] 不蒜子统计
56+
- [x] [<i class="fab fa-font-awesome"></i>fontawesome-free](https://fontawesome.com/)
5757
- [x] 全站搜索
58-
- [x] 移植[原博客的ribbon动态背景](https://github.com/theme-next/theme-next-canvas-ribbon)
58+
- [x] [ribbon动态背景](https://github.com/hustcc/ribbon.js)
5959
- [x] 调整代码块风格,并加上代码选中按钮
6060
- [x] 加入可以自动展开、标号的目录
6161
- [x] 目录标号
@@ -83,30 +83,20 @@ Live2D来自于[stevenjoezhang/live2d-widget](https://github.com/stevenjoezhang/
8383
8484
## 历程
8585

86-
### 正在进行 v2.3.0
87-
88-
#### TodoList
89-
90-
- [x] 更换cdn为[jsdelivr](https://www.jsdelivr.com/)
91-
- [ ] 所有脚本和插件JSLoader化,增加移植性和访问速度
92-
- [x] katex
93-
- [x] mermaid
94-
- [x] baidu_push
95-
- [ ] prismjs
96-
- [x] simple_jekyll_search
97-
- [x] jekyll_table_of_context
98-
- [x] run_time
99-
- [x] 升级fontaswsomev4.7.0至fontawesome-freev5.10.1,支持的图标数量由675增加至1535
100-
- [ ] 界面调整
101-
- [x] 正文部分增加背景,从而减少动态ribbon背景影响的阅读体验
102-
- [x] sidebar微调
103-
- [x] layout删除document页
86+
### 2019-08-30 v2.3.0
87+
88+
- 更换cdn为[jsdelivr](https://www.jsdelivr.com/)
89+
- 升级fontaswsomev4.7.0至fontawesome-freev5.10.2,支持的图标数量由675增加至1535
90+
- 所有脚本和插件JSLoader化,增加移植性和访问速度
91+
- 界面调整
92+
- 正文部分增加背景,从而减少动态ribbon背景影响的阅读体验
93+
- sidebar微调
94+
- layout删除document页
10495

10596
#### 已知bug
10697

107-
- 配置选项body.overlay失效,正文不跟随侧边栏移动。产生原因是在page中为了加快页面内容显示,将正文移动至sidebar上面
108-
- fontaswsome的rss图标和rss-square图标失效
109-
- 使用autoloader时,prismjs的toolbar插件失效
98+
- [ ] 配置选项body.overlay失效,正文不跟随侧边栏移动。产生原因是在page中为了加快页面内容显示,将正文移动至sidebar上面
99+
- [ ] 使用autoloader引入js时,prismjs的toolbar插件会失效
110100

111101
### 2019-07-06 v2.2.1
112102

_config.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ script: # 需要在正文后调用的脚本
110110
- src: //cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js # jQuery
111111
- src: //cdn.jsdelivr.net/npm/ribbon.js/dist/ribbon.min.js # 彩带背景
112112
- src: //cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget/autoload.js # live2d
113-
- src: //cdn.jsdelivr.net/npm/prismjs/plugins/toolbar/prism-toolbar.min.js
113+
- src: //cdn.jsdelivr.net/npm/prismjs/components/prism-core.min.js # Todo:把它加入autoloader
114+
- src: //cdn.jsdelivr.net/npm/prismjs/plugins/toolbar/prism-toolbar.min.js # Todo:把它加入autoloader
114115
- src: /public/js/prism.js
115116
- src: /public/js/mermaid.js
116117
- src: /public/js/katex.js
@@ -124,7 +125,6 @@ mermaid: # https://github.com/knsv/mermaid
124125

125126
PrismJS: # 代码高亮插件,可以在https://prismjs.com/download.html自己定制,我这里只导入了三个自己喜欢的插件。
126127
enable: true
127-
src: //cdn.jsdelivr.net/npm/prismjs/components/prism-core.min.js
128128
stylesheet: //cdn.jsdelivr.net/npm/prismjs/themes/prism-coy.css # 在https://github.com/PrismJS/prism/tree/master/themes 内查看可用主题,或者也可以搜一些第三方主题
129129
plugins:
130130
line_numbers:
@@ -137,7 +137,6 @@ PrismJS: # 代码高亮插件,可以在https://prismjs.com/download.html自己
137137
languages_path: //cdn.jsdelivr.net/npm/prismjs/components/
138138
toolbar:
139139
enable: true
140-
src: //cdn.jsdelivr.net/npm/prismjs/plugins/toolbar/prism-toolbar.min.js
141140
stylesheet: //cdn.jsdelivr.net/npm/prismjs/plugins/toolbar/prism-toolbar.css
142141
show_language:
143142
enable: true
@@ -163,26 +162,26 @@ sidebar:
163162
social:
164163
- title: rss
165164
href: /atom.xml
166-
class: 'fas fa-rss fa-fw' # rss图标加载不了不知道为什么
165+
class: 'fas fa-rss fa-fw'
167166
- title: [email protected] # email
168167
href: mailto:[email protected]
169-
class: 'far fa-envelope fa-fw'
168+
class: 'fas fa-envelope fa-fw'
169+
- title: WuK # codeforces
170+
href: //codeforces.com/profile/WuK
171+
class: 'fas fa-chart-bar fw'
172+
- title: WuK # vjudge
173+
href: //vjudge.net/user/WuK
174+
class: 'fas fa-smile fa-fw'
170175
- title: 942759535 # qq
171176
class: 'fab fa-qq fa-fw'
172177
- title: Wu-_-Kan # weixin
173178
class: 'fab fa-weixin fa-fw'
179+
- title: github
180+
href: //github.com/wu-kan
181+
class: 'fab fa-github fa-fw'
174182
- title: zhihu
175183
href: //www.zhihu.com/people/wu.kan/activities
176184
class: 'fab fa-zhihu fa-fw'
177-
- title: github # email
178-
href: //github.com/wu-kan
179-
class: 'fab fa-github fa-fw'
180-
- title: WuK # codeforces
181-
href: //codeforces.com/profile/WuK
182-
class: 'far fa-chart-bar fw'
183-
- title: WuK # vjudge
184-
href: //vjudge.net/user/WuK
185-
class: 'far fa-smile fa-fw'
186185
nav:
187186
- title: '<i class="fas fa-home fa-fw"></i> 首页'
188187
href: /

_layouts/page.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ <h1 class="masthead masthead-title">
4646
</div>
4747
{% endif %}
4848
{{ site.sidebar.description }}
49-
<div class="social">
49+
<div class="sidebar-social">
5050
{% for s in site.sidebar.social %}
51-
<a href="{{ s.href }}" class="{{ s.class }}" title="{{ s.title }}"></a>
51+
<a href="{{ s.href }}" title="{{ s.title }}">
52+
<i class="{{ s.class }}"></i>
53+
</a>
5254
{% endfor %}
5355
</div>
5456
</div>
@@ -78,15 +80,18 @@ <h1 class="masthead masthead-title">
7880
{% if site.busuanzi.enable %}
7981
<div>
8082
{{ site.busuanzi.page_pv.alert }}
81-
<span id="busuanzi_value_page_pv"></span>{{ site.busuanzi.page_pv.unit }}
83+
<span id="busuanzi_value_page_pv"></span>
84+
{{ site.busuanzi.page_pv.unit }}
8285
</div>
8386
<div>
8487
{{ site.busuanzi.site_pv.alert }}
85-
<span id="busuanzi_value_site_pv"></span>{{ site.busuanzi.site_pv.unit }}
88+
<span id="busuanzi_value_site_pv"></span>
89+
{{ site.busuanzi.site_pv.unit }}
8690
</div>
8791
<div>
8892
{{ site.busuanzi.site_uv.alert }}
89-
<span id="busuanzi_value_site_uv"></span>{{ site.busuanzi.site_uv.unit }}
93+
<span id="busuanzi_value_site_uv"></span>
94+
{{ site.busuanzi.site_uv.unit }}
9095
</div>
9196
<script src="{{ site.busuanzi.src }}"></script>
9297
{% endif %}

public/css/wu-kan.css

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,6 @@ h2 {
1111
h3 {
1212
font-size: 1.1rem;
1313
}
14-
.content{
15-
background-color: rgba(255,255,255,0.95);
16-
}
17-
.masthead {
18-
background-color: #fff;
19-
padding-top: .8rem;
20-
padding-bottom: .8rem;
21-
}
22-
.social {
23-
text-align: center;
24-
}
2514
/* Hide the sidebar checkbox that we toggle with `.sidebar-toggle` */
2615
.sidebar-checkbox {
2716
display: none;
@@ -35,6 +24,22 @@ h3 {
3524
#sidebar-checkbox:checked ~ .sidebar-toggle:before {
3625
background-image: none;
3726
}
27+
.sidebar-social {
28+
text-align: center;
29+
}
30+
.sidebar-social a:hover,
31+
.sidebar-social a:focus {
32+
text-decoration: none;
33+
background-color: rgba(255,255,255,.1);
34+
}
35+
.content{
36+
background-color: rgba(255,255,255,.9);
37+
}
38+
.masthead {
39+
background-color: rgba(255,255,255,.9);
40+
padding-top: .8rem;
41+
padding-bottom: .8rem;
42+
}
3843
.post-date {
3944
margin-top: 0px;
4045
}

public/js/prism.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
---
44
{% if site.PrismJS.enable %}
55

6-
document.write('<script src="{{ site.PrismJS.src }}"></script>');
6+
//document.write('<script src="{{ site.PrismJS.src }}"></script>');
77
$("<link>").attr({ href: "{{ site.PrismJS.stylesheet }}", rel: "stylesheet" }).appendTo("head");
88

99
{% if site.PrismJS.plugins.line_numbers.enable %}
@@ -14,29 +14,28 @@ $('pre').addClass("line-numbers");
1414

1515
{% if site.PrismJS.plugins.autoloader.enable %}
1616
document.write('<script src="{{ site.PrismJS.plugins.autoloader.src }}"></script>');
17-
setTimeout(function () {
17+
$(window).on("load", function () {
1818
Prism.plugins.autoloader.languages_path = '{{ site.PrismJS.plugins.autoloader.languages_path }}';
19-
}, 10);
19+
});
2020
{% endif %}
2121

2222
{% if site.PrismJS.plugins.toolbar.enable %}
23-
24-
document.write('<script src="{{ site.PrismJS.plugins.toolbar.src }}"></script>');
23+
//document.write('<script src="{{ site.PrismJS.plugins.toolbar.src }}"></script>');
2524
$("<link>").attr({ href: "{{ site.PrismJS.plugins.toolbar.stylesheet }}", rel: "stylesheet" }).appendTo("head");
2625

2726
{% if site.PrismJS.plugins.toolbar.show_language.enable %}
28-
setTimeout(function () {
27+
//$(window).on("load", function () {
2928
Prism.plugins.toolbar.registerButton('show-language', {
3029
text: '{{ site.PrismJS.plugins.toolbar.show_language.text }}', // required
3130
onClick: function (env) { // optional
3231
alert('{{ site.PrismJS.plugins.toolbar.show_language.alert }}' + env.language);
3332
}
3433
});
35-
}, 1000);
34+
//});
3635
{% endif %}
3736

3837
{% if site.PrismJS.plugins.toolbar.select_code.enable %}
39-
setTimeout(function () {
38+
//$(window).on("load", function () {
4039
Prism.plugins.toolbar.registerButton('select-code', function (env) {
4140
var button = document.createElement('button');
4241
button.innerHTML = '{{ site.PrismJS.plugins.toolbar.select_code.innerHTML }}';
@@ -56,7 +55,7 @@ setTimeout(function () {
5655
});
5756
return button;
5857
});
59-
}, 1000);
58+
//});
6059
{% endif %}
6160

6261
{% endif %}

0 commit comments

Comments
 (0)