feat: added homepage feed showing followed accounts
This commit is contained in:
@@ -50,6 +50,21 @@ proc renderTweetSearch*(results: Timeline; prefs: Prefs; path: string;
|
||||
|
||||
renderTimelineTweets(results, prefs, path, pinned)
|
||||
|
||||
proc renderHomepageTabs*(query: Query): VNode =
|
||||
buildHtml(ul(class="tab")):
|
||||
li(class=if query.kind == tweets: "tab-item active" else: "tab-item"):
|
||||
a(href="/?f=tweets"): text "Tweets"
|
||||
|
||||
li(class=if query.kind == replies: "tab-item active" else: "tab-item"):
|
||||
a(href="/?f=replies"): text "Tweets & Replies"
|
||||
|
||||
proc renderHomepageTimeline*(results: Timeline; prefs: Prefs; path: string): VNode =
|
||||
let query = results.query
|
||||
buildHtml(tdiv(class="timeline-container")):
|
||||
renderHomepageTabs(query)
|
||||
|
||||
renderTimelineTweets(results, prefs, path)
|
||||
|
||||
proc renderUserSearch*(results: Result[User]; prefs: Prefs; path: string): VNode =
|
||||
buildHtml(tdiv(class="timeline-container")):
|
||||
renderSearchTabs(results.query)
|
||||
|
||||
Reference in New Issue
Block a user