diff options
Diffstat (limited to 'layouts/partials/comments.html')
-rw-r--r-- | layouts/partials/comments.html | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 440240a..cac3546 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,4 +1,4 @@ -{{ if and .IsPage (ne .Params.comment false) }} +{{ if and .IsPage (ne .Params.comment false) -}} <!-- Disqus --> {{- if .Site.DisqusShortname -}} <div id="disqus_thread"></div> @@ -34,76 +34,76 @@ <!-- LiveRe --> {{- if .Site.Params.livereUID -}} - <div id="lv-container" data-id="city" data-uid="{{ .Site.Params.livereUID }}"> - <script type="text/javascript"> - (function(d, s) { - var j, e = d.getElementsByTagName(s)[0]; + <div id="lv-container" data-id="city" data-uid="{{ .Site.Params.livereUID }}"> + <script type="text/javascript"> + (function(d, s) { + var j, e = d.getElementsByTagName(s)[0]; - if (typeof LivereTower === 'function') { return; } + if (typeof LivereTower === 'function') { return; } - j = d.createElement(s); - j.src = 'https://cdn-city.livere.com/js/embed.dist.js'; - j.async = true; + 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> - <noscript>Please enable JavaScript to view the comments powered by <a href="https://livere.com/">LiveRe.</a></noscript> - </div> + e.parentNode.insertBefore(j, e); + })(document, 'script'); + </script> + <noscript>Please enable JavaScript to view the comments powered by <a href="https://livere.com/">LiveRe.</a></noscript> + </div> {{- end -}} <!-- gitment --> {{- if .Site.Params.gitment.owner -}} - <div id="comments-gitment"></div> - {{ if .Site.Params.publicCDN.enable -}} - {{ .Site.Params.publicCDN.gitmentCSS | safeHTML }} - {{ .Site.Params.publicCDN.gitmentJS | safeHTML }} - {{- else -}} - <link rel="stylesheet" href="{{ "lib/gitment/gitment-0.0.3.min.css" | relURL }}"> - <script src="{{ "lib/gitment/gitment-0.0.3.min.js" | relURL }}"></script> - {{- end }} - <script type="text/javascript"> - const gitment = new Gitment({ - id: '{{ .Date }}', - title: '{{ .Title }}', - link: decodeURI(location.href), - desc: '{{ .Summary }}', - owner: '{{ .Site.Params.gitment.owner }}', - repo: '{{ .Site.Params.gitment.repo }}', - oauth: { - client_id: '{{ .Site.Params.gitment.clientId }}', - client_secret: '{{ .Site.Params.gitment.clientSecret }}' - } - }) - gitment.render('comments-gitment') - </script> - <noscript>Please enable JavaScript to view the <a href="https://github.com/imsun/gitment">comments powered by gitment.</a></noscript> - {{- end }} + <div id="comments-gitment"></div> + {{ if .Site.Params.publicCDN.enable -}} + {{ .Site.Params.publicCDN.gitmentCSS | safeHTML }} + {{ .Site.Params.publicCDN.gitmentJS | safeHTML }} + {{- else -}} + <link rel="stylesheet" href="{{ "lib/gitment/gitment-0.0.3.min.css" | relURL }}"> + <script src="{{ "lib/gitment/gitment-0.0.3.min.js" | relURL }}"></script> + {{- end }} + <script type="text/javascript"> + var gitment = new Gitment({ + id: '{{ .Date }}', + title: '{{ .Title }}', + link: decodeURI(location.href), + desc: '{{ .Summary }}', + owner: '{{ .Site.Params.gitment.owner }}', + repo: '{{ .Site.Params.gitment.repo }}', + oauth: { + client_id: '{{ .Site.Params.gitment.clientId }}', + client_secret: '{{ .Site.Params.gitment.clientSecret }}' + } + }); + gitment.render('comments-gitment'); + </script> + <noscript>Please enable JavaScript to view the <a href="https://github.com/imsun/gitment">comments powered by gitment.</a></noscript> + {{- end -}} <!-- gitalk --> {{- if .Site.Params.gitalk.owner -}} - <div id="gitalk-container"></div> - {{ if .Site.Params.publicCDN.enable -}} - {{ .Site.Params.publicCDN.gitalkCSS | safeHTML }} - {{ .Site.Params.publicCDN.gitalkJS | safeHTML }} - {{- else -}} - <link rel="stylesheet" href="{{ "lib/gitalk/gitalk-1.2.2.min.css" | relURL }}"> - <script src="{{ "lib/gitalk/gitalk-1.2.2.min.js" | relURL }}"></script> - {{- end }} - <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> + <div id="gitalk-container"></div> + {{ if .Site.Params.publicCDN.enable -}} + {{ .Site.Params.publicCDN.gitalkCSS | safeHTML }} + {{ .Site.Params.publicCDN.gitalkJS | safeHTML }} + {{- else -}} + <link rel="stylesheet" href="{{ "lib/gitalk/gitalk-1.2.2.min.css" | relURL }}"> + <script src="{{ "lib/gitalk/gitalk-1.2.2.min.js" | relURL }}"></script> + {{- end }} + <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 }} |