From 15ffef6fe6179206e4ee3479c2893e569cea24ac Mon Sep 17 00:00:00 2001 From: shen-yu <448766534@qq.com> Date: Sat, 6 Jun 2020 10:44:34 +0800 Subject: [PATCH 01/12] :lipstick: fix: style --- layout/layout.ejs | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/layout/layout.ejs b/layout/layout.ejs index 1616e91..f84d86f 100644 --- a/layout/layout.ejs +++ b/layout/layout.ejs @@ -2,6 +2,22 @@
+ <% if (theme.click_effect===2){ %> + + + <% } %> + <% if (theme.click_effect===3){ %> + + <% } %>
<%- body %> <%- partial('_partial/footer', null, {cache: !config.relative_link}) %> @@ -24,23 +40,6 @@ <% if (theme.music&&theme.music.enable){ %> <%- partial('_partial/music') %> <% } %> - - <% if (theme.click_effect===2){ %> - - - <% } %> - <% if (theme.click_effect===3){ %> - - <% } %>
From 48d03030a8cf2c8f0d73acb9d11e4243ee803a43 Mon Sep 17 00:00:00 2001 From: shen-yu <448766534@qq.com> Date: Sun, 7 Jun 2020 09:59:30 +0800 Subject: [PATCH 02/12] :package: update: valine --- _config.yml | 8 ++-- layout/_partial/post/valine.ejs | 69 ++++++++++++++++----------------- 2 files changed, 36 insertions(+), 41 deletions(-) diff --git a/_config.yml b/_config.yml index 33cd4b2..0068cf5 100644 --- a/_config.yml +++ b/_config.yml @@ -97,7 +97,7 @@ rss: /atom.xml darkmode: true # 动态背景效果: 0-关闭,1-动态线条(跟随鼠标) -canvas_bg: 1 +canvas_bg: 0 # 自定义鼠标样式,直接替换/images/mouse.cur文件 mouse: @@ -118,13 +118,11 @@ layout: # 启用Valine必须先创建leancloud应用, 获取 id|key 填入即可 leancloud: enable: true - app_id: # - app_key: # + app_id: chaSYi8FMdJBwzIBpxeNjqWC-gzGzoHsz + app_key: PqqkLYgPkHvH1BmyQqySWnSK # Valine配置 valine: enable: true # 是否启用 - verify: false # 是否启用防垃圾验证 - notify: false # 是否开启邮件提醒(https://valine.js.org/notify.html) avatar: monsterid # 头像样式(https://valine.js.org/avatar.html) placeholder: 给我的文章加点评论吧~ # placeholder diff --git a/layout/_partial/post/valine.ejs b/layout/_partial/post/valine.ejs index fef14fb..39c9a97 100644 --- a/layout/_partial/post/valine.ejs +++ b/layout/_partial/post/valine.ejs @@ -1,51 +1,48 @@ <% if (!index && theme.leancloud && theme.leancloud.enable){ %>
-
-
+
- + -<% } %> \ No newline at end of file +<% } %> From 5c501a9db76a17ba90c89dee0678c5e3c55d21a8 Mon Sep 17 00:00:00 2001 From: shen-yu <448766534@qq.com> Date: Sun, 7 Jun 2020 10:05:53 +0800 Subject: [PATCH 03/12] :package: update: minivaline --- _config.yml | 16 +++- layout/_partial/article.ejs | 112 ++++++++++++---------------- layout/_partial/post/minivaline.ejs | 48 ++++++++++++ 3 files changed, 109 insertions(+), 67 deletions(-) create mode 100644 layout/_partial/post/minivaline.ejs diff --git a/_config.yml b/_config.yml index 0068cf5..81630a5 100644 --- a/_config.yml +++ b/_config.yml @@ -112,7 +112,7 @@ layout: article_width: 80rem sidebar_width: 8rem -# 评论:1、Valine(推荐);2、Gitalk +# 评论:1、Valine(推荐);2、Gitalk;3、MiniValine # 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine) # 启用Valine必须先创建leancloud应用, 获取 id|key 填入即可 @@ -135,6 +135,20 @@ gitalk: owner: # GitHub ID admin: # GitHub ID +# 3、MiniValine +# See: https://github.com/MiniValine/MiniValine +minivaline: + enable: true + placeholder: Write a Comment # Comment box placeholder + adminEmailMd5: # The MD5 of Admin Email to show Admin Flag. + math: true # Support MathJax. + md: true # Support Markdown. + # MiniValine's display language depends on user's browser or system environment + # If you want everyone visiting your site to see a uniform language, you can set a force language value + # Available values: en | zh-CN | (and many more) + # More i18n info: https://github.com/MiniValine/minivaline-i18n + lang: + # GitHub Ribbons-封面右上角的forkme,换样式直接在source/images目录下替换forkme图片 github: # (关闭请设置为false) diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 5d0dfcc..cf1d997 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -1,85 +1,65 @@ -
- +
<% if (post.link || post.title){ %>
<%- partial('post/title', {class_name: 'article-title'}) %>
- <% } %> - - <% if (index || is_post()) { %> + <% } %> <% if (index || is_post()) { %> - <% } %> - - <% if (theme.toc && is_post()){ %> - <%- partial('post/tocbot') %> - <% } %> - - <% if (theme.excerpt_all&&index){ %> - <% }else{ %> + <% } %> <% if (theme.toc && is_post()){ %> <%- partial('post/tocbot') %> <% + } %> <% if (theme.excerpt_all&&index){ %> <% }else{ %>
- <%- partial('post/justifiedGallery') %> - <%- partial('post/gallery') %> - <% if (post.excerpt && index){ %> - <%- post.excerpt %> - <% if (theme.excerpt_link){ %> - <%= theme.excerpt_link %> - <% } %> - <% } else { %> - <%- post.content %> - <% } %> + <%- partial('post/justifiedGallery') %> <%- partial('post/gallery') %> <% + if (post.excerpt && index){ %> <%- post.excerpt %> <% if + (theme.excerpt_link){ %> + <%= theme.excerpt_link %> + <% } %> <% } else { %> <%- post.content %> <% } %> - <% if ((theme.reward_type === 2 || (theme.reward_type === 1 && post.reward)) && !index && !post.no_reward){ %> + <% if ((theme.reward_type === 2 || (theme.reward_type === 1 && + post.reward)) && !index && !post.no_reward){ %>
<%= __('post.reward') %>
<% } %>
<% } %> - - - <% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 && post.copyright)) && !index){ %> -
-
    -
  • - - <%= __('post.copyright_title') %>: - <%= __('post.copyright_content') %> -
  • -
-
- <% } %> + + + <% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 && + post.copyright)) && !index){ %> +
+
    +
  • + + <%= __('post.copyright_title') %>: + <%= __('post.copyright_content') %> +
  • +
+
+ <% } %> -
- <% if (!index){ %> - <%- partial('post/nav') %> - <% } %> - - <% if (theme.valine && theme.valine.enable && !post.no_valine){ %> - <%- partial('post/valine', { - key: post.slug, - title: post.title, - url: config.url+url_for(post.path) - }) %> - <% } %> - - <% if (is_post()) { %> - <%- partial('post/gitalk') %> - <% } %> - -
\ No newline at end of file + <% if (!index){ %> <%- partial('post/nav') %> <% } %> <% if (theme.valine && + theme.valine.enable && !post.no_valine){ %> <%- partial('post/valine', { key: + post.slug, title: post.title, url: config.url+url_for(post.path) }) %> <% } %> + <% if (is_post()) { %> <%- partial('post/gitalk') %> <% } %> <% if + (theme.minivaline && theme.minivaline.enable && !post.no_minivaline){ %> <%- + partial('post/minivaline') %> <% } %> +
diff --git a/layout/_partial/post/minivaline.ejs b/layout/_partial/post/minivaline.ejs new file mode 100644 index 0000000..e028a2f --- /dev/null +++ b/layout/_partial/post/minivaline.ejs @@ -0,0 +1,48 @@ +<% if (!index && theme.leancloud && theme.leancloud.enable){ %> + +
+
+
+ + + +<% } %> From 6a925ba53c8270b78e670b686f1f02776cd26161 Mon Sep 17 00:00:00 2001 From: shen-yu <448766534@qq.com> Date: Sun, 7 Jun 2020 10:10:49 +0800 Subject: [PATCH 04/12] :package: update: minivaline --- layout/_partial/post/minivaline.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/_partial/post/minivaline.ejs b/layout/_partial/post/minivaline.ejs index e028a2f..ba69f87 100644 --- a/layout/_partial/post/minivaline.ejs +++ b/layout/_partial/post/minivaline.ejs @@ -3,7 +3,7 @@
- + <% } %>