tracks can be edited! + major template overhaul
This commit is contained in:
parent
99b6a21179
commit
63122eb428
21 changed files with 674 additions and 221 deletions
50
admin/templates.go
Normal file
50
admin/templates.go
Normal file
|
@ -0,0 +1,50 @@
|
|||
package admin
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
var pages = map[string]*template.Template{
|
||||
"index": template.Must(template.ParseFiles(
|
||||
filepath.Join("admin", "views", "layout.html"),
|
||||
filepath.Join("views", "prideflag.html"),
|
||||
filepath.Join("admin", "components", "release", "release-list-item.html"),
|
||||
filepath.Join("admin", "views", "index.html"),
|
||||
)),
|
||||
|
||||
"login": template.Must(template.ParseFiles(
|
||||
filepath.Join("admin", "views", "layout.html"),
|
||||
filepath.Join("views", "prideflag.html"),
|
||||
filepath.Join("admin", "views", "login.html"),
|
||||
)),
|
||||
"logout": template.Must(template.ParseFiles(
|
||||
filepath.Join("admin", "views", "layout.html"),
|
||||
filepath.Join("views", "prideflag.html"),
|
||||
filepath.Join("admin", "views", "logout.html"),
|
||||
)),
|
||||
|
||||
"release": template.Must(template.ParseFiles(
|
||||
filepath.Join("admin", "views", "layout.html"),
|
||||
filepath.Join("views", "prideflag.html"),
|
||||
filepath.Join("admin", "views", "edit-release.html"),
|
||||
)),
|
||||
"track": template.Must(template.ParseFiles(
|
||||
filepath.Join("admin", "views", "layout.html"),
|
||||
filepath.Join("views", "prideflag.html"),
|
||||
filepath.Join("admin", "components", "release", "release-list-item.html"),
|
||||
filepath.Join("admin", "views", "edit-track.html"),
|
||||
)),
|
||||
}
|
||||
|
||||
var components = map[string]*template.Template{
|
||||
"editcredits": template.Must(template.ParseFiles(filepath.Join("admin", "components", "credits", "editcredits.html"))),
|
||||
"addcredit": template.Must(template.ParseFiles(filepath.Join("admin", "components", "credits", "addcredit.html"))),
|
||||
"newcredit": template.Must(template.ParseFiles(filepath.Join("admin", "components", "credits", "newcredit.html"))),
|
||||
|
||||
"editlinks": template.Must(template.ParseFiles(filepath.Join("admin", "components", "links", "editlinks.html"))),
|
||||
|
||||
"edittracks": template.Must(template.ParseFiles(filepath.Join("admin", "components", "tracks", "addtrack.html"))),
|
||||
"addtrack": template.Must(template.ParseFiles(filepath.Join("admin", "components", "tracks", "addtrack.html"))),
|
||||
"newtrack": template.Must(template.ParseFiles(filepath.Join("admin", "components", "tracks", "addtrack.html"))),
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue