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.
29 lines
664 B
29 lines
664 B
tag toggle
|
|
prop param
|
|
prop disabled
|
|
|
|
css cursor:pointer cursor.disabled:default
|
|
|
|
def render
|
|
<self.activated=R.params[param] .disabled=disabled @click.if(!disabled)=R.toggle(param)><slot>
|
|
|
|
tag ref-f # f - forget current params in new destination
|
|
prop view
|
|
prop target = {}
|
|
prop go
|
|
|
|
def render
|
|
let link = go || url
|
|
<self[d:inline]><a.active=(R.to_path! == link) href=link @click.prevent=R.go(link)><slot>
|
|
|
|
get url
|
|
R.to_path view, target
|
|
|
|
tag ref < ref-f
|
|
get url
|
|
#target = JSON.parse JSON.stringify(target) # duplicate object
|
|
#target[k] ||= v for own k, v of R.safe_params
|
|
R.to_path view, #target
|
|
|
|
tag not_found
|
|
<self><h1> "Page not found :("
|