fix: fixed comment and nav display error in article content page

This commit is contained in:
XPoet 2020-10-26 10:13:07 +08:00
parent 5e69aff61f
commit b101f7e67a
1 changed files with 33 additions and 25 deletions

View File

@ -13,31 +13,39 @@
<%- page.content %>
</div>
<div class="article-nav">
<% if (page.prev) { %>
<div class="article-prev">
<a class="prev btn"
rel="prev"
href="<%= url_for(page.prev.path) %>"
>
<i class="fa fa-chevron-left"></i> <span class="post-nav-title-item"><%= page.prev.title %></span><span class="post-nav-item"><%= __('prev_posts') %></span>
</a>
</div>
<% } %>
<% if (page.next) { %>
<div class="article-next">
<a class="next btn"
rel="next"
href="<%= url_for(page.next.path) %>"
>
<span class="post-nav-title-item"><%= page.next.title %></span><span class="post-nav-item"><%= __('next_posts') %></span> <i class="fa fa-chevron-right"></i>
</a>
</div>
<% } %>
</div>
<% if (page.prev || page.next) { %>
<div class="article-nav">
<% if (page.prev) { %>
<div class="article-prev">
<a class="prev btn"
rel="prev"
href="<%= url_for(page.prev.path) %>"
>
<i class="fa fa-chevron-left"></i>
<span class="post-nav-title-item"><%= page.prev.title %></span>
<span class="post-nav-item"><%= __('prev_posts') %></span>
</a>
</div>
<% } %>
<% if (page.next) { %>
<div class="article-next">
<a class="next btn"
rel="next"
href="<%= url_for(page.next.path) %>"
>
<span class="post-nav-title-item"><%= page.next.title %></span>
<span class="post-nav-item"><%= __('next_posts') %></span>
<i class="fa fa-chevron-right"></i>
</a>
</div>
<% } %>
</div>
<% } %>
<div class="comment-container">
<%- partial('_partial/comments/comment') %>
</div>
<% if (theme.comments.valine.enable || theme.comments.gitalk.enable) { %>
<div class="comment-container">
<%- partial('_partial/comments/comment') %>
</div>
<% } %>
</div>
</div>