From f7e72adab7b877c1b993b390a552aa241d702be0 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sat, 29 Dec 2018 23:55:19 +0800 Subject: [PATCH] update --- _config.yml | 2 +- languages/en.yml | 2 +- languages/zh-CN.yml | 2 +- languages/zh-HK.yml | 2 +- languages/zh-TW.yml | 2 +- layout/_partial/header.ejs | 2 +- layout/_partial/meta.ejs | 2 +- layout/_partial/scripts.ejs | 7 +++++-- source/js/volantis.js | 6 +++++- 9 files changed, 17 insertions(+), 10 deletions(-) diff --git a/_config.yml b/_config.yml index ed2919f..4d6a4d1 100755 --- a/_config.yml +++ b/_config.yml @@ -8,7 +8,7 @@ info: name: Material X docs: https://xaoxuu.com/wiki/material-x/ # 主题的CDN地址。如需启用CDN,请在主目录的config中设置,详见文档。 - cdn: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@18.12.42/ + cdn: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@1.0/ ############################### 主题样式 ############################### diff --git a/languages/en.yml b/languages/en.yml index dc664f9..69f4f29 100755 --- a/languages/en.yml +++ b/languages/en.yml @@ -19,7 +19,7 @@ post: license_title: Copyright Notice license_content: "All articles in this blog are licensed under %s unless stating additionally." footer: - license: 'Blog content follows the [Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en)' + license: 'Blog content follows the [Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en)' use: Use theme: as theme total_views: total visits diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index af8e19f..4c03954 100755 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -19,7 +19,7 @@ post: license_title: 版权声明 license_content: "本博客所有文章除特别声明外,均采用 %s 许可协议。转载请注明出处!" footer: - license: '博客内容遵循 [署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh)' + license: '博客内容遵循 [署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh)' use: 本站使用 theme: 作为主题 total_views: 总访问量为 diff --git a/languages/zh-HK.yml b/languages/zh-HK.yml index c5e9c79..1eecb4d 100755 --- a/languages/zh-HK.yml +++ b/languages/zh-HK.yml @@ -19,7 +19,7 @@ post: license_title: 版權聲明 license_content: "本網誌所有文章除特別聲明外,均採用 %s 許可協議。轉載請註明出處!" footer: - license: '博客內容遵循 [姓名標示-非商業性-相同方式分享 4.0 國際 (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh_TW)' + license: '博客內容遵循 [姓名標示-非商業性-相同方式分享 4.0 國際 (CC BY-NC-SA 4.0) 協議](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh_TW)' use: 本站使用   theme: 作為主題   total_views: 總訪問量為 diff --git a/languages/zh-TW.yml b/languages/zh-TW.yml index 45d70be..b86643e 100755 --- a/languages/zh-TW.yml +++ b/languages/zh-TW.yml @@ -19,7 +19,7 @@ post: license_title: 版權聲明 license_content: "本網誌所有文章除特別聲明外,均採用 %s 許可協議。轉載請註明出處!" footer: - license: '博客內容遵循 [姓名標示-非商業性-相同方式分享 4.0 國際 (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh_TW)' + license: '博客內容遵循 [姓名標示-非商業性-相同方式分享 4.0 國際 (CC BY-NC-SA 4.0) 協議](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh_TW)' use: 本站使用 theme: 作為主題 total_views: 總訪問量為 diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs index 602aba6..5d8cb42 100755 --- a/layout/_partial/header.ejs +++ b/layout/_partial/header.ejs @@ -56,7 +56,7 @@ <% (config.nav_menu || []).forEach(function(value){ %>
  • " class="nav flat-box" href="<%= url_for(value.url) %>"> -  <%=value.name%> +  <%= __('navbar.'+value.name) %>
  • <%})%> diff --git a/layout/_partial/meta.ejs b/layout/_partial/meta.ejs index 46df8f3..74e2e82 100644 --- a/layout/_partial/meta.ejs +++ b/layout/_partial/meta.ejs @@ -4,7 +4,7 @@ var isPostList = false; } %>
    - <% if((!isPostList && post.music && post.music.enable) || (isPostList && post.music && post.music.enable == true)){ %> + <% if((!isPostList && post.music && post.music.enable != false) || (isPostList && post.music && post.music.enable != false)){ %> <%- partial('../_third-party/aplayer', {aplayer_theme: '', aplayer_mini: true, aplayer_mode: 'circulation', aplayer_server: post.music.server, aplayer_type: post.music.type, aplayer_id: post.music.id, diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index dab5734..e8c7ef1 100755 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -210,7 +210,7 @@ <% if (theme.services.volantis == true) { %> <% if (theme.services && theme.services.cdn == true) { %> - + <% } else { %> <%- js('js/volantis.js') %> <% } %> @@ -230,9 +230,12 @@ notify: notify, verify: verify, guest_info: guest_info, + <% if(page.valine && page.valine.path) { %> + path: "<%= page.valine.path %>", + <% } %> appId: "<%= config.valine.app_id %>", appKey: "<%= config.valine.app_key %>", - placeholder: "<%= config.valine.placeholder %>", + placeholder: "<%= (page.valine && page.valine.placeholder) ? page.valine.placeholder : config.valine.placeholder %>", pageSize:'<%= config.valine.pageSize %>', avatar:'<%= config.valine.avatar %>', lang:'<%= config.valine.lang %>', diff --git a/source/js/volantis.js b/source/js/volantis.js index b31d6b3..47e3a20 100644 --- a/source/js/volantis.js +++ b/source/js/volantis.js @@ -212,6 +212,8 @@ function(e, t) { again: "这么简单也能错,也是没谁了." }, ctrl: { + emoji: "表情", + preview: "预览", reply: "回复", ok: "好的", sure: "确认", @@ -248,6 +250,8 @@ function(e, t) { again: "Sorry, this is a wrong calculation." }, ctrl: { + emoji: "Emoji", + preview: "Preview", reply: "Reply", ok: "Ok", sure: "Sure", @@ -342,7 +346,7 @@ function(e, t) { var n = "mail" == e ? "email" : "text"; return m.indexOf(e) > -1 ? '' : "" }); - t.placeholder = e.placeholder || "Just Go Go", t.el.innerHTML = '
    ' + E.join("") + '
    表情 | 预览
    Powered By Valine
    v' + o + "
    "; + t.placeholder = e.placeholder || "Just Go Go", t.el.innerHTML = '
    ' + E.join("") + '
    ' + t.locale.ctrl.emoji + ' | ' + t.locale.ctrl.preview + '
    Powered By Valine
    v' + o + "
    "; var C = u.find(t.el, ".vempty"); t.nodata = { show: function(e) {