infidel-cupper-theme/layouts/partials/disqus.html

28 lines
961 B
HTML
Raw Permalink Normal View History

2022-04-10 04:20:41 -04:00
<div id="disqus-container">
{{ with .Site.DisqusShortname }}
<button id="disqus-button" onclick="showComments()">{{ T "discuss_show_comments_button" }}</button>
<div id="disqus-comments">
{{ $isDummyName := eq . "yourdiscussshortname" }}
{{ $isServer := $.Site.IsServer }}
2022-04-10 09:56:08 -04:00
{{ if or $isDummyName false }}
2022-04-10 04:20:41 -04:00
<p><em>{{ T "discuss_comments_disabled" }}</em></p>
<script type="application/javascript">
function showComments() {
{{ partial "disqus-js-common.js" . | safeJS }}
}
</script>
{{ else }}
<div id="disqus_thread">
</div>
<script type="application/javascript">
function showComments() {
{{ partial "disqus-js-main.js" . | safeJS }}
{{ partial "disqus-js-common.js" . | safeJS }}
}
</script>
{{ end }}
<noscript>{{ T "discuss_js_disabled" }}</noscript>
</div>
{{ end }}
</div>