Skip to content

Commit

Permalink
fix: remove picture_max_width md header & fix errors about TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
kitian616 committed Oct 15, 2017
1 parent 8b410d3 commit 3970d94
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ bundle exec jekyll serve -H 0.0.0.0
| --- | --- | --- |
| key | | 评论系统和阅读量统计使用的文章标识符,如果未设置则评论和统计无效 |
| picture_frame | shadow | 该文章的图片框样式,如果为 shadow 则图片带有阴影边框 |
| picture_max_width | | 该文章图片的最大宽度,默认为 100%,例如 50%,100px |
| modify_date | | 该文章的修改时间,不影响首页文章排序(date 代表发表时间,会影响文章排序) |
| comment | true/false | 该文章是否能够评论,默认为 true(当然你也可以通过不设置 key 来实现,但是这样的话统计也失效了) |

Expand Down
7 changes: 1 addition & 6 deletions _layouts/blog-base.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
box-shadow: 0 0 5px rgba(0, 0, 0, .4);
}
{% endif %}
{% if page.picture_max_width %}
.m-article-content .content-img {
max-width: {{ page.picture_max_width }} !important;
}
{% endif %}
</style>
<script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
</head>
Expand All @@ -24,7 +19,7 @@
</div>
{% include blog/footer.html %}
<script>
$(document).ready(function(){
$(function() {
// display coding language //
$(".highlight").each(function() {
$(this).attr("data-lang", $(this).find("code").attr("data-lang"));
Expand Down
12 changes: 9 additions & 3 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,19 @@ <h1 itemprop="headline" class="article-title" itemprop="name headline">{{ page.t
}
lastScrollTop = scrollTop;
}
init();
setAside();
function isAsideDisplay() {
return $articleAside.css('display') !== 'none';
}

isAsideDisplay() && (init(), setAside());
$window.on('scroll', function() {
isAsideDisplay() && setAside();
});
$window.on('resize', throttle(function() {
init();
setAside(true);
}, 100));
$window.on('scroll', setAside,);
setTimeout(init, 4000);
}

setTimeout(setAsideTOC, 1000);
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h1>
{% if site.isdebug == false %}
<script src="https://cdn1.lncld.net/static/js/av-min-1.2.1.js"></script>
<script>
$(document).ready(function() {
$(function() {
// 初始化
AV.init({
appId: '{{ site.app_id }}',
Expand Down

0 comments on commit 3970d94

Please sign in to comment.