Fix wrong tweet header text
This commit is contained in:
parent
9487d11fcb
commit
4660d23667
|
@ -4,10 +4,11 @@ import karax/[karaxdsl, vdom, vstyles]
|
||||||
import ../types, ../utils, ../formatters
|
import ../types, ../utils, ../formatters
|
||||||
import tweet, timeline, renderutils
|
import tweet, timeline, renderutils
|
||||||
|
|
||||||
proc renderStat(stat, text: string): VNode =
|
proc renderStat(num, class: string; text=""): VNode =
|
||||||
buildHtml(li(class=text)):
|
let t = if text.len > 0: text else: class
|
||||||
span(class="profile-stat-header"): text capitalizeAscii(text)
|
buildHtml(li(class=class)):
|
||||||
span(class="profile-stat-num"): text stat
|
span(class="profile-stat-header"): text capitalizeAscii(t)
|
||||||
|
span(class="profile-stat-num"): text num
|
||||||
|
|
||||||
proc renderProfileCard*(profile: Profile): VNode =
|
proc renderProfileCard*(profile: Profile): VNode =
|
||||||
buildHtml(tdiv(class="profile-card")):
|
buildHtml(tdiv(class="profile-card")):
|
||||||
|
@ -26,7 +27,7 @@ proc renderProfileCard*(profile: Profile): VNode =
|
||||||
|
|
||||||
tdiv(class="profile-card-extra-links"):
|
tdiv(class="profile-card-extra-links"):
|
||||||
ul(class="profile-statlist"):
|
ul(class="profile-statlist"):
|
||||||
renderStat(profile.tweets, "posts")
|
renderStat(profile.tweets, "posts", text="Tweets")
|
||||||
renderStat(profile.followers, "followers")
|
renderStat(profile.followers, "followers")
|
||||||
renderStat(profile.following, "following")
|
renderStat(profile.following, "following")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue