Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3970d94

Browse files
committed
fix: remove picture_max_width md header & fix errors about TOC
1 parent 8b410d3 commit 3970d94

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ bundle exec jekyll serve -H 0.0.0.0
109109
| --- | --- | --- |
110110
| key | | 评论系统和阅读量统计使用的文章标识符,如果未设置则评论和统计无效 |
111111
| picture_frame | shadow | 该文章的图片框样式,如果为 shadow 则图片带有阴影边框 |
112-
| picture_max_width | | 该文章图片的最大宽度,默认为 100%,例如 50%,100px |
113112
| modify_date | | 该文章的修改时间,不影响首页文章排序(date 代表发表时间,会影响文章排序) |
114113
| comment | true/false | 该文章是否能够评论,默认为 true(当然你也可以通过不设置 key 来实现,但是这样的话统计也失效了) |
115114

_layouts/blog-base.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
box-shadow: 0 0 5px rgba(0, 0, 0, .4);
1111
}
1212
{% endif %}
13-
{% if page.picture_max_width %}
14-
.m-article-content .content-img {
15-
max-width: {{ page.picture_max_width }} !important;
16-
}
17-
{% endif %}
1813
</style>
1914
<script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
2015
</head>
@@ -24,7 +19,7 @@
2419
</div>
2520
{% include blog/footer.html %}
2621
<script>
27-
$(document).ready(function(){
22+
$(function() {
2823
// display coding language //
2924
$(".highlight").each(function() {
3025
$(this).attr("data-lang", $(this).find("code").attr("data-lang"));

_layouts/post.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,19 @@ <h1 itemprop="headline" class="article-title" itemprop="name headline">{{ page.t
126126
}
127127
lastScrollTop = scrollTop;
128128
}
129-
init();
130-
setAside();
129+
function isAsideDisplay() {
130+
return $articleAside.css('display') !== 'none';
131+
}
132+
133+
isAsideDisplay() && (init(), setAside());
134+
$window.on('scroll', function() {
135+
isAsideDisplay() && setAside();
136+
});
131137
$window.on('resize', throttle(function() {
132138
init();
133139
setAside(true);
134140
}, 100));
135-
$window.on('scroll', setAside,);
141+
setTimeout(init, 4000);
136142
}
137143

138144
setTimeout(setAsideTOC, 1000);

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ <h1>
6666
{% if site.isdebug == false %}
6767
<script src="https://cdn1.lncld.net/static/js/av-min-1.2.1.js"></script>
6868
<script>
69-
$(document).ready(function() {
69+
$(function() {
7070
// 初始化
7171
AV.init({
7272
appId: '{{ site.app_id }}',

0 commit comments

Comments
 (0)