mirror of
https://github.com/httpjamesm/AnonymousOverflow.git
synced 2025-04-20 22:09:15 +00:00
feat: change comments to plural if greater than 1
This commit is contained in:
parent
d49c0f2ffd
commit
aa13c8515f
1 changed files with 6 additions and 4 deletions
|
@ -1,6 +1,10 @@
|
||||||
<details class="comments">
|
<details class="comments">
|
||||||
<summary>
|
<summary>
|
||||||
Show <b>{{ (len .Comments) }} comments</b>
|
Show
|
||||||
|
<b
|
||||||
|
>{{ (len .Comments) }} comment{{ if gt (len .Comments) 1 }}s{{
|
||||||
|
end }}</b
|
||||||
|
>
|
||||||
</summary>
|
</summary>
|
||||||
<div class="comments-parent">
|
<div class="comments-parent">
|
||||||
{{ range $comment := .Comments }}
|
{{ range $comment := .Comments }}
|
||||||
|
@ -10,9 +14,7 @@
|
||||||
<div class="comment-score" title="Comment Upvotes">
|
<div class="comment-score" title="Comment Upvotes">
|
||||||
{{ $comment.Upvotes }}
|
{{ $comment.Upvotes }}
|
||||||
</div>
|
</div>
|
||||||
<div class="comment-body">
|
<div class="comment-body">{{ $comment.Text }}</div>
|
||||||
{{ $comment.Text }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="comment-author">
|
<div class="comment-author">
|
||||||
Commented {{ $comment.Timestamp }} by
|
Commented {{ $comment.Timestamp }} by
|
||||||
|
|
Loading…
Add table
Reference in a new issue