Improve layout of comments and add params to toggle display

Ref #207
This commit is contained in:
James Panther
2022-06-25 14:17:44 +10:00
parent f007a1f294
commit 6fc462136f
7 changed files with 27 additions and 12 deletions
+12 -3
View File
@@ -27,9 +27,18 @@
{{ partial "author.html" . }}
{{ partial "sharing-links.html" . }}
{{ partial "article-pagination.html" . }}
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
{{ if templates.Exists "partials/comments.html" }}
<div class="pt-3">
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
<div class="pt-3">
{{ partial "comments.html" . }}
</div>
</div>
{{ else }}
{{ warnf "[CONGO] Comments are enabled for %s but no comments partial exists." .File.Path }}
{{ end }}
{{ end }}
</footer>
{{ if templates.Exists "partials/comments.html" }}
{{ partial "comments.html" . }}
{{ end }}
</article>
{{ end }}