package views type Post struct { ID string Content string Author string Date string } type Reaction struct { ID string Label string Count string JustChanged bool } type PostStats struct { PostID string Views PostViews Reactions []Reaction } type PostViews struct { Count string JustChanged bool } templ Index(posts []Post) { @base() { @Posts(posts) } } templ Posts(posts []Post) {
{ post.Content }