Hugo-theme-stack/layouts/partials/comments/provider/cactus.html
Marcel 7dc5def217
feat(comments): add https://cactus.chat support (#298)
* feat: Add https://cactus.chat as comments provider

* Add cactus comments config fields to exampleSite

* Add cactus css and js to external.yaml and move custom cactus css to html

* Remove unneeded cactus comments css

* Load external dependencies for cactus comments in the comments provider

* Use safeJS instead of safeHTML
2022-01-23 13:10:00 +01:00

30 lines
714 B
HTML

{{- with .Site.Params.comments.cactus -}}
{{- partial "helper/external" (dict "Context" . "Namespace" "Cactus") -}}
<style>
.cactus-editor-textarea {
color: var(--body-text-color);
}
.cactus-comment-header {
color: var(--card-text-color-main);
}
.cactus-message-text > p {
color: var(--body-text-color);
}
</style>
<div id="comment-section"></div>
<script>
initComments({
node: document.getElementById("comment-section"),
defaultHomeserverUrl: "{{ .defaultHomeserverUrl | safeJS }}",
serverName: "{{ .serverName }}",
siteName: "{{ .siteName }}",
commentSectionId: "{{ $.File.UniqueID }}"
})
</script>
{{- end -}}