mirror of
https://github.com/urbit/shrub.git
synced 2024-12-20 17:32:11 +03:00
40 lines
770 B
Plaintext
40 lines
770 B
Plaintext
/- *post
|
|
|_ i=indexed-post
|
|
++ grow
|
|
|%
|
|
++ noun i
|
|
++ notification-kind
|
|
?+ index.p.i ~
|
|
[@ ~] `[%link 0 %each %.y]
|
|
[@ @ %1 ~] `[%comment 1 %count %.n]
|
|
[@ @ @ ~] `[%edit-comment 1 %count %.n]
|
|
==
|
|
--
|
|
++ grab
|
|
|%
|
|
++ noun
|
|
|= p=*
|
|
=/ ip ;;(indexed-post p)
|
|
?+ index.p.ip ~|(index+index.p.ip !!)
|
|
:: top-level link post; title and url
|
|
::
|
|
[@ ~]
|
|
?> ?=([[%text @] [%url @] ~] contents.p.ip)
|
|
ip
|
|
::
|
|
:: comment on link post; container structure
|
|
::
|
|
[@ @ ~]
|
|
?> ?=(~ contents.p.ip)
|
|
ip
|
|
::
|
|
:: comment on link post; comment text
|
|
::
|
|
[@ @ @ ~]
|
|
?> ?=(^ contents.p.ip)
|
|
ip
|
|
==
|
|
--
|
|
++ grad %noun
|
|
--
|