templates/page.templ (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | package templates
import (
"go.alanpearce.eu/website/internal/config"
"go.alanpearce.eu/website/internal/content"
)
templ Page(config *config.Config, page *content.Post) {
@Layout(config, PageSettings{
Title: page.Title,
TitleAttrs: templ.Attributes{
"class": "h-card",
"rel": "author",
},
Path: page.URL,
}) {
<h1 class="p-name">{ page.Title }</h1>
<div class="content">
@page
</div>
}
}
|