Coder Social home page Coder Social logo

themes's People

Contributors

chenhg5 avatar ghjdegithub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

themes's Issues

the theme adminlte doesn't implement interface Template

../../go/pkg/mod/github.com/!go!admin!group/[email protected]/adminlte/adminlte.go:43:32: cannot use &Adminlte (type *Theme) as type "github.com/GoAdminGroup/go-admin/template".Template in argument to "github.com/GoAdminGroup/go-admin/template".Add:
        *Theme does not implement "github.com/GoAdminGroup/go-admin/template".Template (missing GetAssetImportHTML method)

image

apparently, this new method Template.GetAssetImportHTML is added on April 25, 2020.

So run make test will fail in go-admin repository.
Ah, maybe I should create an issue in go-admin repository.

go run main.go of gin on the GoAdminGroup/go-admin has error info.

/Users/brook/go/pkg/mod/github.com/!go!admin!group/[email protected]/adminlte/adminlte.go:43:32: cannot use &Adminlte (type *Theme) as type "github.com/GoAdminGroup/go-admin/template".Template in argument to "github.com/GoAdminGroup/go-admin/template".Add:
*Theme does not implement "github.com/GoAdminGroup/go-admin/template".Template (missing GetAssetImportHTML method)

// main.go
package main

import (
_ "github.com/GoAdminGroup/go-admin/adapter/gin"
"github.com/GoAdminGroup/go-admin/engine"
"github.com/GoAdminGroup/go-admin/examples/datamodel"
"github.com/GoAdminGroup/go-admin/modules/config"
_ "github.com/GoAdminGroup/go-admin/modules/db/drivers/mysql"
"github.com/GoAdminGroup/go-admin/modules/language"
_ "github.com/GoAdminGroup/go-admin/plugins/admin"
"github.com/GoAdminGroup/go-admin/template"
"github.com/GoAdminGroup/go-admin/template/chartjs"
_ "github.com/GoAdminGroup/go-admin/template/types"
"github.com/GoAdminGroup/themes/adminlte"
_ "github.com/GoAdminGroup/themes/adminlte"
"github.com/gin-gonic/gin"
)

func main() {
r := gin.Default()

eng := engine.Default()

// global config
cfg := config.Config{
	Databases: config.DatabaseList{
		"default": {
			Host:         "127.0.0.1",
			Port:         "3306",
			User:         "root",
			Pwd:          "root",
			Name:         "goadmin",
			MaxIdleCon: 50,
			MaxOpenCon: 150,
			Driver:       "mysql",
		},
	},
	UrlPrefix: "admin",
	// STORE is important. And the directory should has permission to write.
	Store: config.Store{
		Path:   "./uploads",
		Prefix: "uploads",
	},
	Language: language.EN,
	// debug mode
	Debug: true,
	// log file absolute path
	InfoLogPath: "/var/logs/info.log",
	AccessLogPath: "/var/logs/access.log",
	ErrorLogPath: "/var/logs/error.log",
	ColorScheme: adminlte.ColorschemeSkinBlack,
}

// add component chartjs
template.AddComp(chartjs.NewChart())

_ = eng.AddConfig(cfg).
	AddGenerators(datamodel.Generators).
	// add generator, first parameter is the url prefix of table when visit.
	// example:
	//
	// "user" => http://localhost:9033/admin/info/user
	//
	AddGenerator("user", datamodel.GetUserTable).
	Use(r)

// customize your pages
eng.HTML("GET", "/admin", datamodel.GetContent)

_ = r.Run(":9033")

}

error js when remake theme

hi,
after i run $make, has error. At tag v0.0.43

all.min.336acc9b5c.js:12 Uncaught TypeError: (intermediate value)(...) is not a function
    at all.min.336acc9b5c.js:12:9337

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.