uucckk / airoot-uisys

A Go Web UI System

Home Page:http://www.airoot.cn/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AIroot UISYS

www.airoot.cn

A powerful web ui tool, so we call it uisys!

For example

<@pub/>
<!-- define a module -->
<@define name="MyBox">
  <div>Hello Baby!</div>
</@define>

<!-- you code here. -->
<div>
  <MyBox/>
  <MyBox/>
</div>

How to run it?

  1. You need to use uisys, download
  2. Then save the above file to D:\test\index.ui
  3. Finally, run uisys.exe, and enter the following command in the terminal:
pub D:\test\ :90

OK, open Chrome / Firefox and type http://localhost:90/index.ui

you can see double "Hello Baby!" in your broswer.

Other examples

You can also use JavaScript as follows:

<@pub/>
<!-- define a module -->
<@define name="MyBox">
  <div>Hello Baby!</div>
</@define>

<!-- you code here. -->
<div>
  <!-- dom area -->
</div>
<script>
  function init(){
    var box = new MyBox();
    dom.appendChild(box);
  }
</script>

mybe ...

<@pub/>
<!-- define a module -->
<@define name="MyBox">
  <div>Hello Baby!</div>
</@define>

<!-- you code here. -->
<div id="ct"></div>
<script>
  function init(){
    var box = new MyBox();
    #ct.appendChild(box);
  }
</script>

If you want the MyBox module to be a file, you can save it, for example:

Create the file MyBox.ui, and the code is as follows:

<!-- module MyBox code in D:\test\MyBox.ui -->
<div>Hello Baby!</div>

Then create the file Index.ui with the following code:

<!-- module Index code in D:\test\Index.ui -->
<@pub/>
<div>
  <MyBox/>
  <MyBox/>
</div>

open the browser to see the results, You can still see double "Hello Baby!" words.

use package

If you want to put files in a folder, you can do this:

For example, take the D:\test\MyBox.ui move to D:\test\mymod\mybox.ui.

Then Index.ui import MyBox.ui should be changed to the following code:

<!-- module Index code in D:\test\Index.ui -->
<@pub/>
<div>
  <mymod.MyBox/>
  <mymod.MyBox/>
</div>

Or it can be imported globally:

<!-- module Index code in D:\test\Index.ui -->
<@pub/>
<@import value="mymod.MyBox" />
<div>
  <MyBox/>
  <MyBox/>
</div>

open the browser to see the results, You can still see double "Hello Baby!" words.

About

A Go Web UI System

http://www.airoot.cn/

License:Apache License 2.0


Languages

Language:JavaScript 58.6%Language:Go 36.0%Language:Smarty 4.4%Language:CSS 0.8%Language:HTML 0.1%Language:MAXScript 0.0%Language:Modula-3 0.0%