mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-08 01:22:29 +00:00
Switch themes to minimo
This commit is contained in:
37
themes/minimo/layouts/partials/entry/comments.html
Normal file
37
themes/minimo/layouts/partials/entry/comments.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{{- $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 ( $disqusEnabled | or $issoEnabled | or $staticmanEnabled | or $utterancesEnabled ) -}}
|
||||
<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 -}}
|
Reference in New Issue
Block a user