Add params for isso comment system

This commit is contained in:
2023-12-05 23:42:31 -06:00
parent 16f11c6662
commit 557a389116

View File

@@ -146,6 +146,44 @@
Please enable JavaScript to view the comments powered by <a href="https://giscus.app">Giscus</a>.
</noscript>
{{- end -}}
{{- /* ISSO Comment System */ -}}
{{- $isso := $comment.isso | default dict -}}
{{- if $isso.enable -}}
<div id="isso-comments" class="comment">
{{- $attr := printf `data-isso="%v"` $isso.apiURL -}}
{{- $attr = printf `%v data-isso-css="%v"` $attr ($isso.css | default true) -}}
{{- with $isso.thread-id -}}
{{- $attr = printf `%v data-isso-id="%v"` $attr . -}}
{{- end -}}
{{- with $isso.cssURL -}}
{{- $attr = printf `%v data-isso-css-url="%v"` $attr . -}}
{{- end -}}
{{- with $isso.lang -}}
{{- $attr = printf `%v data-isso-lang="%v"` $attr . -}}
{{- end -}}
{{- $attr = printf `%v data-isso-default-lang="%v"` $attr ($isso.default-lang | default en) -}}
{{- $attr = printf `%v data-isso-max-comments-top="%v"` $attr ($isso.max-top | default 10) -}}
{{- $attr = printf `%v data-isso-max-comments-nested="%v"` $attr ($isso.max-nested | default 5) -}}
{{- $attr = printf `%v data-isso-reveal-on-click="%v"` $attr ($isso.reveal-on-click | default 5) -}}
{{- $attr = printf `%v data-isso-avatar="%v"` $attr ($isso.avatar | default true) -}}
{{- $attr = printf `%v data-isso-avatar-bg="%v"` $attr ($isso.avatar-bg | default #f0f0f0) -}}
{{- $attr = printf `%v data-isso-avatar-fg="%v"` $attr ($isso.avatar-fg | default #9abf88 #5698c4 #e279a3 #9163b6 ) -}}
{{- $attr = printf `%v data-isso-vote="%v"` $attr ($isso.vote | default true) -}}
{{- with $isso.vote-levels -}}
{{- $attr = printf `%v data-isso-vote-levels="%v"` $attr . -}}
{{- end -}}
{{- $attr = printf `%v data-isso-page-author-hashes="%v"` $attr ($isso.authr-hashes | default f124cf6b2f01,7831fe17a8cd) -}}
{{- $attr = printf `%v data-isso-reply-notifications-default-enabled="%v"` $attr ($isso.reply-notifications | default false) -}}
{{- dict "Source" (printf "%v/embed.min.js" $isso.apiURL) "Defer" true "Attr" $attr | partial "plugin/script.html" -}}
<section id="isso-thread">
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://isso-comments.de">ISSO</a>.
</noscript>
</section>
{{- end -}}
</div>
{{- end -}}