diff options
author | amzrk2 | 2020-06-03 13:58:49 +0800 |
---|---|---|
committer | amzrk2 | 2020-06-03 13:58:49 +0800 |
commit | 3df71601ae866aff9c2ae060ed1ac7407807fcc4 (patch) | |
tree | ad34004b865f43aecf43d111b5586f592a1e05ba /layouts/partials/comment-disqusjs.html | |
parent | e6afd04368f56af57b77f71be4dda5a4d9279a64 (diff) | |
download | hugo-theme-fuji-3df71601ae866aff9c2ae060ed1ac7407807fcc4.tar.gz hugo-theme-fuji-3df71601ae866aff9c2ae060ed1ac7407807fcc4.tar.bz2 hugo-theme-fuji-3df71601ae866aff9c2ae060ed1ac7407807fcc4.zip |
New comment area & opt out of font awesome
Diffstat (limited to 'layouts/partials/comment-disqusjs.html')
-rw-r--r-- | layouts/partials/comment-disqusjs.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/layouts/partials/comment-disqusjs.html b/layouts/partials/comment-disqusjs.html new file mode 100644 index 0000000..5414aef --- /dev/null +++ b/layouts/partials/comment-disqusjs.html @@ -0,0 +1,24 @@ +<div class="post-comment" data-comment="disqus"> + <span class="post-comment-notloaded"> + <ion-icon name="chatbox-ellipses"></ion-icon> 查看评论 + </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 }}', + admin: '{{ .Site.Params.disqusJSAdmin }}', + adminLabel: '{{ .Site.Params.disqusJSAdminlabel }}' + }); + document.querySelector('span.post-comment-notloaded').setAttribute('style', 'display: none;'); + } + </script> +</div>
\ No newline at end of file |