shelves/backend/templates/page.go
2024-11-15 15:05:06 -05:00

33 lines
567 B
Go

package templates
import (
"html/template"
"shelves/backend/auth"
)
type PageBase struct {
Title string
Head template.HTML
Body template.HTML
BodyBefore template.HTML
BodyAfter template.HTML
}
func (pb PageBase) HTML() template.HTML {
return Tmpls.HTML("page_base.tmpl.html", pb)
}
type Page struct {
SessionInfo auth.SessionInfo
Title string
Head template.HTML
Body template.HTML
BodyBefore template.HTML
BodyAfter template.HTML
}
func (p Page) HTML() template.HTML {
return Tmpls.HTML("page.tmpl.html", p)
}