feat: change comments to plural if greater than 1

This commit is contained in:
httpjamesm 2022-12-30 18:15:35 -05:00
parent d49c0f2ffd
commit aa13c8515f

View File

@ -1,6 +1,10 @@
<details class="comments">
<summary>
Show <b>{{ (len .Comments) }} comments</b>
Show
<b
>{{ (len .Comments) }} comment{{ if gt (len .Comments) 1 }}s{{
end }}</b
>
</summary>
<div class="comments-parent">
{{ range $comment := .Comments }}
@ -10,9 +14,7 @@
<div class="comment-score" title="Comment Upvotes">
{{ $comment.Upvotes }}
</div>
<div class="comment-body">
{{ $comment.Text }}
</div>
<div class="comment-body">{{ $comment.Text }}</div>
</div>
<div class="comment-author">
Commented {{ $comment.Timestamp }} by