2019-09-20 23:08:30 +00:00
|
|
|
import strformat
|
|
|
|
import karax/[karaxdsl, vdom]
|
|
|
|
|
|
|
|
import renderutils
|
|
|
|
import ".."/[types]
|
|
|
|
|
|
|
|
proc renderListTabs*(query: Query; path: string): VNode =
|
|
|
|
buildHtml(ul(class="tab")):
|
|
|
|
li(class=query.getTabClass(posts)):
|
|
|
|
a(href=(path)): text "Tweets"
|
2019-10-08 11:45:47 +00:00
|
|
|
li(class=query.getTabClass(userList)):
|
2019-09-20 23:08:30 +00:00
|
|
|
a(href=(path & "/members")): text "Members"
|
|
|
|
|
|
|
|
proc renderList*(body: VNode; query: Query; name, list: string): VNode =
|
|
|
|
buildHtml(tdiv(class="timeline-container")):
|
|
|
|
tdiv(class="timeline-header"):
|
|
|
|
text &"\"{list}\" by @{name}"
|
|
|
|
|
|
|
|
renderListTabs(query, &"/{name}/lists/{list}")
|
|
|
|
body
|