Skip to content

Commit

Permalink
Change Newer/Older post sentence and Translate Next/Prev button
Browse files Browse the repository at this point in the history
  • Loading branch information
nogajun committed Aug 27, 2017
1 parent 01bee91 commit 468a586
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ favicon: /images/avatar-small.png
#mathjax
mathjax: true

# 'Read more' button
excerpt_link: 继续阅读

# Footer message
site_license: <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.</a>
thanks_message: thanks to <a href="https://pages.github.com/">GitHub Pages</a> for free hosting.

8 changes: 5 additions & 3 deletions languages/default.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
newer: "Newer Post"
older: "Older Post"
read: "Read"
newerpost: "Newer Post"
olderpost: "Older Post"
read: Read
next: Next
previous: Prev
2 changes: 1 addition & 1 deletion layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
&copy; <%- date(Date.now(), 'YYYY') %> <%= config.author || config.title %><% if (theme.site_license) { %> - This site is licensed under a <%- theme.site_license %><% } %>
</span>
<span class="footer__copyright">
Powered by <a href="http://hexo.io">Hexo</a>. <% if (theme.social.github) { %>thanks to <a href="https://pages.github.com/">GitHub Pages</a> for free hosting.<% } %>
Powered by <a href="http://hexo.io">Hexo</a>. <% if (theme.thanks_message) { %><%- theme.thanks_message %><% } %>
</span>
<span class="footer__copyright">
This site uses <a href="https://github.com/monniya/hexo-theme-new-vno ">new-vno</a> theme, modified by <a href="https://monniya.com ">@Monniya</a> from <a href="https://github.com/lenbo-ma/hexo-theme-vno" target="_blank">Vno</a>, Original theme from <a href="http://github.com/onevcat/vno" target="_blank">onevcat</a>
Expand Down
8 changes: 4 additions & 4 deletions layout/_partial/read-more.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<% if (page.prev){ %>
<div class="read-more-item">
<span class="read-more-item-dim"><%= __('newer') %></span>
<span class="read-more-item-dim"><%= __('newerpost') %></span>
<h2 class="post-list__post-title post-title"><a href="<%- config.root %><%- page.prev.path %>" title="<%= page.prev.title %>"><%= page.prev.title %></a></h2>
<p class="excerpt">
<% if (page.prev.excerpt){ %>
Expand All @@ -12,14 +12,14 @@
<%= strip_html(page.prev.content).substring(0, 150)%>
<% } %>&hellip;
</p>
<div class="post-list__meta"><%- partial('_partial/date',{post: page.prev}) %> &#8226; <span class="post-list__meta--tags tags">&nbsp;<%- partial('_partial/tags',{post: page.prev}) %></span><a class="btn-border-small" href="<%- config.root %><%- page.prev.path %>"><%= theme.excerpt_link %></a></div>
<div class="post-list__meta"><%- partial('_partial/date',{post: page.prev}) %> &#8226; <span class="post-list__meta--tags tags"> <%- partial('_partial/tags',{post: page.prev}) %></span><a class="btn-border-small" href="<%- config.root %><%- page.prev.path %>"><%= theme.excerpt_link %></a></div>
</div>
<% } %>
<% if (page.next){ %>
<div class="read-more-item">
<span class="read-more-item-dim"><%= __('older') %></span>
<span class="read-more-item-dim"><%= __('olderpost') %></span>
<h2 class="post-list__post-title post-title"><a href="<%- config.root %><%- page.next.path %>" title="<%= page.next.title %>"><%= page.next.title %></a></h2>
<p class="excerpt">
<% if (page.next.excerpt){ %>
Expand All @@ -28,7 +28,7 @@
<%= strip_html(page.next.content).substring(0, 150)%>
<% } %>&hellip;
</p>
<div class="post-list__meta"><%- partial('_partial/date',{post: page.next}) %> &#8226; <span class="post-list__meta--tags tags">&nbsp;<%- partial('_partial/tags',{post: page.next}) %></span><a class="btn-border-small" href="<%- config.root %><%- page.next.path %>"><%= theme.excerpt_link %></a></div>
<div class="post-list__meta"><%- partial('_partial/date',{post: page.next}) %> &#8226; <span class="post-list__meta--tags tags"> <%- partial('_partial/tags',{post: page.next}) %></span><a class="btn-border-small" href="<%- config.root %><%- page.next.path %>"><%= theme.excerpt_link %></a></div>
</div>
<% } %>
Expand Down
6 changes: 3 additions & 3 deletions layout/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<%= strip_html(post.content).substring(0, 200)%>
<% } %>&hellip;
</p>
<div class="post-list__meta"><%- partial('_partial/date',{post: post}) %> &#8226; <span class="post-list__meta--tags tags">&nbsp;<%- partial('_partial/tags',{post: post}) %></span><a class="btn-border-small" href="<%- config.root %><%- link%>"><%= theme.excerpt_link %></a></div>
<div class="post-list__meta"><%- partial('_partial/date',{post: post}) %> &#8226; <span class="post-list__meta--tags tags"> <%- partial('_partial/tags',{post: post}) %></span><a class="btn-border-small" href="<%- config.root %><%- link%>"><%= theme.excerpt_link %></a></div>
<hr class="post-list__divider" />
</li>
<% }) %>
Expand All @@ -28,11 +28,11 @@
page.prev_link = "/#blog";
}
%>
<a class="older-posts pagination__older btn btn-small btn-tertiary" href="<%- url_for(page.prev_link) %>">最近</a>
<a class="older-posts pagination__older btn btn-small btn-tertiary" href="<%- url_for(page.prev_link) %>"><%= __('previous') %></a>
<% } %>
<span class="pagination__page-number" > <%= page.current %> / <%= page.total %> </span>
<% if (page.next){ %>
<a class="older-posts pagination__older btn btn-small btn-tertiary" href="<%- url_for(page.next_link) %>">更早</a>
<a class="older-posts pagination__older btn btn-small btn-tertiary" href="<%- url_for(page.next_link) %>"><%= __('next') %></a>
<% } %>
</nav>
<% } %>
Expand Down

0 comments on commit 468a586

Please sign in to comment.