summaryrefslogtreecommitdiff
path: root/desk/web/components/sidebar.hoon
blob: f0fa536e934878aab56b4b3d60834bf8029885c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/-  tp=trill-post
/+  *sortug
=<  html
|%
++  css  ^~  %-  trip
'''
#sidebar{
  width: 25%;
}
'''
++  recent-comments
:: =/  comments  ;;  (list [c=post:tp p=post:tp])  (retrieve /recent-comments bowl)
;section#recent-comments
  ;h6.widget-title:"Recent Comments"
  :: ;ul
    :: ;*  %+  turn  comments  |=  [c=post:tp p=post:tp]  ^-  manx
    ::      =/  author  ""
    ::      =/  excerpt  ""
    ::     ;li
    ::       ;span.comment-author-link:"{author}"
    ::       ;span:"on"
    ::       ;a/"{path.p}":"{(trip title.p)}"
    ::       ;span.excerpt:"{excerpt}"
    ::     ==
  :: ==
==
++  html
  ;div#sidebar
  ;style:"{css}"
    ;div#searchbox
      ;input(type "text");
    :: bestposts
    :: recentposts
      ;+  recent-comments
    :: archivedropdown
    ==
  ==
--