diff --git a/sync/static/favicon.ico b/htmlpage/static/favicon.ico
similarity index 100%
rename from sync/static/favicon.ico
rename to htmlpage/static/favicon.ico
diff --git a/sync/static/img/nidus-logo-256-transparent.png b/htmlpage/static/img/nidus-logo-256-transparent.png
similarity index 100%
rename from sync/static/img/nidus-logo-256-transparent.png
rename to htmlpage/static/img/nidus-logo-256-transparent.png
diff --git a/public-report/static/js/geocode.js b/htmlpage/static/js/geocode.js
similarity index 100%
rename from public-report/static/js/geocode.js
rename to htmlpage/static/js/geocode.js
diff --git a/public-report/static/js/location.js b/htmlpage/static/js/location.js
similarity index 100%
rename from public-report/static/js/location.js
rename to htmlpage/static/js/location.js
diff --git a/public-report/static/js/map.js b/htmlpage/static/js/map.js
similarity index 100%
rename from public-report/static/js/map.js
rename to htmlpage/static/js/map.js
diff --git a/sync/static/vendor/css/bootstrap.min.css b/htmlpage/static/vendor/css/bootstrap.min.css
similarity index 100%
rename from sync/static/vendor/css/bootstrap.min.css
rename to htmlpage/static/vendor/css/bootstrap.min.css
diff --git a/sync/static/vendor/js/bootstrap.bundle.min.js b/htmlpage/static/vendor/js/bootstrap.bundle.min.js
similarity index 100%
rename from sync/static/vendor/js/bootstrap.bundle.min.js
rename to htmlpage/static/vendor/js/bootstrap.bundle.min.js
diff --git a/sync/static/vendor/js/bootstrap.min.js b/htmlpage/static/vendor/js/bootstrap.min.js
similarity index 100%
rename from sync/static/vendor/js/bootstrap.min.js
rename to htmlpage/static/vendor/js/bootstrap.min.js
diff --git a/public-report/routes.go b/public-report/routes.go
index 17290814..67188698 100644
--- a/public-report/routes.go
+++ b/public-report/routes.go
@@ -1,8 +1,6 @@
package publicreport
import (
- "net/http"
-
"github.com/Gleipnir-Technology/nidus-sync/htmlpage"
"github.com/go-chi/chi/v5"
)
@@ -24,7 +22,6 @@ func Router() chi.Router {
r.Get("/search", getSearch)
r.Get("/status", getStatus)
r.Get("/status/{report_id}", getStatusByID)
- localFS := http.Dir("./public-report/static")
- htmlpage.FileServer(r, "/static", localFS, EmbeddedStaticFS, "static")
+ htmlpage.AddStaticRoute(r, "/static")
return r
}
diff --git a/sync/page.go b/sync/page.go
index c0d0e3de..1738e5b7 100644
--- a/sync/page.go
+++ b/sync/page.go
@@ -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 {
diff --git a/sync/routes.go b/sync/routes.go
index 0a24a87f..369bedd2 100644
--- a/sync/routes.go
+++ b/sync/routes.go
@@ -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
}