You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
557 B

package PageHandlers
import (
"embed"
_ "embed"
"html/template"
)
//go:embed templates
var templateFS embed.FS
var tmpl map[string]*template.Template
func init() {
tmpl = make(map[string]*template.Template)
tmpl["index.html"] = template.Must(template.ParseFS(templateFS, "templates/index.html", "templates/base.html"))
tmpl["search.html"] = template.Must(template.ParseFS(templateFS, "templates/search.html", "templates/base.html"))
tmpl["view.html"] = template.Must(template.ParseFS(templateFS, "templates/view.html", "templates/base.html"))
}