package templates import "time" templ PostList(posts []models.Post, page, totalPages int) {
if totalPages > 1 { @Pagination(page, totalPages) }
} templ PostListItem(post models.Post) {
  • { post.Title }
    Posted: { post.PublishedAt.Format("2006-01-02") } | Tags: for i, tag := range post.Tags { if i > 0 { , } { tag } } | Words: { fmt.Sprintf("%d", post.WordCount) }
    { post.Excerpt }
    [Read more...]
  • }