mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-10-10 22:09:31 +00:00
🐛 Render comments in the simple article layout
Extract the comments block into a shared article-comments partial and include it from both single and simple layouts. Fixes #2938. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d50d80bb34
commit
1784d3c13b
3 files changed
+15
-13
No files matched your search
@@ -11,8 +11,9 @@
|
||||
<section class="max-w-full mt-6 prose dark:prose-invert">
|
||||
{{ .Content }}
|
||||
</section>
|
||||
<footer class="pt-8">
|
||||
<footer class="pt-8 print:hidden">
|
||||
{{ partial "sharing-links.html" . }}
|
||||
{{ partial "article-comments.html" . }}
|
||||
</footer>
|
||||
</article>
|
||||
{{ end }}
|
||||
@@ -88,18 +88,7 @@
|
||||
{{/* Footer */}}
|
||||
<footer class="pt-8 max-w-prose print:hidden">
|
||||
{{ 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 "[BLOWFISH] Comments are enabled for %s but no comments partial exists." .File.Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ partial "article-comments.html" . }}
|
||||
</footer>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{{ 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 "[BLOWFISH] Comments are enabled for %s but no comments partial exists." .File.Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in new issue
Block a user