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

comments.html « partials « layouts - github.com/Fastbyte01/KeepIt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2bce4482f3cf310d5b6e502052c946dce976f7b9 (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
{{ if and .IsPage (ne .Params.comment false) -}}
  <!-- Disqus Comment System-->
  {{- if .Site.DisqusShortname -}}
    <div id="disqus_thread"></div>
    <script type="text/javascript">
    (function() {
      // Don't ever inject Disqus on localhost--it creates unwanted
      // discussions from 'localhost:1313' on your Disqus account...
      if (window.location.hostname === 'localhost') return;

      var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
      var disqus_shortname = '{{ .Site.DisqusShortname }}';
      dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
      (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  {{- end -}}

  <!-- gitalk Comment System-->
  {{- if .Site.Params.gitalk.owner -}}
    <div id="gitalk-container"></div>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js" crossorigin="anonymous"></script>
    <script type="text/javascript">
      var gitalk = new Gitalk({
        id: '{{ .Date }}',
        title: '{{ .Title }}',
        clientID: '{{ .Site.Params.gitalk.clientId }}',
        clientSecret: '{{ .Site.Params.gitalk.clientSecret }}',
        repo: '{{ .Site.Params.gitalk.repo }}',
        owner: '{{ .Site.Params.gitalk.owner }}',
        admin: ['{{ .Site.Params.gitalk.owner }}'],
        body: decodeURI(location.href)
      });
      gitalk.render('gitalk-container');
    </script>
    <noscript>Please enable JavaScript to view the <a href="https://github.com/gitalk/gitalk">comments powered by gitalk.</a></noscript>
  {{- end }}

{{- end }}