package templates
import (
"go.alanpearce.eu/homestead/internal/config"
"go.alanpearce.eu/homestead/internal/content"
)
templ TagPage(config *config.Config, tag string, posts []content.Post, path string) {
@Layout(config, PageSettings{
Title: tag,
Path: path,
TitleAttrs: templ.Attributes{
"class": "p-author h-card",
"rel": "author",
},
}) {
@list(posts)
}
}
templ ListPage(config *config.Config, posts []content.Post, path string) {
@Layout(config, PageSettings{
Title: config.Title,
TitleAttrs: templ.Attributes{
"class": "p-author h-card",
"rel": "author",
},
Path: path,
}) {
@list(posts)
}
}
templ list(posts []content.Post) {
for _, post := range posts {
-
@postDate(post.Date, "dt-published")
{ post.Title }
}
}