hexo-theme-ayer/layout/_partial/post/nav.ejs
2019-12-03 19:37:44 +08:00

23 lines
756 B
JavaScript

<% if (post.prev || post.next){ %>
<nav class="article-nav">
<% if (post.prev){ %>
<a href="<%- url_for(post.prev.path) %>" class="article-nav-link">
<strong class="article-nav-caption"><%- theme.nav_text.post_prev %></strong>
<div class="article-nav-title">
<% if (post.prev.title){ %>
<%= post.prev.title %>
<% } else { %>
(no title)
<% } %>
</div>
</a>
<% } %>
<% if (post.next){ %>
<a href="<%- url_for(post.next.path) %>" class="article-nav-link">
<strong class="article-nav-caption"><%- theme.nav_text.post_next %></strong>
<div class="article-nav-title"><%= post.next.title %></div>
</a>
<% } %>
</nav>
<% } %>