i18n
xaoxuu 6 years ago
parent 974daf295d
commit f0a785fbff
  1. 40
      layout/_partial/archive.ejs
  2. 8
      source/less/_article.less
  3. 40
      source/less/_main.less

@ -31,24 +31,34 @@
<% } %> <% } %>
<% page.posts.each(function(post){ %> <% page.posts.each(function(post){ %>
<div class='post-wrapper'> <div class='post-wrapper'>
<%- partial('post', {post: post}) %> <%- partial('post', {post: post}) %>
</div> </div>
<% }) %> <% }) %>
</section> </section>
<% if (page.total > 1) { %> <% if (page.total > 1) { %>
<nav id="page-nav"> <br>
<% if (page.prev != 0) { %> <div class="prev-next">
<a class="prev" rel="prev" href="<%= url_for(page.prev_link) %>"> <div class="prev-next">
<span class="icon icon-chevron-left"></span> <% if (page.prev != 0) { %>
<span class="text">PREVIOUS</span> <a class="prev" rel="prev" href="<%= url_for(page.prev_link) %>">
</a> <section class="post prev" >
<% } %> <i class="fa fa-chevron-left" aria-hidden="true"></i>&nbsp;上一页&nbsp;
<% if (page.next != 0) { %> </section>
<a class="next" rel="next" href="<%= url_for(page.next_link) %>"> </a>
<span class="text">NEXT</span> <% } %>
<span class="icon icon-chevron-right"></span> <p class="current">
</a> <%= page.current%> / <%= page.total%>
<% } %> </p>
</nav> <% if (page.next != 0) { %>
<a class="next" rel="next" href="<%= url_for(page.next_link) %>">
<section class="post next">
&nbsp;下一页&nbsp;<i class="fa fa-chevron-right" aria-hidden="true"></i>
</section>
</a>
<% } %>
</div>
</div>
<% } %> <% } %>

@ -287,6 +287,7 @@
} }
} }
.prev-next{ .prev-next{
width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-content: flex-start; align-content: flex-start;
@ -330,15 +331,22 @@
} }
.prev{ .prev{
text-align: left; text-align: left;
margin-left: 0;
margin-right: @gap/2; margin-right: @gap/2;
border-top-right-radius: @border-radius-width;
border-bottom-right-radius: @border-radius-width;
} }
.next{ .next{
text-align: right; text-align: right;
margin-left: @gap/2; margin-left: @gap/2;
margin-right: 0;
border-top-left-radius: @border-radius-width;
border-bottom-left-radius: @border-radius-width;
} }
} }
} }
/* Tomorrow Night Eighties Theme */ /* Tomorrow Night Eighties Theme */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */ /* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */

@ -140,7 +140,12 @@
padding-right: @gap; padding-right: @gap;
width:~"calc(100% - 0 * @{gap})"; width:~"calc(100% - 0 * @{gap})";
} }
.auto-padding {
padding-left: @gap;
padding-right: @gap;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
} }
} }
@ -261,4 +266,37 @@
padding-right: 0; padding-right: 0;
.mobile-post(); .mobile-post();
} }
.prev-next{
width: 100%;
display: flex;
justify-content: space-between;
align-items: baseline;
color: fade(@theme-text-main, 50%);
.prev{
text-align: left;
margin-left: 0;
margin-right: @gap/2;
border-top-right-radius: 32px;
border-bottom-right-radius: 32px;
}
.next{
text-align: right;
margin-left: @gap/2;
margin-right: 0;
border-top-left-radius: 32px;
border-bottom-left-radius: 32px;
}
section{
color: fade(@theme-text-main, 80%);
padding: @gap;
border-radius: @border-radius-width;
}
@media(max-width:@on-phone) {
section{
border-radius: 0;
}
}
}
} }

Loading…
Cancel
Save