Welcome to mirror list, hosted at ThFree Co, Russian Federation.

comment.html « partials « layouts - github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 372df17f18cf64c710e57ab14dab0ee691e057d0 (plain)
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
{{ if .Site.Params.disqusShortname }}
<div id="disqus_thread"></div>
<script>
    /**
     *  RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT 
     *  THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR 
     *  PLATFORM OR CMS.
     *  
     *  LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: 
     *  https://disqus.com/admin/universalcode/#configuration-variables
     */
    var disqus_config = function () {
        // Replace PAGE_URL with your page's canonical URL variable
        this.page.url = '{{ .Permalink }}';  
        
        // Replace PAGE_IDENTIFIER with your page's unique identifier variable
        this.page.identifier = '{{ .Permalink }}'; 
    };
    (function() {
        var d = document, s = d.createElement('script');
        s.src = 'https://{{.Site.Params.disqusShortname}}.disqus.com/embed.js';
        s.setAttribute('data-timestamp', +new Date());
        (d.head || d.body).appendChild(s);
    })();
</script>
<noscript> Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow"> comments powered by Disqus.  </a> </noscript>
{{ end }}

{{ if .Site.Params.enableGitalk }}
<div id="gitalk-container"></div>
{{ end }}

{{ if .Site.Params.livereId }}
<div id="lv-container" data-id="city" data-uid={{.Site.Params.livereId}}>
	<noscript>{{ i18n "comments_activate_js" }}</noscript>
</div>
<script type="text/javascript">
    (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>
{{ end }}

{{ if .Site.Params.enableTwikoo }}
<div id="tcomment"></div>
<script>
twikoo.init({
    envId: {{.Site.Params.twikooEnvId}},
    el: '#tcomment',
    region: {{.Site.Params.twikooRegion}},
});
</script>
{{ end }}

{{ if .Site.Params.walineServer }}
<div id="waline"></div>
<script>
    Waline.init({
        el: '#waline',
        //path: location.pathname,
        serverURL: {{.Site.Params.walineServer}} ,
    });
    
    </script>
{{ end }}

{{ if .Site.Params.enableUtterances }}
<script src="https://utteranc.es/client.js"
        repo="{{ .Site.Params.utterances.repo }}"
        issue-term="{{ .Site.Params.utterances.term }}"
        label="{{ .Site.Params.utterances.label }}"
        theme="{{ .Site.Params.utterances.theme }}"
        crossorigin="anonymous"
        async>
</script>
{{ end }}