forked from litten/hexo-theme-yilia
-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Less code and more logical. 精简代码,优化逻辑。
- Loading branch information
Showing
4 changed files
with
50 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,40 @@ | ||
<% if (is_post()){ %> | ||
<% if (post.prev && !post.next){ %> | ||
<div class="post-nav-button"> | ||
<a href="<%- url_for(post.prev.path) %>" title="上一篇: <%= post.prev.title %>"> | ||
<div class="scroll" id="post-nav-button"> | ||
<% if (post.prev){ %> | ||
<a href="<%- url_for(post.prev.path) %>" title="上一篇: <%= post.prev.title %>"> | ||
<i class="fa fa-angle-left"></i> | ||
</a> | ||
<a title="文章列表"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a> | ||
<a href="/" title="回到主页"><i class="fa fa-home"></i></a> | ||
</div> | ||
</a> | ||
<% } else { %> | ||
<a href="/" title="回到主页"><i class="fa fa-home"></i></a> | ||
<% } %> | ||
<% if (!post.prev && post.next){ %> | ||
<div class="post-nav-button"> | ||
<a href="/" title="回到主页"><i class="fa fa-home"></i></a> | ||
<a title="文章列表"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a> | ||
<a href="<%- url_for(post.next.path) %>" title="下一篇: <%= post.next.title %>"> | ||
<i class="fa fa-angle-right"></i> | ||
</a> | ||
</div> | ||
<% } %> | ||
<% if (post.prev && post.next){ %> | ||
<div class="post-nav-button"> | ||
<a href="<%- url_for(post.prev.path) %>" title="上一篇: <%= post.prev.title %>"> | ||
<i class="fa fa-angle-left"></i> | ||
</a> | ||
<a title="文章列表"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a> | ||
<a href="<%- url_for(post.next.path) %>" title="下一篇: <%= post.next.title %>"> | ||
<a title="文章列表"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a> | ||
<% if (post.next){ %> | ||
<a href="<%- url_for(post.next.path) %>" title="下一篇: <%= post.next.title %>"> | ||
<i class="fa fa-angle-right"></i> | ||
</a> | ||
</div> | ||
</a> | ||
<% } else { %> | ||
<a href="/" title="回到主页"><i class="fa fa-home"></i></a> | ||
<% } %> | ||
<%- list_posts({amount: 999}) %> | ||
<script src="http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script> | ||
<script> | ||
$(".post-list").addClass("toc-article"); | ||
$(".post-list-item a").attr("target","_blank"); | ||
$(".post-nav-button > a:nth-child(2)").click(function() { | ||
$(".fa-bars, .fa-times").toggle(); | ||
$(".post-list").toggle(300); | ||
if ($(".toc").length > 0) { | ||
$("#toc, #tocButton").toggle(200); | ||
} | ||
else { | ||
$(".switch-btn, .switch-area").toggle(200); | ||
} | ||
}) | ||
</script> | ||
</div> | ||
<%- list_posts({amount: 999}) %> | ||
<script src="http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script> | ||
<script> | ||
$(".post-list").addClass("toc-article"); | ||
$(".post-list-item a").attr("target","_blank"); | ||
$("#post-nav-button > a:nth-child(2)").click(function() { | ||
$(".fa-bars, .fa-times").toggle(); | ||
$(".post-list").toggle(300); | ||
if ($(".toc").length > 0) { | ||
$("#toc, #tocButton").toggle(200); | ||
} | ||
else { | ||
$(".switch-btn, .switch-area").toggle(200); | ||
} | ||
}) | ||
</script> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -320,7 +320,7 @@ | |
} | ||
} | ||
|
||
.post-nav-button { | ||
#post-nav-button { | ||
display: none; | ||
} | ||
|
||
|