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,6 +13,7 @@
<%- page.content %> <%- page.content %>
</div> </div>
<% if (page.prev || page.next) { %>
<div class="article-nav"> <div class="article-nav">
<% if (page.prev) { %> <% if (page.prev) { %>
<div class="article-prev"> <div class="article-prev">
@ -20,7 +21,9 @@
rel="prev" rel="prev"
href="<%= url_for(page.prev.path) %>" 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> <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> </a>
</div> </div>
<% } %> <% } %>
@ -30,14 +33,19 @@
rel="next" rel="next"
href="<%= url_for(page.next.path) %>" 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> <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> </a>
</div> </div>
<% } %> <% } %>
</div> </div>
<% } %>
<% if (theme.comments.valine.enable || theme.comments.gitalk.enable) { %>
<div class="comment-container"> <div class="comment-container">
<%- partial('_partial/comments/comment') %> <%- partial('_partial/comments/comment') %>
</div> </div>
<% } %>
</div> </div>
</div> </div>