8984ca9d6a
* Adds i18n support for theme * Adds a way for sites to have custom css. This change adds a param to the theme (called customCss), which allows sites to provide extra css under static/, so that they don't need to copy the theme's css whole file. If no custom css is in the params, this change is NOP.
28 lines
965 B
HTML
28 lines
965 B
HTML
<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 }}
|
|
{{ if or $isDummyName $isServer }}
|
|
<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>
|