Fix /home rendering
This commit is contained in:
parent
920f162695
commit
54fa17ab25
|
|
@ -8,8 +8,7 @@ import (
|
|||
"git.soup.land/soup/shelves/internal/templates/components"
|
||||
)
|
||||
|
||||
type homeTemplate struct {
|
||||
components.Page
|
||||
type homeContent struct {
|
||||
}
|
||||
|
||||
var homeTmpl = templates.MustParseEmbed("views/home.tmpl.html")
|
||||
|
|
@ -20,6 +19,7 @@ func HomeGet(w http.ResponseWriter, req *http.Request) {
|
|||
h := components.Page{
|
||||
Title: "Home",
|
||||
SessionInfo: ctx.SessionInfo,
|
||||
Body: templates.HTML(homeTmpl, "body", homeContent{}),
|
||||
}.HTML()
|
||||
|
||||
html(w, h)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
{{define "Title"}}Home{{end}}
|
||||
|
||||
{{define "Body"}}
|
||||
{{define "body"}}
|
||||
<section>
|
||||
<h1>Featured Shelves</h1>
|
||||
</section>
|
||||
|
|
@ -11,5 +9,3 @@
|
|||
<h1>Recent Activity</h1>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
{{template "page.tmpl.html" .}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue