-
Notifications
You must be signed in to change notification settings - Fork 1
/
_comment.html
executable file
·88 lines (83 loc) · 2.87 KB
/
_comment.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!--
{{if .Site.Comment}}
<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
<div id="comments" class="gen">
<script>
//来必力City版
document.write('<div id="lv-container" data-id="city" data-uid="{{.Site.Comment}}"></div>');
var site_comment_load = function livere() {
(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');
}
</script>
</div>
{{end}}
-->
<!--
{{if .Site.Comment}}
<noscript>为正常使用Gitment评论功能请激活JavaScript</noscript>
<div id="comments" class="gen">
<script>
//Gitment
var site_comment_load = function gitment_comment() {
$('head').append('<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">');
$.getScript('https://imsun.github.io/gitment/dist/gitment.browser.js', function() {
var gitment_config = '{{.Site.Comment}}'.split(':');
var gitment = new Gitment({
id: String({{.Date}}),
owner: gitment_config[0],
repo: gitment_config[1],
oauth: {
client_id: gitment_config[2],
client_secret: gitment_config[3],
},
});
gitment.render('comments');
});
}
</script>
</div>
{{end}}
-->
<!--
{{if .Site.Comment}}
<noscript>为正常使用Valine评论功能请激活JavaScript</noscript>
<div id="comments" class="gen">
<script>
//Valine
var site_comment_load = function valine() {
$.getScript('//cdn1.lncld.net/static/js/3.0.4/av-min.js');
$.getScript('//unpkg.com/valine/dist/Valine.min.js', function() {
var valine_config = '{{.Site.Comment}}'.split(':');
new Valine({
el: '#comments',
appId: valine_config[0],
appKey: valine_config[1]
});
});
}
</script>
</div>
{{end}}
-->
{{if .Site.Comment}}
<noscript>为正常使用Disqus评论功能请激活JavaScript</noscript>
<div id="comments" class="gen">
<script>
//Disqus
document.write('<section id="disqus_thread"></section>');
var site_comment_load = function disqus() {
var d = document, s = d.createElement('script');
s.src = '//{{.Site.Comment}}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
}
</script>
</div>
{{end}}