shelves/internal/routes/home.go
2024-11-16 14:31:32 -05:00

27 lines
494 B
Go

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