Show ? if profile stat unavailable
This commit is contained in:
parent
60986ecc88
commit
88c1cd50a7
|
@ -8,7 +8,8 @@ proc renderStat(num, class: string; text=""): VNode =
|
||||||
let t = if text.len > 0: text else: class
|
let t = if text.len > 0: text else: class
|
||||||
buildHtml(li(class=class)):
|
buildHtml(li(class=class)):
|
||||||
span(class="profile-stat-header"): text capitalizeAscii(t)
|
span(class="profile-stat-header"): text capitalizeAscii(t)
|
||||||
span(class="profile-stat-num"): text num
|
span(class="profile-stat-num"):
|
||||||
|
text if num.len == 0: "?" else: num
|
||||||
|
|
||||||
proc renderProfileCard*(profile: Profile): VNode =
|
proc renderProfileCard*(profile: Profile): VNode =
|
||||||
buildHtml(tdiv(class="profile-card")):
|
buildHtml(tdiv(class="profile-card")):
|
||||||
|
|
Loading…
Reference in New Issue