mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-04 21:33:41 +03:00
Added clay browser
This commit is contained in:
parent
b55c48ef2c
commit
9b04cf46dd
@ -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
|
||||
--
|
||||
--
|
||||
|
22
main/pub/fab/dirs/hymn.hook
Normal file
22
main/pub/fab/dirs/hymn.hook
Normal 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}"
|
||||
==
|
||||
==
|
Loading…
Reference in New Issue
Block a user