mirror of
https://github.com/tloncorp/landscape.git
synced 2024-12-01 02:45:49 +03:00
Merge branch 'develop' of github.com:tloncorp/landscape into develop
This commit is contained in:
commit
dfeef0af43
@ -669,15 +669,27 @@
|
||||
%+ ~(put by glob) (slag 1 `path`u.filp)
|
||||
[u.type (as-octs:mimes:html body)]
|
||||
::
|
||||
++ split-at
|
||||
=| fst=tape
|
||||
|= [=tape char=@tD]
|
||||
=. tape (flop tape)
|
||||
|-
|
||||
^+ [fst fst]
|
||||
?~ tape [(flop fst) (flop tape)]
|
||||
?: =(i.tape char)
|
||||
[(flop fst) (flop t.tape)]
|
||||
$(tape t.tape, fst (snoc fst i.tape))
|
||||
::
|
||||
++ fip
|
||||
=, de-purl:html
|
||||
;: cook
|
||||
|=(pork (weld q (drop p)))
|
||||
deft
|
||||
|=(a=cord (rash a (more fas smeg)))
|
||||
crip
|
||||
(star ;~(pose (cold '%20' (just ' ')) next))
|
||||
==
|
||||
|= fil=@t
|
||||
=/ [ext=tape fil=tape] (split-at (trip fil) '.')
|
||||
=- (snoc - (crip ext))
|
||||
%+ turn
|
||||
(scan fil (most fas (star ;~(less fas next))))
|
||||
|= t=^tape
|
||||
%- crip
|
||||
(en-urlt:html t)
|
||||
::
|
||||
::
|
||||
++ inline-js-response
|
||||
|= js=cord
|
||||
@ -703,6 +715,8 @@
|
||||
?: =(suffix /desk/js)
|
||||
%- inline-js-response
|
||||
(rap 3 'window.desk = "' u.des '";' ~)
|
||||
=? suffix !(~(has by glob) suffix)
|
||||
(turn suffix |=(s=@t (crip (en-urlt:html (trip s)))))
|
||||
=/ requested
|
||||
?: (~(has by glob) suffix) suffix
|
||||
/index/html
|
||||
|
@ -14,7 +14,12 @@
|
||||
%+ turn paths
|
||||
|= pax=path
|
||||
^- [path mime]
|
||||
:- (slag (lent dir) pax)
|
||||
:-
|
||||
?> ?=(^ pax)
|
||||
%+ turn t.pax
|
||||
|= seg=@t
|
||||
^- @t
|
||||
(crip (en-urlt:html (trip seg)))
|
||||
=/ mar=mark (rear pax)
|
||||
=+ .^(vas=vase %cr (weld home pax))
|
||||
=+ .^(=tube:clay %cc (weld home /[mar]/mime))
|
||||
|
Loading…
Reference in New Issue
Block a user