From 45c2ff65051af0c89f3987f307de8ee6553b5253 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Tue, 23 May 2023 03:28:21 +0400 Subject: [PATCH] Check if we should not show a website. --- web/templates/guestbook.pug | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/templates/guestbook.pug b/web/templates/guestbook.pug index 7434036..67a1ee2 100755 --- a/web/templates/guestbook.pug +++ b/web/templates/guestbook.pug @@ -41,7 +41,10 @@ block content article header - var created_tz = util.ToClientTimezone(entry.Created, r).Format("Monday _2 January 2006 15:04:05 -07:00") - | ##{entry.ID} by #[span.highlighted #{entry.Name}] #[em #{entry.Website}] on #[time(datetime=created_tz) #{created_tz}] + - var website = "" + if (!entry.HideWebsite) + - website = entry.Website + | ##{entry.ID} by #[span.highlighted #{entry.Name}] #[em #{website}] on #[time(datetime=created_tz) #{created_tz}] each line in strings.Split(entry.Message, "\n") +entryLine(line) if (entry.Reply != nil)