2019-03-05 21:59:47 +01:00
|
|
|
<div id="disqus-container">
|
|
|
|
{{ with .Site.DisqusShortname }}
|
2020-06-01 20:47:51 +02:00
|
|
|
<button id="disqus-button" onclick="showComments()">{{ T "discuss_show_comments_button" }}</button>
|
2019-03-05 21:59:47 +01:00
|
|
|
<div id="disqus-comments">
|
2019-03-07 21:13:56 +01:00
|
|
|
{{ $isDummyName := eq . "yourdiscussshortname" }}
|
|
|
|
{{ $isServer := $.Site.IsServer }}
|
|
|
|
{{ if or $isDummyName $isServer }}
|
2020-06-01 20:47:51 +02:00
|
|
|
<p><em>{{ T "discuss_comments_disabled" }}</em></p>
|
2019-03-07 21:13:56 +01:00
|
|
|
<script type="application/javascript">
|
|
|
|
function showComments() {
|
|
|
|
{{ partial "disqus-js-common.js" . | safeJS }}
|
|
|
|
}
|
|
|
|
</script>
|
2019-03-05 21:59:47 +01:00
|
|
|
{{ else }}
|
2019-03-07 21:13:56 +01:00
|
|
|
<div id="disqus_thread">
|
|
|
|
</div>
|
|
|
|
<script type="application/javascript">
|
|
|
|
function showComments() {
|
|
|
|
{{ partial "disqus-js-main.js" . | safeJS }}
|
|
|
|
{{ partial "disqus-js-common.js" . | safeJS }}
|
|
|
|
}
|
|
|
|
</script>
|
2019-03-05 21:59:47 +01:00
|
|
|
{{ end }}
|
2020-06-01 20:47:51 +02:00
|
|
|
<noscript>{{ T "discuss_js_disabled" }}</noscript>
|
2019-03-05 21:59:47 +01:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|