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 PostOriginal(post database.Post, thread *database.Thread) {
File: { post.MediaPath }

{ thread.Subject } -

{ post.CreatedAt.Format("15:04") } >%d\n'", post.Id) } class=" post-num" > No.{ strconv.Itoa(post.Id) }

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

} templ PostReply(post database.Post) {
{ post.CreatedAt.Format("15:04") } >%d\n'", post.Id) } class=" post-num" > No.{ strconv.Itoa(post.Id) }
if post.MediaPath != "" {
File: { post.MediaPath }
}

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

} templ PostReplies(posts []database.Post) { for _, post := range (posts) { @PostReply(post)
} } templ Thread(board database.Board, thread database.Thread, posts []database.Post) { @shared.Layout() { @BoardHeader(board)
comment
File
@PostOriginal(posts[0], &thread)
@PostReplies(posts[1:])
} }