From aa13c8515f853c003274ade96b5c7066d2f67dc2 Mon Sep 17 00:00:00 2001 From: httpjamesm Date: Fri, 30 Dec 2022 18:15:35 -0500 Subject: [PATCH] feat: change comments to plural if greater than 1 --- templates/comments.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/comments.html b/templates/comments.html index 70a1ce3..4810890 100644 --- a/templates/comments.html +++ b/templates/comments.html @@ -1,6 +1,10 @@
- Show {{ (len .Comments) }} comments + Show + {{ (len .Comments) }} comment{{ if gt (len .Comments) 1 }}s{{ + end }}
{{ range $comment := .Comments }} @@ -10,9 +14,7 @@
{{ $comment.Upvotes }}
-
- {{ $comment.Text }} -
+
{{ $comment.Text }}
Commented {{ $comment.Timestamp }} by