Refactor: views/ dir is now called templates/
This commit is contained in:
parent
360f40dd0a
commit
5d2b097cbd
@ -53,12 +53,12 @@ func Serve() {
|
|||||||
"safeHTML": func(s string) template.HTML {
|
"safeHTML": func(s string) template.HTML {
|
||||||
return template.HTML(s)
|
return template.HTML(s)
|
||||||
},
|
},
|
||||||
}).ParseFiles("views/page.html", "views/base.html"))
|
}).ParseFiles("templates/page.html", "templates/base.html"))
|
||||||
templates["list.html"] = template.Must(template.ParseFiles("views/list.html", "views/base.html"))
|
templates["list.html"] = template.Must(template.ParseFiles("templates/list.html", "templates/base.html"))
|
||||||
templates["edit.html"] = template.Must(template.ParseFiles("views/edit.html", "views/base.html"))
|
templates["edit.html"] = template.Must(template.ParseFiles("templates/edit.html", "templates/base.html"))
|
||||||
templates["about.html"] = template.Must(template.ParseFiles("views/about.html", "views/base.html"))
|
templates["about.html"] = template.Must(template.ParseFiles("templates/about.html", "templates/base.html"))
|
||||||
templates["notfound.html"] = template.Must(template.ParseFiles("views/notfound.html", "views/base.html"))
|
templates["notfound.html"] = template.Must(template.ParseFiles("templates/notfound.html", "templates/base.html"))
|
||||||
templates["404.html"] = template.Must(template.ParseFiles("views/404.html", "views/base.html"))
|
templates["404.html"] = template.Must(template.ParseFiles("templates/404.html", "templates/base.html"))
|
||||||
e.Renderer = &TemplateRegistry{
|
e.Renderer = &TemplateRegistry{
|
||||||
templates: templates,
|
templates: templates,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user