From 468a58600e6b116c8d878254c58302f60096023e Mon Sep 17 00:00:00 2001 From: Jun NOGATA Date: Sun, 27 Aug 2017 12:15:13 +0900 Subject: [PATCH] Change Newer/Older post sentence and Translate Next/Prev button --- _config.yml | 4 ++++ languages/default.yml | 8 +++++--- layout/_partial/footer.ejs | 2 +- layout/_partial/read-more.ejs | 8 ++++---- layout/index.ejs | 6 +++--- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/_config.yml b/_config.yml index 6d8d360..17bd56b 100644 --- a/_config.yml +++ b/_config.yml @@ -31,6 +31,10 @@ favicon: /images/avatar-small.png #mathjax mathjax: true +# 'Read more' button excerpt_link: 继续阅读 +# Footer message site_license: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. +thanks_message: thanks to GitHub Pages for free hosting. + diff --git a/languages/default.yml b/languages/default.yml index 71957e8..220ec27 100644 --- a/languages/default.yml +++ b/languages/default.yml @@ -1,3 +1,5 @@ -newer: "Newer Post" -older: "Older Post" -read: "Read" \ No newline at end of file +newerpost: "Newer Post" +olderpost: "Older Post" +read: Read +next: Next +previous: Prev diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 37d02ee..e8fcbf5 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -3,7 +3,7 @@ © <%- date(Date.now(), 'YYYY') %> <%= config.author || config.title %><% if (theme.site_license) { %> - This site is licensed under a <%- theme.site_license %><% } %> - Powered by Hexo. <% if (theme.social.github) { %>thanks to GitHub Pages for free hosting.<% } %> + Powered by Hexo. <% if (theme.thanks_message) { %><%- theme.thanks_message %><% } %> This site uses new-vno theme, modified by @Monniya from Vno, Original theme from onevcat diff --git a/layout/_partial/read-more.ejs b/layout/_partial/read-more.ejs index 817f5ee..72d7986 100644 --- a/layout/_partial/read-more.ejs +++ b/layout/_partial/read-more.ejs @@ -3,7 +3,7 @@ <% if (page.prev){ %>
- <%= __('newer') %> + <%= __('newerpost') %>

<%= page.prev.title %>

<% if (page.prev.excerpt){ %> @@ -12,14 +12,14 @@ <%= strip_html(page.prev.content).substring(0, 150)%> <% } %>…

-
<%- partial('_partial/date',{post: page.prev}) %> • 于 <%- partial('_partial/tags',{post: page.prev}) %><%= theme.excerpt_link %>
+
<%- partial('_partial/date',{post: page.prev}) %> • 于 <%- partial('_partial/tags',{post: page.prev}) %><%= theme.excerpt_link %>
<% } %> <% if (page.next){ %>
- <%= __('older') %> + <%= __('olderpost') %>

<%= page.next.title %>

<% if (page.next.excerpt){ %> @@ -28,7 +28,7 @@ <%= strip_html(page.next.content).substring(0, 150)%> <% } %>…

-
<%- partial('_partial/date',{post: page.next}) %> • 于 <%- partial('_partial/tags',{post: page.next}) %><%= theme.excerpt_link %>
+
<%- partial('_partial/date',{post: page.next}) %> • 于 <%- partial('_partial/tags',{post: page.next}) %><%= theme.excerpt_link %>
<% } %> diff --git a/layout/index.ejs b/layout/index.ejs index 9273edf..c6299ce 100644 --- a/layout/index.ejs +++ b/layout/index.ejs @@ -14,7 +14,7 @@ <%= strip_html(post.content).substring(0, 200)%> <% } %>…

-
<%- partial('_partial/date',{post: post}) %> • 于 <%- partial('_partial/tags',{post: post}) %><%= theme.excerpt_link %>
+
<%- partial('_partial/date',{post: post}) %> • 于 <%- partial('_partial/tags',{post: post}) %><%= theme.excerpt_link %>

<% }) %> @@ -28,11 +28,11 @@ page.prev_link = "/#blog"; } %> - ← 最近 + ← <%= __('previous') %> <% } %> <%= page.current %> / <%= page.total %> <% if (page.next){ %> - 更早 → + <%= __('next') %> → <% } %> <% } %>