Files
site/themes/minimo/layouts/partials/entry/comments.html
Dave Gallant 469deb2b9f Fix about page
2021-09-08 01:08:16 -04:00

38 lines
1.2 KiB
HTML

{{- $config := .Site.Params.comments -}}
{{- $enabledGlobally := $config.enable -}}
{{- $disabledGlobally := ( not $enabledGlobally ) -}}
{{ $optOut := ( eq .Params.comments false ) }}
{{ $optIn := .Params.comments }}
{{- $enableConditionOne := ( and $disabledGlobally $optIn ) -}}
{{- $enableConditionTwo := ( and $enabledGlobally ( not $optOut ) ) -}}
{{- if ( or $enableConditionOne $enableConditionTwo ) -}}
{{- $disqusEnabled := .Site.DisqusShortname -}}
{{- $issoEnabled := $config.isso.enable -}}
{{- $staticmanEnabled := $config.staticman.enable -}}
{{- $utterancesEnabled := $config.utterances.enable -}}
{{- if and ( $disqusEnabled | or $issoEnabled | or $staticmanEnabled | or $utterancesEnabled ) ( not .Params.disable_comments) -}}
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'>
{{- if $disqusEnabled -}}
{{ partial "comments/disqus" . }}
{{- else if $issoEnabled -}}
{{ partial "comments/isso" . }}
{{- else if $staticmanEnabled -}}
{{ partial "comments/staticman" . }}
{{- else if $utterancesEnabled -}}
{{ partial "comments/utterances" . }}
{{- end -}}
</div>
</div>
</section>
{{- end -}}
{{- end -}}