feat: Add https://cactus.chat as comments provider

This commit is contained in:
MTRNord 2021-08-08 21:07:12 +02:00
parent 1055adf498
commit da41b7e954
3 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,11 @@
.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);
}

View File

@ -0,0 +1,13 @@
{{- with .Site.Params.comments.cactus -}}
<div id="comment-section"></div>
<script>
initComments({
node: document.getElementById("comment-section"),
defaultHomeserverUrl: "{{ .defaultHomeserverUrl | safeHTML }}",
serverName: "{{ .serverName }}",
siteName: "{{ .siteName }}",
commentSectionId: "{{ $.File.UniqueID }}"
})
</script>
{{- end -}}

View File

@ -1,3 +1,11 @@
{{ $sass := resources.Get "scss/style.scss" }}
{{ $style := $sass | resources.ToCSS | minify }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{ if .Site.Params.comments.enabled }}
{{ if eq .Site.Params.comments.provider "cactus" }}
{{ $sass_cactus := resources.Get "scss/partials/comments/provider/cactus.scss" }}
{{ $style_cactus := $sass_cactus | resources.ToCSS | minify }}
<link rel="stylesheet" href="{{ $style_cactus.RelPermalink }}">
{{ end }}
{{ end }}