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