From 0f33f449f01d617254e283c5aa1c37a83a68c375 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <17683872107czx> Date: Mon, 18 Sep 2023 14:16:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 144 +++++------ templates/assets/js/comment/artalk.js | 15 +- templates/assets/js/comment/twikoo.js | 63 +++++ templates/assets/js/comment/waline.js | 5 +- templates/assets/js/heo.js | 70 ++++++ templates/assets/zhheo/blogex.js | 5 +- templates/assets/zhheo/custom.css | 21 ++ templates/assets/zhheo/rightmenu.js | 2 +- templates/assets/zhheo/zhheoblog.css | 5 + templates/comments.html | 3 +- templates/modules/comment.html | 40 +++- templates/modules/comment/Artalk.html | 169 ++++++++++++- templates/modules/comment/Twikoo.html | 224 ++++++++++++------ templates/modules/comment/Waline.html | 162 ++++++++++++- .../comment/newest-comments/Artalk.html | 163 ------------- .../comment/newest-comments/Twikoo.html | 165 ------------- .../comment/newest-comments/Waline.html | 157 ------------ templates/modules/head.html | 6 +- templates/modules/layouts/layout.html | 20 +- templates/modules/sidebar.html | 2 +- templates/modules/widgets/nav-right.html | 2 +- 21 files changed, 749 insertions(+), 694 deletions(-) create mode 100644 templates/assets/js/comment/twikoo.js delete mode 100644 templates/modules/comment/newest-comments/Artalk.html delete mode 100644 templates/modules/comment/newest-comments/Twikoo.html delete mode 100644 templates/modules/comment/newest-comments/Waline.html diff --git a/settings.yaml b/settings.yaml index 31bbf899..0091c58c 100644 --- a/settings.yaml +++ b/settings.yaml @@ -2261,11 +2261,23 @@ spec: - group: comments label: 评论 formSchema: + - $formkit: radio + name: commentsEnable + id: commentsEnable + key: commentsEnable + label: 开关 + value: true + options: + - label: 打开 + value: true + - label: 关闭 + value: false - $formkit: select name: use label: 请选择评论系统 id: use key: use + if: $get(commentsEnable).value value: commentWidget options: - label: 默认 @@ -2277,63 +2289,18 @@ spec: - label: Waline value: Waline - $formkit: radio - if: $get(use).value == 'Twikoo' - name: twikooEnable - id: twikooEnable - key: twikooEnable - label: Twikoo - value: true - help: Twikoo评论需要填写下方配置 + if: ($get(use).value == 'Twikoo' || $get(use).value == 'Artalk' || $get(use).value == 'Waline' ) && $get(commentsEnable).value + name: lazyload + label: 评论懒加载 + value: false + help: 当评论进入浏览器的视窗时,将加载评论系统。 options: - label: 打开 value: true - label: 关闭 value: false - $formkit: group - if: $get(twikooEnable).value - name: twikoos - key: twikoos - label: Twikoo评论配置 (文档:https://twikoo.js.org/) - value: - envId: - accessToken: - js: "" - children: - - $formkit: url - name: envId - key: envId - label: Twikoo评论 - 环境id/后端URL - placeholder: 请输入环境id或URL - help: 详情请查看文档 (后缀带 / ) - validation: required - - $formkit: text - name: accessToken - key: accessToken - label: Twikoo评论 - 管理员令牌 - placeholder: 请输入token - help: 在浏览器F12的控制台中获取,用于显示弹幕,详情请查看文档 - validation: required - - $formkit: text - name: js - key: js - label: Twikoo评论 - js - placeholder: 请输入js文件地址 - help: 主题的twikoo版本是最新版本(如果你使用的不是最新版本请自己引入js文件) - - $formkit: radio - if: $get(use).value == 'Artalk' - name: artalkEnable - id: artalkEnable - key: artalkEnable - label: Artalk - value: true - help: Artalk评论需要填写下方配置 - options: - - label: 打开 - value: true - - label: 关闭 - value: false - - $formkit: group - if: $get(artalkEnable).value + if: $get(commentsEnable).value && $get(use).value == 'Artalk' name: artalks key: artalks label: Artalk评论配置 (文档:https://artalk.js.org/) @@ -2368,21 +2335,38 @@ spec: label: Artalk评论 - css placeholder: 请输入css文件地址 help: 主题的Artalk版本是最新版本(如果你使用的不是最新版本请自己引入css文件) - - $formkit: radio - if: $get(use).value == 'Waline' - name: walineEnable - id: walineEnable - key: walineEnable - label: Waline - value: true - help: Waline评论需要填写下方配置 - options: - - label: 打开 - value: true - - label: 关闭 - value: false - $formkit: group - if: $get(walineEnable).value + if: $get(commentsEnable).value && $get(use).value == 'Twikoo' + name: twikoos + key: twikoos + label: Twikoo评论配置 (文档:https://twikoo.js.org/) + value: + envId: + accessToken: + js: "" + children: + - $formkit: url + name: envId + key: envId + label: Twikoo评论 - 环境id/后端URL + placeholder: 请输入环境id或URL + help: 详情请查看文档 (后缀带 / ) + validation: required + - $formkit: text + name: accessToken + key: accessToken + label: Twikoo评论 - 管理员令牌 + placeholder: 请输入token + help: 在浏览器F12的控制台中获取,用于显示弹幕,详情请查看文档 + validation: required + - $formkit: text + name: js + key: js + label: Twikoo评论 - js + placeholder: 请输入js文件地址 + help: 主题的twikoo版本是最新版本(如果你使用的不是最新版本请自己引入js文件) + - $formkit: group + if: $get(commentsEnable).value && $get(use).value == 'Waline' name: walines key: walines label: Waline评论配置 (文档:https://waline.js.org/) @@ -2410,11 +2394,31 @@ spec: label: Waline评论 - css placeholder: 请输入css文件地址 help: 主题的walines版本是最新版本(如果你使用的不是最新版本请自己引入css文件) + - $formkit: group + if: ($get(use).value == 'Twikoo' || $get(use).value == 'Artalk' || $get(use).value == 'Waline' ) && $get(commentsEnable).value + name: visitorMail + label: 评论匿名邮箱 + value: + visitorMailEnable: true + mail: visitor@xxx.com + children: + - $formkit: radio + name: visitorMailEnable + id: visitorMailEnable + key: visitorMailEnable + options: + - label: 打开 + value: true + - label: 关闭 + value: false + - $formkit: text + if: $get(visitorMailEnable).value + name: mail + label: 匿名邮箱 + placeholder: 请输入匿名邮箱 - $formkit: group name: commentBarrageConfig - if: ($get(use).value == 'Artalk' && $get(artalkEnable).value) || - ($get(use).value == 'Twikoo' && $get(twikooEnable).value) || - ($get(use).value == 'Waline' && $get(walineEnable).value) + if: ($get(use).value == 'Twikoo' || $get(use).value == 'Artalk' || $get(use).value == 'Waline' ) && $get(commentsEnable).value label: 留言弹幕配置 value: commentBarrageEnable: true @@ -2427,9 +2431,9 @@ spec: id: commentBarrageEnable key: commentBarrageEnable options: - - label: 打开 + - label: 显示 value: true - - label: 关闭 + - label: 隐藏 value: false - $formkit: number if: $get(commentBarrageEnable).value diff --git a/templates/assets/js/comment/artalk.js b/templates/assets/js/comment/artalk.js index e193ed01..b1306148 100644 --- a/templates/assets/js/comment/artalk.js +++ b/templates/assets/js/comment/artalk.js @@ -7,7 +7,7 @@ server: GLOBAL_CONFIG.source.artalk.artalkUrl, site: GLOBAL_CONFIG.source.artalk.siteName, pageKey: location.pathname, - darkMode: document.documentElement.getAttribute('data-theme') === 'dark', + darkMode: false, countEl: '#ArtalkCount' }, null)) @@ -31,22 +31,13 @@ } } - document.getElementById('darkmode') && document.getElementById('darkmode').addEventListener('click', () => { - setDarkMode() - }) - document.getElementById('menu-darkmode') && document.getElementById('menu-darkmode').addEventListener('click', () => { - setDarkMode() - }) - document.getElementById('darkmode_switchbutton') && document.getElementById('darkmode_switchbutton').addEventListener('click', () => { - setDarkMode() - }) function setDarkMode() { if (typeof window.artalkItem !== 'object') return let isDark = document.documentElement.getAttribute('data-theme') === 'dark' window.artalkItem.setDarkMode(!isDark) } - if ('Artalk' === 'Artalk' || !false) { - if (false) btf.loadComment(document.getElementById('artalk-wrap'), loadArtalk) + if ('Artalk' === 'Artalk' || !GLOBAL_CONFIG.source.comments.lazyload) { + if (GLOBAL_CONFIG.source.comments.lazyload) btf.loadComment(document.getElementById('artalk-wrap'), loadArtalk) else loadArtalk() } else { window.loadOtherComment = loadArtalk diff --git a/templates/assets/js/comment/twikoo.js b/templates/assets/js/comment/twikoo.js new file mode 100644 index 00000000..9ee2a9ff --- /dev/null +++ b/templates/assets/js/comment/twikoo.js @@ -0,0 +1,63 @@ +(() => { + if (!document.getElementById('post-comment')) return + const init = () => { + twikoo.init(Object.assign({ + el: '#twikoo-wrap', + envId: GLOBAL_CONFIG.source.twikoo.twikooUrl, + region: '', + onCommentLoaded: function () { + btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.tk-owo-emotion)')) + typeof hljs === 'object' && hljs.highlightAll() + typeof Prism === 'object' && Prism.highlightAll() + $("input").focus(function () { + heo_intype = true; + }); + $("textarea").focus(function () { + heo_intype = true; + }); + $("input").focusout(function () { + heo_intype = false; + }); + $("textarea").focusout(function () { + heo_intype = false; + }); + } + }, null)) + } + + const getCount = () => { + twikoo.getCommentsCount({ + envId: GLOBAL_CONFIG.source.twikoo.twikooUrl, + region: '', + urls: [window.location.pathname], + includeReply: true + }).then(function (res) { + document.getElementById('twikoo-count').innerText = res[0].count + }).catch(function (err) { + }); + } + + const runFn = () => { + init() + true && getCount() + } + + const loadTwikoo = () => { + if (typeof twikoo === 'object') { + setTimeout(runFn, 0) + return + } + getScript(GLOBAL_CONFIG.source.twikoo.js).then(runFn) + } + + if ('Twikoo' === 'Twikoo' || !GLOBAL_CONFIG.source.comments.lazyload) { + if (GLOBAL_CONFIG.source.comments.lazyload) btf.loadComment(document.getElementById('twikoo-wrap'), loadTwikoo) + else loadTwikoo() + } else { + window.loadOtherComment = () => { + loadTwikoo() + } + } + + +})() \ No newline at end of file diff --git a/templates/assets/js/comment/waline.js b/templates/assets/js/comment/waline.js index beb82c3c..77e93bae 100644 --- a/templates/assets/js/comment/waline.js +++ b/templates/assets/js/comment/waline.js @@ -14,14 +14,13 @@ const loadWaline = async () => { if (typeof Waline === 'object') initWaline() else { - await getCSS(GLOBAL_CONFIG.source.waline.css) await getScript(GLOBAL_CONFIG.source.waline.js) initWaline() } } - if ('Waline' === 'Waline' || !false) { - if (false) btf.loadComment(document.getElementById('waline-wrap'), loadWaline) + if ('Waline' === 'Waline' || !GLOBAL_CONFIG.source.comments.lazyload) { + if (GLOBAL_CONFIG.source.comments.lazyload) btf.loadComment(document.getElementById('waline-wrap'), loadWaline) else setTimeout(loadWaline, 0) } else { window.loadOtherComment = loadWaline diff --git a/templates/assets/js/heo.js b/templates/assets/js/heo.js index 5c580018..b736886f 100644 --- a/templates/assets/js/heo.js +++ b/templates/assets/js/heo.js @@ -443,6 +443,74 @@ var heo = { lastSayHello = o }, + //匿名评论 + addRandomCommentInfo: function () { + // 从形容词数组中随机取一个值 + const randomAdjective = adjectives[Math.floor(Math.random() * adjectives.length)]; + + // 从蔬菜水果动物名字数组中随机取一个值 + const randomName = vegetablesAndFruits[Math.floor(Math.random() * vegetablesAndFruits.length)]; + + // 将两个值组合成一个字符串 + const name = `${randomAdjective}${randomName}`; + + function dr_js_autofill_commentinfos() { + var lauthor = [ + "#author", + "input[name='comname']", + "#inpName", + "input[name='author']", + "#ds-dialog-name", + "#name", + "input[name='nick']", + "#comment_author", + ], + lmail = [ + "#mail", + "#email", + "input[name='commail']", + "#inpEmail", + "input[name='email']", + "#ds-dialog-email", + "input[name='mail']", + "#comment_email", + ], + lurl = [ + "#url", + "input[name='comurl']", + "#inpHomePage", + "#ds-dialog-url", + "input[name='url']", + "input[name='website']", + "#website", + "input[name='link']", + "#comment_url", + ]; + for (var i = 0; i < lauthor.length; i++) { + var author = document.querySelector(lauthor[i]); + if (author != null) { + author.value = name; + author.dispatchEvent(new Event("input")); + author.dispatchEvent(new Event("change")); + break; + } + } + for (var j = 0; j < lmail.length; j++) { + var mail = document.querySelector(lmail[j]); + if (mail != null) { + mail.value = visitorMail; + mail.dispatchEvent(new Event("input")); + mail.dispatchEvent(new Event("change")); + break; + } + } + return !1; + } + dr_js_autofill_commentinfos(); + var input = document.getElementsByClassName(GLOBAL_CONFIG.source.comments.textarea)[0]; + input.focus(); + input.setSelectionRange(-1, -1); + }, //初始化console图标 initConsoleState: function() { @@ -505,6 +573,8 @@ var heo = { }, }; +const adjectives = ["美丽的", "英俊的", "聪明的", "勇敢的", "可爱的", "慷慨的", "善良的", "可靠的", "开朗的", "成熟的", "稳重的", "真诚的", "幽默的", "豁达的", "有趣的", "活泼的", "优雅的", "敏捷的", "温柔的", "温暖的", "敬业的", "细心的", "耐心的", "深沉的", "朴素的", "含蓄的", "率直的", "开放的", "务实的", "坚强的", "自信的", "谦虚的", "文静的", "深刻的", "纯真的", "朝气蓬勃的", "慎重的", "大方的", "顽强的", "迷人的", "机智的", "善解人意的", "富有想象力的", "有魅力的", "独立的", "好奇的", "干净的", "宽容的", "尊重他人的", "体贴的", "守信的", "有耐性的", "有责任心的", "有担当的", "有远见的", "有智慧的", "有眼光的", "有冒险精神的", "有爱心的", "有同情心的", "喜欢思考的", "喜欢学习的", "具有批判性思维的", "善于表达的", "善于沟通的", "善于合作的", "善于领导的", "有激情的", "有幽默感的", "有思想的", "有个性的", "有正义感的", "有责任感的", "有创造力的", "有想象力的", "有艺术细胞的", "有团队精神的", "有协调能力的", "有决策能力的", "有组织能力的", "有学习能力的", "有执行能力的", "有分析能力的", "有逻辑思维的", "有创新能力的", "有专业素养的", "有商业头脑的"] + , vegetablesAndFruits = ["萝卜", "白菜", "芹菜", "生菜", "青椒", "辣椒", "茄子", "豆角", "黄瓜", "西红柿", "洋葱", "大蒜", "土豆", "南瓜", "豆腐", "韭菜", "花菜", "西兰花", "蘑菇", "金针菇", "苹果", "香蕉", "橙子", "柠檬", "猕猴桃", "草莓", "葡萄", "桃子", "杏子", "李子", "石榴", "西瓜", "哈密瓜", "蜜瓜", "樱桃", "蓝莓", "柿子", "橄榄", "柚子", "火龙果"]; $(document).ready((function() { initBlog() } diff --git a/templates/assets/zhheo/blogex.js b/templates/assets/zhheo/blogex.js index 98185397..9c25a5a0 100644 --- a/templates/assets/zhheo/blogex.js +++ b/templates/assets/zhheo/blogex.js @@ -293,8 +293,7 @@ function rightMenuCommentText(txt) { if (GLOBAL_CONFIG.rightMenuEnable) { rm.hideRightMenu(); } - var input = GLOBAL_CONFIG.source.comments.use=='Twikoo' ? document.getElementsByClassName('el-textarea__inner')[0] : - GLOBAL_CONFIG.source.comments.use=='Artalk' ? document.getElementsByClassName('atk-textarea')[0] : document.getElementsByClassName('appearance-none')[0]; + var input = document.getElementsByClassName(GLOBAL_CONFIG.source.comments.textarea)[0]; let evt = document.createEvent('HTMLEvents'); evt.initEvent('input', true, true); let inputValue = replaceAll(txt, '\n', '\n> ') @@ -434,7 +433,7 @@ function removeLoading() { } function addFriendLink() { - var input = document.getElementsByClassName('el-textarea__inner')[0]; + var input = document.getElementsByClassName(GLOBAL_CONFIG.source.comments.textarea)[0]; let evt = document.createEvent('HTMLEvents'); evt.initEvent('input', true, true); input.value = '昵称(请勿包含博客等字样):\n网站地址(要求博客地址,请勿提交个人主页):\n头像图片url(请提供尽可能清晰的图片,我会上传到我自己的图床):\n描述:\n'; diff --git a/templates/assets/zhheo/custom.css b/templates/assets/zhheo/custom.css index cc08e66a..290d4c09 100644 --- a/templates/assets/zhheo/custom.css +++ b/templates/assets/zhheo/custom.css @@ -2515,4 +2515,25 @@ p.p.gray,span.p.gray { -o-transform: rotate(360deg); -ms-transform: rotate(360deg); transform: rotate(360deg); +} + +[data-theme=dark] .artalk,[data-theme=dark] .atk-layer-wrap{ + --at-color-font: #fff; + --at-color-deep: #e7e7e7; + --at-color-sub: #e7e7e7; + --at-color-grey: #fff; + --at-color-meta: #fff; + --at-color-border: #2d3235; + --at-color-light: #687a86; + --at-color-bg: #1e2224; + --at-color-bg-transl: rgba(30, 34, 36, .95); + --at-color-bg-grey: #46494e; + --at-color-bg-grey-transl: rgba(8, 8, 8, .95); + --at-color-bg-light: rgba(29, 161, 242, .1); + --at-color-main: #0083ff; + --at-color-red: #ff5652; + --at-color-pink: #fa5a57; + --at-color-yellow: #ff7c37; + --at-color-green: #4caf50; + --at-color-gradient: linear-gradient(180deg, transparent, rgba(30, 34, 36, 1)) } \ No newline at end of file diff --git a/templates/assets/zhheo/rightmenu.js b/templates/assets/zhheo/rightmenu.js index fbb90519..f4f16ad8 100644 --- a/templates/assets/zhheo/rightmenu.js +++ b/templates/assets/zhheo/rightmenu.js @@ -321,7 +321,7 @@ rm.pasteText = function () { //引用到评论 rm.rightMenuCommentText = function (txt) { rm.hideRightMenu(); - var input = document.getElementsByClassName('el-textarea__inner')[0]; + var input = document.getElementsByClassName(GLOBAL_CONFIG.source.comments.textarea)[0]; let evt = document.createEvent('HTMLEvents'); evt.initEvent('input', true, true); let inputValue = replaceAll(txt, '\n', '\n> ') diff --git a/templates/assets/zhheo/zhheoblog.css b/templates/assets/zhheo/zhheoblog.css index 468afd5b..ebe798a7 100644 --- a/templates/assets/zhheo/zhheoblog.css +++ b/templates/assets/zhheo/zhheoblog.css @@ -12770,6 +12770,11 @@ button.el-button.tk-cancel.el-button--default.el-button--small { flex-wrap: wrap; } +.comment-randomInfo { + margin-left: auto; + font-size: 13px; +} + /* 隐藏没有评论 */ .tk-comments-no { /* display: none !important; */ diff --git a/templates/comments.html b/templates/comments.html index b5ad2be2..b64295e4 100644 --- a/templates/comments.html +++ b/templates/comments.html @@ -151,8 +151,7 @@ -
diff --git a/templates/modules/comment.html b/templates/modules/comment.html index 5283ea07..d34bfdb4 100644 --- a/templates/modules/comment.html +++ b/templates/modules/comment.html @@ -1,21 +1,43 @@ - - - - + -
+
评论
- +
你无需删除空行,直接评论以获取最佳展示效果
- + + + +
+ +
+ +
+ +
+ +
\ No newline at end of file diff --git a/templates/modules/comment/Artalk.html b/templates/modules/comment/Artalk.html index 524fcbb6..120688ca 100644 --- a/templates/modules/comment/Artalk.html +++ b/templates/modules/comment/Artalk.html @@ -1,15 +1,162 @@ - -
-
-
评论
- -
- 你无需删除空行,直接评论以获取最佳展示效果 -
+ + +
+ +
-
-
+ + + + + \ No newline at end of file diff --git a/templates/modules/comment/Twikoo.html b/templates/modules/comment/Twikoo.html index 56a4b448..97b82154 100644 --- a/templates/modules/comment/Twikoo.html +++ b/templates/modules/comment/Twikoo.html @@ -1,93 +1,167 @@ - -
-
-
评论
- -
- 你无需删除空行,直接评论以获取最佳展示效果 -
+
+
-
- + if (array.length) { + for (let i = 0; i < array.length; i++) { + if (i == 6) { + break; + } + result += '
' - + let $dom = document.querySelector('#card-newest-comments .aside-list') + $dom.innerHTML = result + window.lazyLoadInstance && window.lazyLoadInstance.update() + window.pjax && window.pjax.refresh($dom) + } + const necommHtml = array => { + let result = '' -
+ const pagesize = [[${theme.config.sidebar.newcommentnumber}]]; + const defaultpagesize = 5; + const finalpagesize = pagesize <= 0 ? defaultpagesize : pagesize; + if (array.length) { + for (let i = 0; i < array.length; i++) { + if (i == finalpagesize) { + break; + } + result += '
' + + if (true) { + let name = 'src' + if([[${isLazyload}]]){ + name = 'data-lazy-src' + } + result += ` + + dasda + + ` + } + + result += ` +
+ + ${array[i].content} + +
+ ${array[i].nick} / + +
+
+
+ ` + + } + } else { + result += '没有评论' + } + + let $dom = document.querySelector('#newcomm') + $dom.innerHTML = result + window.lazyLoadInstance && window.lazyLoadInstance.update() + window.pjax && window.pjax.refresh($dom) + } + + const newestCommentInit = () => { + if (document.querySelector('#card-newest-comments .aside-list')) { + const data = saveToLocal.get('twikoo-newest-comments') + if (data) { + generateHtml(JSON.parse(data)) + document.querySelector('#newcomm') && necommHtml(JSON.parse(data)) + } else { + getComment() + } + } + } + + newestCommentInit() + document.addEventListener('pjax:complete', newestCommentInit) + }) + + \ No newline at end of file diff --git a/templates/modules/comment/Waline.html b/templates/modules/comment/Waline.html index 2fe02765..0128f000 100644 --- a/templates/modules/comment/Waline.html +++ b/templates/modules/comment/Waline.html @@ -1,16 +1,156 @@ - -
-
-
评论
- -
- 你无需删除空行,直接评论以获取最佳展示效果 -
+
+
-
-
+ + \ No newline at end of file diff --git a/templates/modules/comment/newest-comments/Artalk.html b/templates/modules/comment/newest-comments/Artalk.html deleted file mode 100644 index df78ea25..00000000 --- a/templates/modules/comment/newest-comments/Artalk.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - -
- - -
- - - -
- - \ No newline at end of file diff --git a/templates/modules/comment/newest-comments/Twikoo.html b/templates/modules/comment/newest-comments/Twikoo.html deleted file mode 100644 index 840c4201..00000000 --- a/templates/modules/comment/newest-comments/Twikoo.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/templates/modules/comment/newest-comments/Waline.html b/templates/modules/comment/newest-comments/Waline.html deleted file mode 100644 index 55e96cf7..00000000 --- a/templates/modules/comment/newest-comments/Waline.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - -
- -
- -
- \ No newline at end of file diff --git a/templates/modules/head.html b/templates/modules/head.html index 29311ce5..b3ac58b7 100644 --- a/templates/modules/head.html +++ b/templates/modules/head.html @@ -225,6 +225,10 @@ maxBarrage: [[${ theme.config.comments.commentBarrageConfig.maxBarrage }]], barrageTime: [[${ theme.config.comments.commentBarrageConfig.barrageTime }]], mailMd5: "[(${theme.config.comments.commentBarrageConfig.mailMd5})]", + lazyload: [[${theme.config.comments.lazyload}]], + textarea: [[${ theme.config.comments.use == 'Twikoo' ? 'el-textarea__inner' : + theme.config.comments.use == 'Artalk' ? 'atk-textarea' : + theme.config.comments.use == 'Waline' ? 'wl-editor' : 'appearance-none' }]] }, twikoo:{ js:[[${not #strings.isEmpty(theme.config.comments.twikoos.js) ? theme.config.comments.twikoos.js : assets_link +'/libs/twikoo/twikoo.all.min.js' }]], @@ -240,7 +244,7 @@ }, waline:{ js:[[${not #strings.isEmpty(theme.config.comments.walines.walinesJs) ? theme.config.comments.walines.walinesJs : 'https://cdn.cbd.int/@waline/client@2.15.7/dist/waline.js' }]], - css:[[${not #strings.isEmpty(theme.config.comments.walines.walinesCss) ? theme.config.comments.walines.walinesCss : 'https://cdn.cbd.int/@waline/client@2.15.7/dist/waline.css' }]], + css:[[]], serverURL: "[(${theme.config.comments.walines.serverURL})]", }, welcome:{ diff --git a/templates/modules/layouts/layout.html b/templates/modules/layouts/layout.html index 6e08176d..bf5fa853 100644 --- a/templates/modules/layouts/layout.html +++ b/templates/modules/layouts/layout.html @@ -12,6 +12,9 @@ + @@ -68,11 +71,11 @@ - - + + - @@ -100,14 +103,13 @@ - - diff --git a/templates/modules/sidebar.html b/templates/modules/sidebar.html index 7486e4ef..ca33b10b 100644 --- a/templates/modules/sidebar.html +++ b/templates/modules/sidebar.html @@ -8,7 +8,7 @@