提交 a9579eb3 编写于 作者: EvanOne(文一)'s avatar EvanOne(文一)

feat: Add livere comment

chore: Update
上级 b1fa03cf
......@@ -377,6 +377,10 @@ gitalk:
# Available values: en, zh-CN, es-ES, fr, ru, zh-TW
language:
livere:
enable: false
uid:
# ---------------------------------------------------------------
# Statistics and Analytics config
# ---------------------------------------------------------------
......
......@@ -9,3 +9,6 @@ if theme.gitment && theme.gitment.enable
else if theme.gitalk && theme.gitalk.enable
div#comments.comments.main-content-layout
div#gitalk-container
else if theme.livere && theme.livere.enable
div#comments.comments.main-content-layout
div#lv-container(data-id="city" data-uid=theme.livere.uid)
......@@ -9,7 +9,7 @@ script(src="https://cdn.jsdelivr.net/npm/js-md5@latest/src/md5.min.js")
window.navigator.userLanguage));
script.
window.onload = function () {
window.onload = function() {
let gitalk = new Gitalk({
id: md5(decodeURI(location.pathname)),
clientID: '!{ theme.gitalk.client_id }',
......
......@@ -15,7 +15,7 @@ script.
gitment.render("gitment-container")
}
window.onload = function () {
window.onload = function() {
if (!{theme.gitment.lazy}) {
function showGitment() {
document.getElementById("gitment-button").style.display = "none";
......
......@@ -3,3 +3,5 @@ if page.comments
include ./gitment.pug
else if theme.gitalk && theme.gitalk.enable
include ./gitalk.pug
else if theme.livere && theme.livere.enable
include ./livere.pug
script.
window.onload = function() {
(function(d, s) {
var j, e = d.getElementsByTagName(s)[0];
if (typeof LivereTower === 'function') { return; }
j = d.createElement(s);
j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
j.async = true;
e.parentNode.insertBefore(j, e);
})(document, 'script');
};
......@@ -31,3 +31,7 @@
& > :first-child
margin: 0 auto
// Livere
#lv-container
width: 100%
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册