mirror of
https://github.com/urbit/shrub.git
synced 2024-12-12 10:29:01 +03:00
Some html and syntax tweaks.
This commit is contained in:
parent
779ab3f1ea
commit
a6dbaf7584
@ -34,7 +34,7 @@
|
||||
++ pimp :: traced request
|
||||
$: ful=? :: | === HEAD
|
||||
hen=duct :: event trace
|
||||
sam=seam :: logical request
|
||||
som=seam :: logical request
|
||||
pez=pest :: request state
|
||||
== ::
|
||||
++ rote :: remote server
|
||||
@ -436,9 +436,10 @@
|
||||
==
|
||||
::
|
||||
++ flux :: credential caboose
|
||||
|= quy=quay
|
||||
|= [nep=@tas quy=quay]
|
||||
^- coin
|
||||
:* %many
|
||||
[%$ %tas nep]
|
||||
[%blob ced]
|
||||
|- ^- (list coin)
|
||||
?~ quy ~
|
||||
@ -446,12 +447,12 @@
|
||||
==
|
||||
::
|
||||
++ funk :: functional request
|
||||
|= [imp=? fur=(unit term) paw=(list ,@t) quy=quay]
|
||||
|= [nep=@tas fur=(unit term) paw=(list ,@t) quy=quay]
|
||||
^- (unit seam)
|
||||
%+ bind
|
||||
^- (unit ,[logo tube])
|
||||
=+ ^= zac ^- (unit ,[p=@ta q=path])
|
||||
?: imp
|
||||
?: =(%n (rsh 3 2 nep))
|
||||
[~ (scot %da now) paw]
|
||||
?~ paw ~
|
||||
=+ zac=(slay i.paw)
|
||||
@ -470,7 +471,7 @@
|
||||
==
|
||||
|= [for=logo toe=tube]
|
||||
^- seam
|
||||
[%fun for toe(s (weld s.toe `path`~[~(rent co (flux quy))]))]
|
||||
[%fun for toe(s (weld s.toe `path`~[~(rent co (flux nep quy))]))]
|
||||
::
|
||||
++ holy :: structured request
|
||||
|= [pul=purl moh=moth]
|
||||
@ -491,12 +492,12 @@
|
||||
==
|
||||
?+ two ~
|
||||
%e & :: stranger
|
||||
%g p.p.pul :: guest
|
||||
%n !=(~ aut.ced) :: neighbor
|
||||
%s =+ urb=(~(get by aut.ced) %$) :: self
|
||||
%u p.p.pul :: guest
|
||||
%i !=(~ aut.ced) :: neighbor
|
||||
%o =+ urb=(~(get by aut.ced) %$) :: owner
|
||||
?~(urb | (levy u.urb |=(a=@ =(our a))))
|
||||
==
|
||||
?= $? %a :: application
|
||||
?= $? %p :: application
|
||||
%c :: console
|
||||
%f :: functional
|
||||
%l :: login
|
||||
@ -507,8 +508,8 @@
|
||||
==
|
||||
~
|
||||
?- tri
|
||||
?(%f %n) (funk =(%n tri) p.q.pul paw r.pul)
|
||||
?(%a %c %l) !!
|
||||
?(%f %n) (funk nep p.q.pul paw r.pul)
|
||||
?(%p %c %l) !!
|
||||
==
|
||||
::
|
||||
++ lace :: load and execute
|
||||
@ -797,16 +798,16 @@
|
||||
^- [(unit pimp) _+>]
|
||||
?- pez.pip
|
||||
%new
|
||||
?- -.sam.pip
|
||||
?- -.som.pip
|
||||
%fun
|
||||
=^ syt +>.$ (lude p.sam.pip q.sam.pip)
|
||||
=^ syt +>.$ (lude p.som.pip q.som.pip)
|
||||
:_ +>.$
|
||||
:- ~
|
||||
%= pip
|
||||
pez
|
||||
^- pest
|
||||
?~ syt
|
||||
[%err 404 [[%leaf "{<+.sam.pip>} not found"] ~]]
|
||||
[%err 404 [[%leaf "{<+.som.pip>} not found"] ~]]
|
||||
?- -.u.syt
|
||||
| [%err 500 (flop p.u.syt)]
|
||||
& [%fin p.u.syt]
|
||||
@ -829,7 +830,7 @@
|
||||
=+ hoy=(holy p.pez.pip)
|
||||
?~ hoy
|
||||
pip(pez [%err 404 [[%leaf "invalid request"] ~]])
|
||||
pip(sam u.hoy, pez %new)
|
||||
pip(som u.hoy, pez %new)
|
||||
==
|
||||
::
|
||||
++ work
|
||||
|
@ -4433,18 +4433,6 @@
|
||||
* =+(neg=open ?:(=(gen neg) [%0 ~] $(gen neg)))
|
||||
==
|
||||
::
|
||||
++ jone
|
||||
^- (list twig)
|
||||
?: ?=([%clzz *] gen)
|
||||
p.gen
|
||||
?: ?=([%zpcb * [%clzz *]] gen)
|
||||
p.q.gen
|
||||
[gen ~]
|
||||
::
|
||||
++ jonk
|
||||
^- (list twig)
|
||||
[gen ~]
|
||||
::
|
||||
++ open
|
||||
^- twig
|
||||
?- gen
|
||||
@ -4482,23 +4470,16 @@
|
||||
|- ^- twig
|
||||
?~ p.gen
|
||||
[%dtzz %n ~]
|
||||
=+ mow=jonk(gen i.p.gen)
|
||||
?: =(mow [i.p.gen ~])
|
||||
[i.p.gen $(p.gen t.p.gen)]
|
||||
$(p.gen (weld mow t.p.gen))
|
||||
::
|
||||
[%cltr *]
|
||||
|- ^- twig
|
||||
?~ p.gen
|
||||
[%zpzp ~]
|
||||
=+ mow=jonk(gen i.p.gen)
|
||||
?: =(mow [i.p.gen ~])
|
||||
?~ t.p.gen
|
||||
i.p.gen
|
||||
[i.p.gen $(p.gen t.p.gen)]
|
||||
$(p.gen (weld mow t.p.gen))
|
||||
::
|
||||
[%clzz *] open(gen [%clsg p.gen])
|
||||
[%cncb *] [%ktls [%cnzz p.gen] %cnts p.gen q.gen]
|
||||
[%cncl *] [%cnsg [%$ ~] p.gen q.gen]
|
||||
[%cndt *] [%cnhp q.gen [p.gen ~]]
|
||||
@ -6521,10 +6502,44 @@
|
||||
;~(pfix fas gash)
|
||||
==
|
||||
::
|
||||
++ rump
|
||||
%+ sear
|
||||
|= [a=wing b=(unit twig)] ^- (unit twig)
|
||||
?~(b [~ %cnzz a] ?.(?=([@ ~] a) ~ [~ [%dtzz %tas i.a] u.b]))
|
||||
;~(plug rope ;~(pose (stag ~ ;~(pfix fas wide)) (easy ~)))
|
||||
::
|
||||
++ rood
|
||||
;~ pfix fas
|
||||
(stag %clsg poor)
|
||||
==
|
||||
::
|
||||
++ rupl
|
||||
%+ cook
|
||||
|= [a=? b=(list twig) c=?]
|
||||
?: a
|
||||
?: c
|
||||
[%clsg [%clsg b] ~]
|
||||
[%clsg b]
|
||||
?: c
|
||||
[%clsg [%cltr b] ~]
|
||||
[%cltr b]
|
||||
;~ plug
|
||||
;~ pose
|
||||
(cold | (just '['))
|
||||
(cold & (jest '~['))
|
||||
==
|
||||
::
|
||||
;~ pose
|
||||
(ifix [ace gap] (most gap tall))
|
||||
(most ace wide)
|
||||
==
|
||||
::
|
||||
;~ pose
|
||||
(cold & (jest ']~'))
|
||||
(cold | (just ']'))
|
||||
==
|
||||
==
|
||||
::
|
||||
++ scat
|
||||
%+ knee *twig |. ~+
|
||||
%- stew
|
||||
@ -6537,7 +6552,8 @@
|
||||
(stag %zpcn (cold ~ ;~(plug zap cen)))
|
||||
==
|
||||
:- '$'
|
||||
(cook |=(a=wing [%cnts a ~]) rope)
|
||||
rump
|
||||
:: (cook |=(a=wing [%cnts a ~]) rope)
|
||||
:- '%'
|
||||
;~ pfix cen
|
||||
;~ pose
|
||||
@ -6546,7 +6562,6 @@
|
||||
(stag %dtzz (stag %f (cold & pam)))
|
||||
(stag %dtzz (stag %f (cold | bar)))
|
||||
(stag %dtzz (stag %ta qut))
|
||||
:: (stag %clcn (ifix [sel ser] (most ace wide)))
|
||||
(cook (jock &) nuck:so)
|
||||
(cook |=(a=(list) [%clsg (posh ~ ~ (lent a) ~)]) (star cen))
|
||||
:: (easy [%clsg (poof wer)])
|
||||
@ -6616,23 +6631,7 @@
|
||||
:- '?'
|
||||
(stag %bccm (stag %fern ;~(pfix wut (ifix [pel per] (most ace toil)))))
|
||||
:- '['
|
||||
%+ stag
|
||||
%cltr
|
||||
;~ pfix sel
|
||||
%+ cook
|
||||
|= [a=(list twig) b=?(~ [~ ~])]
|
||||
?~(b a (weld a `_a`[[%bczp %null] ~]))
|
||||
;~ plug
|
||||
;~ pose
|
||||
(ifix [ace gap] (most gap tall))
|
||||
(most ace wide)
|
||||
==
|
||||
;~ pose
|
||||
(cold [~ ~] ;~(plug (just ']') (just '~')))
|
||||
(cold ~ (just ']'))
|
||||
==
|
||||
==
|
||||
==
|
||||
rupl
|
||||
:- ','
|
||||
(stag %bccm ;~(pfix com hill))
|
||||
:- '^'
|
||||
@ -6666,16 +6665,15 @@
|
||||
(cook |=(a=twig [[%dtzz %n ~] a]) wide)
|
||||
==
|
||||
==
|
||||
:- '#'
|
||||
;~(pfix hax rupl)
|
||||
:- '"'
|
||||
%+ cook
|
||||
|= a=(list (list beer))
|
||||
[%smdq |-(?~(a ~ (weld i.a $(a t.a))))]
|
||||
(most dog soil)
|
||||
:- ['a' 'z']
|
||||
%+ sear
|
||||
|= [a=wing b=(unit twig)] ^- (unit twig)
|
||||
?~(b [~ %cnzz a] ?.(?=([@ ~] a) ~ [~ [%dtzz %tas i.a] u.b]))
|
||||
;~(plug rope ;~(pose (stag ~ ;~(pfix fas wide)) (easy ~)))
|
||||
rump
|
||||
:- '|'
|
||||
;~ pose
|
||||
(cook |=(a=wing [%cnts a ~]) rope)
|
||||
@ -6684,12 +6682,7 @@
|
||||
==
|
||||
:- '~'
|
||||
;~ pose
|
||||
%+ cook
|
||||
|= a=(list (list beer))
|
||||
:_ [%bczp %null]
|
||||
:- %clfs
|
||||
[%smdq |-(?~(a ~ (weld i.a $(a t.a))))]
|
||||
(most dog ;~(pfix sig soil))
|
||||
rupl
|
||||
::
|
||||
;~ pfix sig
|
||||
;~ pose
|
||||
@ -7172,7 +7165,7 @@
|
||||
==
|
||||
==
|
||||
::
|
||||
++ tall (knee *twig |.(~+((wart ;~(pose (norm &) long lute)))))
|
||||
++ tall (knee *twig |.(~+((wart ;~(pose (norm &) long lute xall)))))
|
||||
++ wide (knee *twig |.(~+((wart ;~(pose (norm |) long)))))
|
||||
++ hill (knee *tile |.(~+(;~(pose (noil |) toil))))
|
||||
++ howl (knee *tile |.(~+(;~(pose (noil &) toil))))
|
||||
|
@ -1097,27 +1097,20 @@
|
||||
:- p.pok
|
||||
[i.rax q.pok]
|
||||
::
|
||||
++ epic !: :: web synthesizer
|
||||
|* $= yax
|
||||
$+ $: quy=quay
|
||||
own=@p
|
||||
ced=cred
|
||||
pos=pred
|
||||
suf=path
|
||||
but=path
|
||||
for=@tas
|
||||
==
|
||||
*
|
||||
++ give !: :: web synthesizer
|
||||
|* yax=$+(epic *)
|
||||
|= [for=@tas pre=path suf=path but=path]
|
||||
?> ?=([@ *] but)
|
||||
=+ dyb=(slay i.but)
|
||||
?> ?& ?=([~ %many *] dyb)
|
||||
?=(^ p.u.dyb)
|
||||
?=([%blob *] i.p.u.dyb)
|
||||
?=([* * *] p.u.dyb)
|
||||
?=([%$ %tas *] i.p.u.dyb)
|
||||
?=([%blob *] i.t.p.u.dyb)
|
||||
==
|
||||
=+ ced=((hard cred) p.i.p.u.dyb)
|
||||
=+ nep=q.p.i.p.u.dyb
|
||||
=+ ced=((hard cred) p.i.t.p.u.dyb)
|
||||
=+ ^= gut ^- (list ,@t)
|
||||
%+ turn t.p.u.dyb
|
||||
%+ turn t.t.p.u.dyb
|
||||
|= a=coin ^- @t
|
||||
?> ?=([%$ %t @] a)
|
||||
?>(((sane %t) q.p.a) q.p.a)
|
||||
@ -1135,6 +1128,7 @@
|
||||
suf
|
||||
t.but
|
||||
for
|
||||
nep
|
||||
==
|
||||
::
|
||||
++ epur :: url/header parser
|
||||
@ -1935,6 +1929,16 @@
|
||||
caq=cask :: symmetric key state
|
||||
== ::
|
||||
++ dove ,[p=@ud q=(map ,@ud ,@)] :: count hash 13-blocks
|
||||
++ epic :: FCGI parameters
|
||||
$: quy=quay :: query
|
||||
own=@p :: server
|
||||
ced=cred :: client credentials
|
||||
pos=pred :: path prefix
|
||||
fus=path :: reverse suffix
|
||||
but=path :: ending
|
||||
for=logo :: extension
|
||||
nep=@tas :: request model
|
||||
== ::
|
||||
++ flap ,@uvH :: network packet id
|
||||
++ flow :: packet connection
|
||||
$: rtt=@dr :: decaying avg rtt
|
||||
|
@ -1,10 +1,10 @@
|
||||
!:
|
||||
%- epic
|
||||
|= [quy=quay own=@p ced=cred pos=pred suf=path but=path for=@tas]
|
||||
%- give
|
||||
|= [quy=quay own=@p ced=cred pos=pred suf=path but=path for=@tas nep=@tas]
|
||||
^- manx
|
||||
:~ %html
|
||||
:~ %body
|
||||
~[%h3 +"{(scow %p own)} is generally a happy camper."]
|
||||
[%h3 -"{:/(scow %p own)} is generally a happy camper."]
|
||||
[%p -"a paragraph with {i/-"italics"} is nice."]
|
||||
[%p -"we can go crazy by embedding {:/(scow %p own)}."]
|
||||
+"Hi, neighbor!{?:(=(~ quy) "" " You ask: {<quy>}?")}"
|
||||
@ -30,6 +30,7 @@
|
||||
+"Authenticated identities: {<aut.ced>}."
|
||||
%br
|
||||
+"This {<for>} page was produced from {<`path`pos>}, under {<suf>}"
|
||||
+", as {<nep>}"
|
||||
+"{?:(=(~ but) "." ", in {<but>}.")}"
|
||||
==
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user