shelves/internal/routes/home.go
2024-11-16 18:36:36 -05:00

26 lines
489 B
Go

package routes
import (
"net/http"
"git.soup.land/soup/shelves/internal/templates"
"git.soup.land/soup/shelves/internal/templates/components"
)
type homeContent struct {
}
var homeTmpl = templates.MustParseEmbed("views/home.tmpl.html")
func homeGet(w http.ResponseWriter, req *http.Request) {
ctx := getCtx(req)
h := components.Page{
Title: "Home",
SessionInfo: ctx.SessionInfo,
Body: templates.HTML(homeTmpl, "body", homeContent{}),
}.HTML()
html(w, h)
}