fixed formatting and removed not needed padding
This commit is contained in:
parent
6dd64b02fc
commit
33dd55067b
2 changed files with 6 additions and 7 deletions
|
@ -174,9 +174,8 @@
|
||||||
|
|
||||||
.tweet-stat {
|
.tweet-stat {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-right: 8px;
|
|
||||||
min-width: 1em;
|
min-width: 1em;
|
||||||
margin-right: 0.2em;
|
margin-right: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.show-thread {
|
.show-thread {
|
||||||
|
|
|
@ -181,16 +181,16 @@ proc renderCard(card: Card; prefs: Prefs; path: string): VNode =
|
||||||
tdiv(class="card-content-container"):
|
tdiv(class="card-content-container"):
|
||||||
renderCardContent(card)
|
renderCardContent(card)
|
||||||
|
|
||||||
func condNumber(stat: int): string {.inline.} =
|
func formatStat(stat: int): string =
|
||||||
if stat > 0: insertSep($stat, ',')
|
if stat > 0: insertSep($stat, ',')
|
||||||
else: ""
|
else: ""
|
||||||
|
|
||||||
proc renderStats(stats: TweetStats; views: string): VNode =
|
proc renderStats(stats: TweetStats; views: string): VNode =
|
||||||
buildHtml(tdiv(class="tweet-stats")):
|
buildHtml(tdiv(class="tweet-stats")):
|
||||||
span(class="tweet-stat"): icon "comment", condNumber(stats.replies)
|
span(class="tweet-stat"): icon "comment", formatStat(stats.replies)
|
||||||
span(class="tweet-stat"): icon "retweet", condNumber(stats.retweets)
|
span(class="tweet-stat"): icon "retweet", formatStat(stats.retweets)
|
||||||
span(class="tweet-stat"): icon "quote" , condNumber(stats.quotes)
|
span(class="tweet-stat"): icon "quote", formatStat(stats.quotes)
|
||||||
span(class="tweet-stat"): icon "heart" , condNumber(stats.likes)
|
span(class="tweet-stat"): icon "heart", formatStat(stats.likes)
|
||||||
if views.len > 0:
|
if views.len > 0:
|
||||||
span(class="tweet-stat"): icon "play", insertSep(views, ',')
|
span(class="tweet-stat"): icon "play", insertSep(views, ',')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue