fix(webui): correct layout rendering; select content template by name and include via layout; fix navbar/footer appearance
This commit is contained in:
parent
3ed38031be
commit
ab11490807
4 changed files with 12 additions and 6 deletions
|
|
@ -42,6 +42,8 @@ func (s *Server) render(w http.ResponseWriter, name string, data map[string]any)
|
|||
} else {
|
||||
data["Title"] = strings.Title(base)
|
||||
}
|
||||
// Tell layout which content template to include
|
||||
data["Content"] = base
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
_ = tpl.ExecuteTemplate(w, name, data)
|
||||
_ = tpl.ExecuteTemplate(w, "layout.tmpl", data)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue