package views import ( "fmt" "github.com/dominicf2001/comfychan/internal/database" "github.com/dominicf2001/comfychan/web/views/shared" "strconv" ) templ ThreadPosts(posts []database.Post) { for _, post := range (posts) {
{ post.CreatedAt.Format("15:04") } No. { strconv.Itoa(post.Id) }

{ post.Body }


} } templ Thread(board database.Board, thread database.Thread, posts []database.Post) { @shared.Layout() { @BoardHeader(board)
comment
if posts[0].MediaPath != "" {
}

{ thread.Subject } -

{ posts[0].CreatedAt.Format("15:04") } No. { strconv.Itoa(posts[0].Id) }

{ posts[0].Body }

} }