parent
dfce77ee98
commit
043f47b11a
|
@ -130,6 +130,9 @@ proc getTime*(tweet: Tweet): string =
|
||||||
proc getRfc822Time*(tweet: Tweet): string =
|
proc getRfc822Time*(tweet: Tweet): string =
|
||||||
tweet.time.format("ddd', 'd MMM yyyy HH:mm:ss 'GMT'")
|
tweet.time.format("ddd', 'd MMM yyyy HH:mm:ss 'GMT'")
|
||||||
|
|
||||||
|
proc getTweetTime*(tweet: Tweet): string =
|
||||||
|
tweet.time.format("h:mm tt' · 'MMM d', 'YYYY")
|
||||||
|
|
||||||
proc getLink*(tweet: Tweet | Quote): string =
|
proc getLink*(tweet: Tweet | Quote): string =
|
||||||
if tweet.id.len == 0: return
|
if tweet.id.len == 0: return
|
||||||
&"/{tweet.profile.username}/status/{tweet.id}"
|
&"/{tweet.profile.username}/status/{tweet.id}"
|
||||||
|
|
|
@ -69,6 +69,12 @@
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tweet-published {
|
||||||
|
margin: 0;
|
||||||
|
margin-top: 5px;
|
||||||
|
color: $grey;
|
||||||
|
}
|
||||||
|
|
||||||
.tweet-avatar {
|
.tweet-avatar {
|
||||||
display: contents !important;
|
display: contents !important;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,8 @@ proc renderConversation*(conversation: Conversation; prefs: Prefs; path: string)
|
||||||
|
|
||||||
tdiv(class="main-tweet"):
|
tdiv(class="main-tweet"):
|
||||||
let afterClass = if hasAfter: "thread thread-line" else: ""
|
let afterClass = if hasAfter: "thread thread-line" else: ""
|
||||||
renderTweet(conversation.tweet, prefs, path, class=afterClass)
|
renderTweet(conversation.tweet, prefs, path, class=afterClass,
|
||||||
|
mainTweet=true)
|
||||||
|
|
||||||
if hasAfter:
|
if hasAfter:
|
||||||
tdiv(class="after-tweet thread-line"):
|
tdiv(class="after-tweet thread-line"):
|
||||||
|
|
|
@ -222,7 +222,8 @@ proc renderQuote(quote: Quote; prefs: Prefs): VNode =
|
||||||
text "Show this thread"
|
text "Show this thread"
|
||||||
|
|
||||||
proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class="";
|
proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class="";
|
||||||
index=0; total=(-1); last=false; showThread=false): VNode =
|
index=0; total=(-1); last=false; showThread=false;
|
||||||
|
mainTweet=false): VNode =
|
||||||
var divClass = class
|
var divClass = class
|
||||||
if index == total or last:
|
if index == total or last:
|
||||||
divClass = "thread-last " & class
|
divClass = "thread-last " & class
|
||||||
|
@ -262,6 +263,9 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class="";
|
||||||
elif tweet.poll.isSome:
|
elif tweet.poll.isSome:
|
||||||
renderPoll(tweet.poll.get())
|
renderPoll(tweet.poll.get())
|
||||||
|
|
||||||
|
if mainTweet:
|
||||||
|
p(class="tweet-published"): text getTweetTime(tweet)
|
||||||
|
|
||||||
if not prefs.hideTweetStats:
|
if not prefs.hideTweetStats:
|
||||||
renderStats(tweet.stats, views)
|
renderStats(tweet.stats, views)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue