diff --git a/go.mod b/go.mod index c26fb3e1..86c9b12d 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module shylinux.com/x/contexts go 1.11 -require shylinux.com/x/ice v0.7.0 +require shylinux.com/x/ice v0.6.8 require ( shylinux.com/x/golang-story v0.3.4 diff --git a/src/hi/base.js b/src/hi/base.js new file mode 100644 index 00000000..e69de29b diff --git a/src/hi/base.sh b/src/hi/base.sh new file mode 100644 index 00000000..64b29b8c --- /dev/null +++ b/src/hi/base.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +show() { + echo "base sh" +} diff --git a/src/hi/he.js b/src/hi/he.js new file mode 100644 index 00000000..5f18b93f --- /dev/null +++ b/src/hi/he.js @@ -0,0 +1,34 @@ +Volcanos("onimport", {help: "导入数据", list: [ + {type: "button", name: "list"}, + {type: "button", name: "back"}, + {type: "button", name: "show"}, +], _init: function(can, msg, cb, target) { + can.page.Modify(can, can._legend, "示例") + msg.Push("hi", "hello") + msg.Push("he", "world") + msg.Echo("hello world") + can.onmotion.clear(can) + can.onappend.table(can, msg) + can.onappend.board(can, msg) + can.base.isFunc(cb) && cb(msg) +}}) +Volcanos("onaction", {help: "操作数据", list: ["show", "some"], + _trans: {show: "展示", some: "其它"}, + show: function(event, can) { var msg = can.request(event) + msg.Push("value", 200) + msg.Push("value", 300) + msg.Push("value", 300) + msg.Push("value", 300) + msg.Push("value", 400) + msg.Option("height", 400) + can.onappend._output(can.sup, msg, "/plugin/story/pie.js") + }, + some: function(event, can) { var msg = can.request(event) + msg.Push("hi", "hello") + msg.Push("hi", "hello") + msg.Push("hi", "hello") + msg.Push("hi", "hello") + msg.Push("hi", "hello") + can.onappend.table(can, msg) + }, +}) diff --git a/src/hi/hi.go b/src/hi/hi.go new file mode 100644 index 00000000..81c790f4 --- /dev/null +++ b/src/hi/hi.go @@ -0,0 +1,18 @@ +package hi + +import ( + "shylinux.com/x/ice" +) + +type hi struct { + ice.Zone + + list string `name:"list zone id auto insert" help:"hi"` +} + +func (h hi) List(m *ice.Message, arg ...string) { + h.Zone.List(m, arg...) +} + +func init() { ice.Cmd("web.code.hi.hi", hi{}) } + diff --git a/src/hi/hi.js b/src/hi/hi.js new file mode 100644 index 00000000..776991d6 --- /dev/null +++ b/src/hi/hi.js @@ -0,0 +1,10 @@ +Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, cb, target) { + msg.Push("hi", "hello") + msg.Push("he", "hello") + msg.Echo("hello world!\n") + msg.Echo("hello world!\n") + msg.Echo("hello world!\n") + + can.onmotion.clear(can), can.onappend.table(can, msg), can.onappend.board(can, msg) + can.base.isFunc(cb) && cb(msg) +}}) diff --git a/src/hi/hi.py b/src/hi/hi.py new file mode 100644 index 00000000..e2c08566 --- /dev/null +++ b/src/hi/hi.py @@ -0,0 +1 @@ +print "hello world" \ No newline at end of file diff --git a/src/hi/hi.sh b/src/hi/hi.sh new file mode 100644 index 00000000..7f088067 --- /dev/null +++ b/src/hi/hi.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +source hi/base.sh +date +uptime +uname +echo "hello world" +echo "hello world" +echo "hello world" +env \ No newline at end of file diff --git a/src/hi/hi.shy b/src/hi/hi.shy new file mode 100644 index 00000000..33740759 --- /dev/null +++ b/src/hi/hi.shy @@ -0,0 +1,9 @@ +chapter "hi" + +field "hi" web.code.hi.hi +field "hi" web.code.hi.hi +field "hi" web.code.hi.hi +field "hi" web.code.hi.hi +field "hi" web.code.hi.hi +field "hi" web.code.hi.hi +field "hi" web.code.hi.hi diff --git a/src/main.go b/src/main.go index c97f63d0..1cd42d5b 100644 --- a/src/main.go +++ b/src/main.go @@ -1,6 +1,8 @@ package main import ( + _ "shylinux.com/x/contexts/src/hi" + "shylinux.com/x/ice" _ "shylinux.com/x/icebergs/misc/alpha" @@ -36,4 +38,4 @@ import ( _ "shylinux.com/x/linux-story/src/qemu" ) -func main() { println(ice.Run()) } +func main() { println(ice.Run()) } \ No newline at end of file diff --git a/src/main.shy b/src/main.shy index 972b3e85..16e68ee8 100644 --- a/src/main.shy +++ b/src/main.shy @@ -40,3 +40,4 @@ find . -name "*.css" -exec sed -i 's/: /:/g' {} + ` source hi/hi.shy +source hi/hi.shy \ No newline at end of file diff --git a/src/website/hi.txt b/src/website/hi.txt index 14ae96bf..a368d2ab 100644 --- a/src/website/hi.txt +++ b/src/website/hi.txt @@ -3,14 +3,7 @@ hi nfs.dir cli.qrcode cli.runtime - cli.runtime - cli.runtime - cli.runtime - cli.runtime web.code.hi.hi he cli.runtime web.code.hi.hi - - -