mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 15:19:32 +00:00
Add list support
This commit is contained in:
parent
d1fbcef64d
commit
9e3138e51b
25 changed files with 224 additions and 39 deletions
20
src/views/list.nim
Normal file
20
src/views/list.nim
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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
|
||||
Loading…
Reference in a new issue