package templates
import (
"time"
"website/internal/config"
"website/internal/content"
)
func Unsafe(html string) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) {
_, err = io.WriteString(w, html)
return
})
}
templ postDate(d time.Time) {
}
templ PostPage(config config.Config, post content.Post) {
@Page(config, PageSettings{
Title: post.Title,
TitleAttrs: templ.Attributes{
"class": "p-author h-card",
"rel": "author",
},
Path: post.URL,
}) {
{ post.Title }
@postDate(post.Date)
@Unsafe(post.Content)
}
}