mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 12:03:31 +08:00
feat: Add https://cactus.chat as comments provider
This commit is contained in:
parent
1055adf498
commit
da41b7e954
11
assets/scss/partials/comments/provider/cactus.scss
Normal file
11
assets/scss/partials/comments/provider/cactus.scss
Normal 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);
|
||||
}
|
13
layouts/partials/comments/provider/cactus.html
Normal file
13
layouts/partials/comments/provider/cactus.html
Normal 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 -}}
|
@ -1,3 +1,11 @@
|
||||
{{ $sass := resources.Get "scss/style.scss" }}
|
||||
{{ $style := $sass | resources.ToCSS | minify }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
<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 }}
|
Loading…
Reference in New Issue
Block a user