diff --git a/internal/routes/home.go b/internal/routes/home.go index 3c5d652..15ac3de 100644 --- a/internal/routes/home.go +++ b/internal/routes/home.go @@ -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) diff --git a/internal/templates/views/home.tmpl.html b/internal/templates/views/home.tmpl.html index 3bf6544..0069fd1 100644 --- a/internal/templates/views/home.tmpl.html +++ b/internal/templates/views/home.tmpl.html @@ -1,6 +1,4 @@ -{{define "Title"}}Home{{end}} - -{{define "Body"}} +{{define "body"}}

Featured Shelves

@@ -11,5 +9,3 @@

Recent Activity

{{end}} - -{{template "page.tmpl.html" .}}