{{ $page := . }}

{{ if $page.Param "paige.comments.graphcomment" }}
    <div class="mb-3" id="paige-comments">
        <div id="graphcomment"></div>
        <script type="text/javascript">
        var __semio__params = {
            graphcommentId: "{{ $page.Param `paige.comments.graphcomment.account_id` | safeJS }}",
            behaviour: {
                uid: "{{ $page.RelPermalink | safeJS }}"
            }
        };
        function __semio__onload() {
            __semio__gc_graphlogin(__semio__params)
        }
        (function() {
            var gc = document.createElement('script'); gc.type = 'text/javascript'; gc.async = true;
            gc.onload = __semio__onload; gc.defer = true; gc.src = 'https://integration.graphcomment.com/gc_graphlogin.js?' + Date.now();
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
        })();
        </script>
        <noscript>{{ i18n "paige_noscript" }}</noscript>
    </div>
{{ end }}
