File browser browses files

This commit is contained in:
Anton Dyudin 2014-09-02 11:11:37 -07:00 committed by Anton Dyudin
parent f7f359fa6c
commit 69d64fe590

View File

@ -9,7 +9,7 @@
:::: ~pittyp-pittyp
::
=+ pax=`path`(flop but.gas)
=+ cot=(trip ;;(,@ (fall (file (welp p.rut pax)) 'No such file')))
=+ cot=(trip ;;(,@ (fall (file (welp p.rut pax)) '')))
=+ js="""
window.location = "/gen/main{<q.rut>}/" + pax.value
"""
@ -17,6 +17,25 @@
;head:title:"{<pax>}"
;body
;input#pax(onchange js, value (slag 1 <pax>));
;+ =+ ups="%"
|-
?: =(~ pax) ;div:a/"/gen/main{<q.rut>}":"/==="
=: ups "%{ups}"
pax (scag (dec (lent pax)) pax)
==
=+ sul=;;(arch .^(%cy (welp p.rut pax)))
?: (gte 2 ~(wyt by r.sul)) $
;div:a/"/gen/main{<q.rut>}{<pax>}":"{ups}"
::
;* =+ sub=;;(arch .^(%cy (welp p.rut pax)))
=| don=tape
%+ turn (~(tap by r.sub)) |= [a=span ~]
=: don "{don}/{(trip a)}"
pax (welp pax /[a])
==
=+ sus=;;(arch .^(%cy (welp p.rut pax)))
?: =(2 ~(wyt by r.sus)) $(a p.n.-.r.sus)
;div:a/"/gen/main{<q.rut>}{<pax>}":"{(slag 1 don)}"
;pre:"{cot}"
==
==