mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-29 04:04:02 +03:00
parent
bbdebcdff4
commit
a5a058d7da
23
mar/tree/comments.hoon
Normal file
23
mar/tree/comments.hoon
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/comments/tree/mar
|
||||||
|
::
|
||||||
|
/? 310
|
||||||
|
/+ react
|
||||||
|
!:
|
||||||
|
::::
|
||||||
|
::
|
||||||
|
|_ all/(list (pair time manx))
|
||||||
|
::
|
||||||
|
++ grow :: convert to
|
||||||
|
|%
|
||||||
|
++ json
|
||||||
|
:- %a
|
||||||
|
%+ turn
|
||||||
|
(sort all |=({a/* b/*} (lor b a)))
|
||||||
|
|= {a/time b/manx} ^- ^json
|
||||||
|
(jobe time+(jode a) body+(react-to-json:react b) ~)
|
||||||
|
--
|
||||||
|
++ grab |% :: convert from
|
||||||
|
++ noun (list {time manx}) :: clam from %noun
|
||||||
|
::++ elem |=(a=manx `_all`[[/ ((getall %h1) a)] ~ ~])
|
||||||
|
-- --
|
@ -9,17 +9,15 @@
|
|||||||
/= sect /&json&/tree-index/
|
/= sect /&json&/tree-index/
|
||||||
/= snip /&snip&elem&/tree-elem/
|
/= snip /&snip&elem&/tree-elem/
|
||||||
/= meta /&json&front&/|(/front/ /~[~])
|
/= meta /&json&front&/|(/front/ /~[~])
|
||||||
/= comt /^ (list (pair time manx))
|
/= comt /&json&/tree-comments/
|
||||||
/: /%/comments /@ /&elem&/md/
|
|
||||||
!:
|
!:
|
||||||
^- tree-include
|
^- tree-include
|
||||||
=+ rj=react-to-json:react
|
=+ rj=react-to-json:react
|
||||||
=+ cj=|=({a/time b/manx} (jobe time+(jode a) body+(rj b) ~))
|
|
||||||
:* mime
|
:* mime
|
||||||
(rj body)
|
(rj body)
|
||||||
(rj /h1 hed.snip) :: head
|
(rj /h1 hed.snip) :: head
|
||||||
(rj /div tal.snip) :: snip
|
(rj /div tal.snip) :: snip
|
||||||
meta
|
meta
|
||||||
sect
|
sect
|
||||||
[%a (turn (sort comt |=({a/* b/*} (lor b a))) cj)]
|
comt
|
||||||
==
|
==
|
||||||
|
9
ren/tree/comments.hoon
Normal file
9
ren/tree/comments.hoon
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/comments/tree/ren
|
||||||
|
::
|
||||||
|
/? 310
|
||||||
|
/: /%/comments /@ /&elem&/md/ :: XX descend horn
|
||||||
|
::
|
||||||
|
::::
|
||||||
|
::
|
||||||
|
`(list (pair time manx))`-.-
|
Loading…
Reference in New Issue
Block a user