24 lines
471 B
Go
24 lines
471 B
Go
package components
|
|
|
|
import (
|
|
"git.soup.land/soup/shelves/internal/auth"
|
|
"git.soup.land/soup/shelves/internal/templates"
|
|
"html/template"
|
|
)
|
|
|
|
type Page struct {
|
|
SessionInfo auth.SessionInfo
|
|
|
|
Title string
|
|
Head template.HTML
|
|
Body template.HTML
|
|
BodyBefore template.HTML
|
|
BodyAfter template.HTML
|
|
}
|
|
|
|
var pageTmpl = templates.MustParseEmbed("components/page.tmpl.html")
|
|
|
|
func (p Page) HTML() template.HTML {
|
|
return templates.HTML(pageTmpl, "page", p)
|
|
}
|