You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import "./router_tag.imba"
|
|
|
|
import { compact, fromPairs, chunk, includes, reject, toPairs, flatten } from 'lodash'
|
|
|
|
|
|
|
|
let helpers =
|
|
|
|
compact: compact
|
|
|
|
fromPairs: fromPairs
|
|
|
|
chunk: chunk
|
|
|
|
includes: includes
|
|
|
|
reject: reject
|
|
|
|
toPairs: toPairs
|
|
|
|
flatten: flatten
|
|
|
|
|
|
|
|
R.init(helpers: helpers, root: 'a', render: imba.commit)
|
|
|
|
|
|
|
|
tag view-a
|
|
|
|
<self><h1> 'a'
|
|
|
|
|
|
|
|
tag view-b
|
|
|
|
<self><h1> 'b'
|
|
|
|
|
|
|
|
tag view-c
|
|
|
|
<self><h1> 'c'
|
|
|
|
|
|
|
|
R.setters.e = do |v| "--{v}" if v
|
|
|
|
R.getters.e = do |v| v.slice(2)
|
|
|
|
tag view-e
|
|
|
|
<self><h1> 'e'
|
|
|
|
|
|
|
|
tag app
|
|
|
|
<self[d:bbox]>
|
|
|
|
<pro-ref view=v> v for v in R.views
|
|
|
|
<pro-ref view="d"> 'd'
|
|
|
|
<pro-toggle param="O">
|
|
|
|
<label> "O"
|
|
|
|
<input type='checkbox' checked=R.param('O')>
|
|
|
|
<pro-ref view="b" params={ project: 2}> "b/project/2"
|
|
|
|
<pro-ref-f view="c" params={ book: 3}> "c/book/3"
|
|
|
|
<pro-router>
|
|
|
|
<input$v type='text' value=R.param('e') @keyup=R.write('e', $v.value)>
|
|
|
|
|
|
|
|
if import.meta.env.MODE is 'development'
|
|
|
|
imba.mount <app>
|