{ thread.Subject } -
} { post.CreatedAt.Format("01/02/2006") } { post.CreatedAt.Format("15:04") } >%d\n'", post.Id) } class=" post-num" > No.{ strconv.Itoa(post.Id) }@templ.Raw(util.EnrichPost(post.Body))
package views
import (
"fmt"
"github.com/dominicf2001/comfychan/internal/database"
"github.com/dominicf2001/comfychan/internal/util"
"github.com/dominicf2001/comfychan/web/views/shared"
"strconv"
)
func getPostClass(isOp bool) string {
if isOp {
return "post-op"
}
return "post"
}
templ ThreadPost(post database.Post, thread *database.Thread) {
{{ isOp := thread != nil }}
@templ.Raw(util.EnrichPost(post.Body))
{ thread.Subject } -
}
{ post.CreatedAt.Format("01/02/2006") }
{ post.CreatedAt.Format("15:04") }
>%d\n'", post.Id) }
class=" post-num"
>
No.{ strconv.Itoa(post.Id) }
}
}
templ Thread(board database.Board, thread database.Thread, posts []database.Post) {
@shared.Layout() {
@BoardHeader(board)