feat: optimize the mobile display of post pages

This commit is contained in:
XPoet 2020-06-06 18:16:50 +08:00
parent 64a589e999
commit f4091bcecc
2 changed files with 30 additions and 8 deletions

View File

@ -16,15 +16,21 @@
<div class="article-nav"> <div class="article-nav">
<% if (page.prev) { %> <% if (page.prev) { %>
<div class="article-prev"> <div class="article-prev">
<a class="prev btn" rel="prev" <a class="prev btn"
href="<%= url_for(page.prev.path) %>"><i class="fa fa-chevron-left"></i> <%= page.prev.title %> 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> </a>
</div> </div>
<% } %> <% } %>
<% if (page.next) { %> <% if (page.next) { %>
<div class="article-next"> <div class="article-next">
<a class="next btn" rel="next" <a class="next btn"
href="<%= url_for(page.next.path) %>"><%= page.next.title %> <i class="fa fa-chevron-right"></i> 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> </a>
</div> </div>
<% } %> <% } %>

View File

@ -45,15 +45,31 @@
.article-nav { .article-nav {
height 40px height: 40px;
margin 40px 0 margin: 40px 0;
.article-prev { .article-prev {
float left float: left;
} }
.article-next { .article-next {
float right float: right;
}
.post-nav-item {
display: none;
+ils-tablet() {
display: inline-block;
}
}
.post-nav-title-item {
+ils-tablet() {
display: none;
}
} }
} }