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.
buttons in post: next/prev article, home
- Loading branch information
Showing
4 changed files
with
55 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<% if (is_post()){ %> | ||
<% 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 href="/" title="回到主页"><i class="fa fa-home"></i></a> | ||
</div> | ||
<% } %> | ||
<% if (!post.prev && post.next){ %> | ||
<div class="post-nav-button"> | ||
<a href="/" title="回到主页"><i class="fa fa-home"></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 href="<%- url_for(post.next.path) %>" title="下一篇: <%= post.next.title %>"> | ||
<i class="fa fa-angle-right"></i> | ||
</a> | ||
</div> | ||
<% } %> | ||
<% } %> |
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 |
---|---|---|
|
@@ -308,4 +308,7 @@ | |
color: none; | ||
opacity: 1; | ||
} | ||
} | ||
.post-nav-button { | ||
display: none; | ||
} |