From e6af8372b4252e5d265c09caff8af3823388fc66 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Tue, 25 Jun 2024 04:37:35 +0400 Subject: [PATCH] Updated guestbook.templ. --- web/guestbook.templ | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/web/guestbook.templ b/web/guestbook.templ index 58c5255..c9f346b 100644 --- a/web/guestbook.templ +++ b/web/guestbook.templ @@ -3,6 +3,7 @@ package web import "fmt" import "strconv" import "strings" +import "time" import "net/http" import "git.arav.su/Arav/justguestbook" @@ -38,29 +39,25 @@ templ Guestbook(captchaID, owner string, entries []*justguestbook.Entry, pageCou if !entry.HideWebsite { {{ website = entry.Website }} } - { strconv.FormatInt(entry.ID, 10) } by { entry.Name } { website } on + { strconv.FormatInt(entry.ID, 10) } by { entry.Name } { website } on for _, line := range strings.Split(entry.Message, "\n") { +

0 && line[0] == '>' { -

{ line }

- } else { -

{ line }

- } + class="quote" + }>{ line }

} if entry.Reply != nil {
{{ reply_created_tz := util.ToClientTimezone(entry.Reply.Created, r).Format("Monday _2 January 2006 15:04:05 -07:00") }} - Reply by { owner } in + Reply by { owner } in
for _, line := range strings.Split(entry.Reply.Message, "\n") { +

0 && line[0] == '>' { -

@templ.Raw(line) -

- } else { -

@templ.Raw(line) -

- } + class="quote" + }>@templ.Raw(line)

}
}