Make public report and sync share static assets
It just seems useful
This commit is contained in:
parent
81dabdf097
commit
d60db93bf2
11 changed files with 2 additions and 12 deletions
|
|
@ -12,9 +12,6 @@ import (
|
|||
//go:embed template/*
|
||||
var embeddedFiles embed.FS
|
||||
|
||||
//go:embed static/*
|
||||
var EmbeddedStaticFS embed.FS
|
||||
|
||||
var components = [...]string{"header", "map"}
|
||||
|
||||
func buildTemplate(files ...string) *htmlpage.BuiltTemplate {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package sync
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/Gleipnir-Technology/nidus-sync/api"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/auth"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/htmlpage"
|
||||
|
|
@ -68,9 +66,7 @@ func Router() chi.Router {
|
|||
r.Method("GET", "/cell/{cell}", auth.NewEnsureAuth(getCellDetails))
|
||||
r.Method("GET", "/settings", auth.NewEnsureAuth(getSettings))
|
||||
r.Method("GET", "/source/{globalid}", auth.NewEnsureAuth(getSource))
|
||||
//r.Method("GET", "/vector-tiles/{org_id}/{tileset_id}/{zoom}/{x}/{y}.{format}", auth.NewEnsureAuth(getVectorTiles))
|
||||
|
||||
localFS := http.Dir("./sync/static")
|
||||
htmlpage.FileServer(r, "/static", localFS, EmbeddedStaticFS, "static")
|
||||
htmlpage.AddStaticRoute(r, "/static")
|
||||
return r
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB |
7
sync/static/vendor/css/bootstrap.min.css
vendored
7
sync/static/vendor/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7
sync/static/vendor/js/bootstrap.min.js
vendored
7
sync/static/vendor/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue