Welcome to mirror list, hosted at ThFree Co, Russian Federation.

comment-disqusjs.html « partials « layouts - github.com/amzrk2/hugo-theme-fuji.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 18d1d82fa4df7c62daaa0ca04807d32eca20f496 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<div class="post-comment" data-comment="disqus">
    <span class="post-comment-notloaded">
        <i class="iconfont icon-chatbox-ellipses-sharp"></i>&nbsp;{{ i18n "postComment" }}
    </span>
    <div id="disqus_thread" style="display: none;"></div>
    <script src="https://cdn.jsdelivr.net/npm/disqusjs@1.3.0/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>