summaryrefslogtreecommitdiffstats
path: root/layouts/partials/comment-disqusjs.html
diff options
context:
space:
mode:
authorDSRKafuU2020-06-04 07:21:13 -0500
committerGitHub2020-06-04 07:21:13 -0500
commit73244a2e55dffa158027126346eefd5bafa5fea8 (patch)
treec98ee9fbdb6f474579aa769a2a4b0b4c98fd21f1 /layouts/partials/comment-disqusjs.html
parentaa5290aeef9df1c583fdf30290351968df9215dc (diff)
parent914bf54c493b299268c293be33a8babf99b1cce2 (diff)
downloadhugo-theme-fuji-73244a2e55dffa158027126346eefd5bafa5fea8.tar.gz
hugo-theme-fuji-73244a2e55dffa158027126346eefd5bafa5fea8.tar.bz2
hugo-theme-fuji-73244a2e55dffa158027126346eefd5bafa5fea8.zip
Merge pull request #24 from amzrk2/dev
v2 pre-release
Diffstat (limited to 'layouts/partials/comment-disqusjs.html')
-rw-r--r--layouts/partials/comment-disqusjs.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/layouts/partials/comment-disqusjs.html b/layouts/partials/comment-disqusjs.html
new file mode 100644
index 0000000..eafa1de
--- /dev/null
+++ b/layouts/partials/comment-disqusjs.html
@@ -0,0 +1,22 @@
+<div class="post-comment" data-comment="disqus">
+ <span class="post-comment-notloaded">
+ <ion-icon name="chatbox-ellipses"></ion-icon>&nbsp;{{ i18n "postComment" }}
+ </span>
+ <div id="disqus_thread" style="display: none;"></div>
+ <script src="https://cdn.jsdelivr.net/npm/disqusjs@1.3/dist/disqus.js"></script>
+ <script>
+ function loadComment() {
+ document.querySelector('#disqus_thread').removeAttribute('style');
+ var dsqjs = new DisqusJS({
+ shortname: '{{ .Site.Params.disqusShortname }}',
+ siteName: '{{ .Site.Title }}',
+ identifier: '{{ .File.ContentBaseName }}',
+ url: '{{ .Permalink }}',
+ title: '{{ .Title }}',
+ api: '{{ .Site.Params.disqusJSApi }}',
+ apikey: '{{ .Site.Params.disqusJSApikey }}'
+ });
+ document.querySelector('span.post-comment-notloaded').setAttribute('style', 'display: none;');
+ }
+ </script>
+</div> \ No newline at end of file