summaryrefslogtreecommitdiff
path: root/desk/web/root.hoon
diff options
context:
space:
mode:
Diffstat (limited to 'desk/web/root.hoon')
-rw-r--r--desk/web/root.hoon91
1 files changed, 91 insertions, 0 deletions
diff --git a/desk/web/root.hoon b/desk/web/root.hoon
new file mode 100644
index 0000000..ceb6e19
--- /dev/null
+++ b/desk/web/root.hoon
@@ -0,0 +1,91 @@
+/- b=boke, tp=trill-post, c=tlon-channels
+/+ fetch-lib=fetch, sr=sortug
+/= chat-page /web/chat/chat
+|_ [s=state:b =bowl:gall]
++* fetch ~(. fetch-lib [s bowl])
+++ css ^~ %- trip
+'''
+section{
+ display: flex;
+ width: 100%;
+ & .a{
+ width: 50%;
+ }
+}
+h2{
+ padding-bottom: 0.2rem;
+ border-bottom: 1px solid black;
+ text-align: center;
+}
+.chat-author{
+ margin-right: 1ch;
+}
+.preview{
+ padding: 0 0.8rem;
+ text-align: left;
+}
+'''
+++ last-blog (thread-page-by-tags:fetch ~['blog'] [~ ~ 5] ~)
+++ last-board (thread-page-no-wall:fetch [~ ~ 5] (some |=(t=thread:tp !(~(has in tags.t) 'blog'))))
+++ last-chat
+ =/ pat /chat/(scot %p our.bowl)/chat/posts/newest/5/post
+ =/ scry ~(scry io:sr bowl)
+ =/ chat-posts (scry %channels pat paged-posts:c)
+ (tap:on-posts:c posts.chat-posts)
+++ last-feed
+:: TODO if gates show only spandrell4 posts
+%ok
+++ $
+=/ blog last-blog
+=/ board last-board
+=/ chat last-chat
+=/ feed last-feed
+;div.blog
+ ;style:"{css}"
+ ;div
+ ;h2: Now playing on Spandrell TV
+ ;a/"/tv":"Dune Week!"
+ ;p:"Dune (1984), Dune Part One (2021), Dune (2000 Mini Series), Children of dune (2003 Mini Series)"
+ ==
+ ;section
+ ;div.a.blog-activity
+ ;h2: Last on Blog
+ ;ul.preview
+ ;* %+ turn p.blog |= t=thread:tp
+ ;li
+ ;a/"{(trip (spat path.t))}":"{(trip title.t)}"
+ ==
+ ==
+ ==
+ ;div.a.board-activity
+ ;h2: Last on Board
+ ;ul.preview
+ ;* %+ turn p.board |= t=thread:tp
+ ;li
+ ;a/"{(trip (spat (weld /board path.t)))}":"{(trip title.t)}"
+ ==
+ ==
+ ==
+ ==
+ ;section
+ ;div.a.chat-activity
+ ;h2: Last on Chat
+ ;* %+ turn chat |= [time=@da up=(unit post:c)]
+ ?~ up ;span; =/ memo +<.u.up
+ =/ author ?: ?=(%pawn (clan:title author.memo)) "anon" (scow %p author.memo)
+ ;a/"/chat"
+ ;* %+ turn content.memo |= =verse:c
+ ?: ?=(%block -.verse) ;span;
+ ;div.preview.inline
+ ;span.chat-author:"{author}:"
+ ;* %+ turn p.verse tinline:chat-page
+ ==
+ ==
+ ==
+ ;div.a.feed-activity
+ ;h2: Last on Feed
+ ;a/"/feed":"Coming soon!"
+ ==
+ ==
+==
+--