Added clay browser

This commit is contained in:
Anton Dyudin 2014-08-28 18:28:13 -07:00 committed by Anton Dyudin
parent b55c48ef2c
commit 9b04cf46dd
2 changed files with 24 additions and 1 deletions

View File

@ -6,7 +6,8 @@
::
++ grow :: convert to
|%
++ html (crip (xmlt | own ~)) :: convert to %html
++ hymn ;html(head:title:"Untitled" body:"+{own}") :: convert to %hymn
++ html (crip (xmlt | hymn ~)) :: convert to %html
++ mime [/text/html (taco html)] :: convert to %mime
--
--

View File

@ -0,0 +1,22 @@
:: %clay browser
::
:::: /hook/hymn/dirs/fab/pub
::
/= gas /$ fuel
/= rut /$ |= [a=beam path] ^- [p=path q=path]
[(tope a(s ~)) (flop (slag 1 s.a))]
!:
:::: ~pittyp-pittyp
::
=+ pax=`path`(flop but.gas)
=+ cot=(trip ;;(,@ (fall (file (welp p.rut pax)) 'No such file')))
=+ js="""
window.location = "/gen/main{<q.rut>}/" + pax.value
"""
;html
;head:title:"{<pax>}"
;body
;input#pax(onchange js, value (slag 1 <pax>));
;pre:"{cot}"
==
==