admin control features and admin dashboard
This commit is contained in:
1 parent
c630f13c57
commit
37910e410b
69 files changed
+4959
-400
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package dashboard
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
//go:embed templates/*.html
|
||||
var templateFS embed.FS
|
||||
|
||||
//go:embed static
|
||||
var staticFS embed.FS
|
||||
|
||||
// staticSubFS re-roots staticFS so "static/dashboard.css" is served as
|
||||
// "/dashboard.css" under the /static/ route prefix, instead of
|
||||
// "/static/static/dashboard.css".
|
||||
func staticSubFS() fs.FS {
|
||||
sub, err := fs.Sub(staticFS, "static")
|
||||
if err != nil {
|
||||
panic(err) // embedded at compile time; a bad path here can't happen at runtime
|
||||
}
|
||||
return sub
|
||||
}
|
||||
Reference in new issue
Block a user