diff --git a/assets/js/third-party/comments/waline.js b/assets/js/third-party/comments/waline.js index 2ac0c23..97ad00a 100644 --- a/assets/js/third-party/comments/waline.js +++ b/assets/js/third-party/comments/waline.js @@ -10,9 +10,13 @@ document.addEventListener('DOMContentLoaded', () => { imguploader, pageview, placeholder, + sofa, requiredmeta, serverurl, - wordlimit + wordlimit, + reaction, + reactiontext, + reactiontitle } = NexT.CONFIG.waline.cfg; @@ -21,10 +25,16 @@ document.addEventListener('DOMContentLoaded', () => { const waline_js = NexT.utils.getCDNResource(NexT.CONFIG.waline.js); - const locale = { - placeholder: placeholder + let locale = { + placeholder : placeholder, + sofa : sofa, + reactionTitle : reactiontitle }; + reactiontext.forEach(function(value, index){ + locale['reaction'+index] = value; + }); + NexT.utils.loadComments(element) .then(() => NexT.utils.getScript(waline_js, { })) @@ -38,6 +48,7 @@ document.addEventListener('DOMContentLoaded', () => { imageUploader : imguploader, wordLimit : wordlimit, requiredMeta : requiredmeta, + reaction : reaction, serverURL : serverurl, lang : NexT.CONFIG.lang, dark : 'html[data-theme="dark"]' diff --git a/data/resources.yaml b/data/resources.yaml index e05d100..9159733 100644 --- a/data/resources.yaml +++ b/data/resources.yaml @@ -44,12 +44,12 @@ addthis: waline: js: name: '@waline/client' - version: 2.6.3 + version: 2.11.3 file: dist/waline.js alias: waline css: name: '@waline/client' - version: 2.6.3 + version: 2.11.3 file: dist/waline.css alias: waline diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index c16e35d..76a79a3 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -807,12 +807,16 @@ params: # Waline comments system # More info seee: https://waline.js.org/ waline: - pageView: true - placeholder: "请文明发言" + pageView: '#waline-pageview-count' + placeholder: "请文明发言哟 ヾ(≧▽≦*)o" + sofa: "快来发表你的意见吧 (≧∀≦)ゞ" emoji: false imgUploader: false wordLimit: 200 requiredMeta: ['nick', 'mail'] + reaction: true + reactionText: [ '点赞', '踩一下', '得意', '不屑', '尴尬', '睡觉'] + reactionTitle: "你认为这篇文章怎么样?" serverURL: # # Artalk 评论插件