It seems thatadmin pages render incorrectly when using bindatafs
try following program without, and with bindatafas
first run as is.
then run with bindata (first run ">bindatafs bindatafs" and change "false" to "true" to create bindata)
with bindata, renders differently -> in html it appears as part of the header is rendered in the wrong place.
main.go:
package main
import (
"fmt"
"net/http"
"os"
_ "github.com/admpub/go-sqlite3-win64"
"github.com/jinzhu/gorm"
"github.com/qor/admin"
"playground/qortest/bindatafs"
)
type User struct {
ID int
Name string
}
func main() {
if false {
bindatafs.AssetFS.RegisterPath("vendor\\github.com\\qor\\admin\\views")
bindatafs.AssetFS.Compile()
os.Exit(1)
}
DB, _ := gorm.Open("sqlite3", "test.db")
DB.AutoMigrate(&User{})
Admin := admin.New(&admin.AdminConfig{
DB: DB,
AssetFS: bindatafs.AssetFS,
})
Admin.AddResource(&User{})
mux := http.NewServeMux()
Admin.MountTo("/admin", mux)
fmt.Println("Listening on: 9000")
http.ListenAndServe(":9000", mux)
}
without bindatafs:

with bindatafs:

It seems thatadmin pages render incorrectly when using bindatafs
try following program without, and with bindatafas
first run as is.
then run with bindata (first run ">bindatafs bindatafs" and change "false" to "true" to create bindata)
with bindata, renders differently -> in html it appears as part of the header is rendered in the wrong place.
main.go:
without bindatafs:

with bindatafs:
