package handlers import ( "html/template" "net/http" "codeberg.org/mihna123/openstore/internal/config" "codeberg.org/mihna123/openstore/internal/web" ) type Handler struct { tmpl *template.Template cfg *config.Config } func Routes(conf *config.Config) *http.ServeMux { handler := Handler{ tmpl: template.Must(template.ParseFS(web.Files, "templates/*.html")), cfg: conf, } mux := http.NewServeMux() mux.HandleFunc("GET /{$}", handler.home) mux.Handle("GET /css/", http.FileServerFS(web.Files)) return mux }