cleanup stats
This commit is contained in:
parent
1b8275d1b8
commit
e96606eba3
@ -195,16 +195,14 @@ func formatStat(stat: int): string =
|
|||||||
|
|
||||||
proc renderStats(stats: TweetStats; tweet: Tweet): VNode =
|
proc renderStats(stats: TweetStats; tweet: Tweet): VNode =
|
||||||
buildHtml(tdiv(class="tweet-stats")):
|
buildHtml(tdiv(class="tweet-stats")):
|
||||||
a():
|
span(class="tweet-stat", title="Replies", "aria-label"="Replies"): icon "comment", formatStat(stats.replies)
|
||||||
span(class="tweet-stat"): icon "comment", formatStat(stats.replies)
|
span(class="tweet-stat", title="Reposts", "aria-label"="Reposts"): icon "retweet", formatStat(stats.retweets)
|
||||||
a():
|
a(href="/search?q=quoted_tweet_id:" & $tweet.id, title="Quotes", "aria-label"="Quotes"):
|
||||||
span(class="tweet-stat"): icon "retweet", formatStat(stats.retweets)
|
|
||||||
a(href="/search?q=quoted_tweet_id:" & $tweet.id):
|
|
||||||
span(class="tweet-stat"): icon "quote", formatStat(stats.quotes)
|
span(class="tweet-stat"): icon "quote", formatStat(stats.quotes)
|
||||||
a(): span(class="tweet-stat"): icon "heart", formatStat(stats.likes)
|
span(class="tweet-stat", title="Likes", "aria-label"="Likes"): icon "heart", formatStat(stats.likes)
|
||||||
a(): span(class="tweet-stat"): icon "bookmark", formatStat(stats.bookmarks)
|
span(class="tweet-stat", title="Bookmarks", "aria-label"="Bookmarks"): icon "bookmark", formatStat(stats.bookmarks)
|
||||||
if stats.views > -1:
|
if stats.views > -1:
|
||||||
a(): span(class="tweet-stat"): icon "eye", formatStat(stats.views)
|
span(class="tweet-stat", title="Views", "aria-label"="Views"): icon "eye", formatStat(stats.views)
|
||||||
|
|
||||||
proc renderReply(tweet: Tweet): VNode =
|
proc renderReply(tweet: Tweet): VNode =
|
||||||
buildHtml(tdiv(class="replying-to")):
|
buildHtml(tdiv(class="replying-to")):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user