mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-16 04:56:29 +00:00
20 lines
595 B
Nim
20 lines
595 B
Nim
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"
|
|
li(class=query.getTabClass(users)):
|
|
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
|