More layout and customisations.
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/gorilla/csrf"
|
||||
)
|
||||
|
||||
// ToDo this should not be in draw for home!
|
||||
func Home(db *sql.DB) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
rows, err := db.Query(`
|
||||
@@ -50,8 +51,9 @@ func Home(db *sql.DB) http.HandlerFunc {
|
||||
context := helpers.TemplateContext(w, r)
|
||||
context["Data"] = results
|
||||
|
||||
tmpl := template.Must(template.ParseFiles(
|
||||
tmpl := template.Must(template.New("").Funcs(helpers.TemplateFuncs()).ParseFiles(
|
||||
"templates/layout.html",
|
||||
"templates/topbar.html",
|
||||
"templates/index.html",
|
||||
))
|
||||
|
||||
@@ -69,6 +71,7 @@ func NewDraw(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
tmpl := template.Must(template.ParseFiles(
|
||||
"templates/layout.html",
|
||||
"templates/topbar.html",
|
||||
"templates/new_draw.html",
|
||||
))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user