mirror of
https://github.com/urbit/shrub.git
synced 2024-12-12 10:29:01 +03:00
Moved old model epic arms to template explanation
This commit is contained in:
parent
ca1aa94523
commit
e3d1cf1d00
@ -1,6 +1,34 @@
|
||||
!:
|
||||
:: Some uses of template syntax
|
||||
::
|
||||
=> |% :: no longer in %zuse
|
||||
++ fest :: web synthesizer
|
||||
|= [hom=path raw=path]
|
||||
|* yax=$+(epic *)
|
||||
(yax (fuel (fain hom raw)))
|
||||
::
|
||||
++ gist :: convenient html
|
||||
|= [hom=path raw=path]
|
||||
|= yax=$+(epic marl)
|
||||
%- (fest hom raw)
|
||||
|= piq=epic
|
||||
^- manx
|
||||
=+ ^= sip :: skip blanks
|
||||
|= mal=marl
|
||||
?~(mal ~ ?.(|(=(:/(~) i.mal) =(:/([10 ~]) i.mal)) mal $(mal t.mal)))
|
||||
=+ zay=`marl`(yax piq)
|
||||
=. zay (sip zay)
|
||||
=+ ^= twa
|
||||
|- ^- [p=marl q=marl]
|
||||
?~ zay [~ ~]
|
||||
?: ?=([[[%head *] *] *] zay)
|
||||
[c.i.zay ?:(?=([[[%body *] *] ~] t.zay) c.i.t.zay t.zay)]
|
||||
?: ?=([[[%title *] *] *] zay)
|
||||
[[i.zay ~] t.zay]
|
||||
[~ zay]
|
||||
[/html [/head (sip p.twa)] [/body (sip q.twa)] ~]
|
||||
::
|
||||
--
|
||||
%- gist
|
||||
|= epic
|
||||
^- marl
|
||||
|
Loading…
Reference in New Issue
Block a user