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

@templ.Raw(util.EnrichPost(post.Body))


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

{ thread.Subject } -

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

@templ.Raw(util.EnrichPost(posts[0].Body))

@ThreadPosts(posts[1:])
} }