mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 04:03:48 +01:00
feat(comments): prepare for more third party comments system integration
This commit is contained in:
parent
b66679d36a
commit
c546964ce4
7 changed files with 19 additions and 2 deletions
6
assets/scss/partials/comments/base.scss
Normal file
6
assets/scss/partials/comments/base.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
.comments-container {
|
||||
background-color: var(--card-background);
|
||||
border-radius: var(--card-border-radius);
|
||||
@include box_shadow(1);
|
||||
padding: var(--content-padding);
|
||||
}
|
|
@ -15,6 +15,8 @@
|
|||
@import "partials/layout/taxonomy.scss";
|
||||
@import "partials/layout/404.scss";
|
||||
|
||||
@import "partials/comments/base.scss";
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: var(--accent-color);
|
||||
|
|
|
@ -19,6 +19,10 @@ title = "Example Site"
|
|||
[params.article.license]
|
||||
enabled = true
|
||||
default = "Licenced under CC BY-NC-SA 4.0"
|
||||
[params.comments]
|
||||
enabled = true
|
||||
# Only Disqus is available so far
|
||||
provider = "disqus"
|
||||
[params.widgets]
|
||||
enabled = ['archive', 'tag-cloud']
|
||||
[params.widgets.archive]
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{{ partial "article/components/related-contents" . }}
|
||||
|
||||
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
||||
{{ partial "article/components/comment" . }}
|
||||
{{ partial "comments/include" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ partialCached "footer" . }}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{{ partial "article/article.html" . }}
|
||||
|
||||
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
||||
{{ partial "article/components/comment" . }}
|
||||
{{ partial "comments/include" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ partialCached "footer" . }}
|
||||
|
|
5
layouts/partials/comments/include.html
Normal file
5
layouts/partials/comments/include.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ if .Site.Params.comments.enabled }}
|
||||
<div class="comments-container provider-{{ .Site.Params.comments.provider }}">
|
||||
{{ partial (printf "comments/provider/%s" .Site.Params.comments.provider) . }}
|
||||
</div>
|
||||
{{ end }}
|
Loading…
Reference in a new issue