forked from x/icebergs
add some
This commit is contained in:
parent
f7e3dcd9ff
commit
bb99205fdb
12
render.go
12
render.go
@ -271,12 +271,10 @@ func (m *Message) Resource(file string, arg ...string) string {
|
||||
}
|
||||
func (m *Message) resource(file string) string {
|
||||
p := kit.FileLines(-1)
|
||||
kit.If(file == "", func() { p = kit.ExtChange(p, JS) }, func() {
|
||||
if kit.HasPrefix(file, PS, HTTP) {
|
||||
p = file
|
||||
} else {
|
||||
p = path.Join(path.Dir(p), file)
|
||||
if file == "" {
|
||||
file = kit.ExtChange(p, JS)
|
||||
} else if !kit.HasPrefix(file, SRC, USR, PS, HTTP) {
|
||||
file = path.Join(path.Dir(p), file)
|
||||
}
|
||||
})
|
||||
return m.FileURI(p)
|
||||
return m.FileURI(file)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user