~ruther/blog

ref: b8ec0e6881318f4adbd4ae68277a540c0eacf203 blog/themes/poison/layouts/partials/post/comments.html -rw-r--r-- 1012 bytes
b8ec0e68 — Rutherther Initial commit 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<div class="comments">
    {{ if .Site.Params.remark42 }}
        <div id="remark42"></div>
        <script>
            themeFromLS = localStorage.getItem("theme")
            themeFromHugo = document.body.classList.contains("dark-theme") ? "dark" : "light"
            currentTheme = themeFromLS ? themeFromLS : themeFromHugo;

            var remark_config = {
                host: {{ site.Params.remark42_host }},
                site_id: {{ site.Params.remark42_site_id }},
                theme: currentTheme,
                max_shown_comments: 100,
            }
        </script>
        <script>!function(e,n){for(var o=0;o<e.length;o++){var r=n.createElement("script"),c=".js",d=n.head||n.body;"noModule"in r?(r.type="module",c=".mjs"):r.async=!0,r.defer=!0,r.src=remark_config.host+"/web/"+e[o]+c,d.appendChild(r)}}(remark_config.components||["embed"],document);</script>
    {{ else if .Site.Config.Services.Disqus.Shortname }}
        {{ template "_internal/disqus.html" . }}
    {{ end }}
</div>