mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Support media tags
This commit is contained in:
parent
80acfbc40d
commit
80d6191e74
11 changed files with 52 additions and 14 deletions
|
|
@ -195,6 +195,15 @@ proc renderAttribution(profile: Profile): VNode =
|
|||
img(class="avatar", width="20", height="20", src=avatarUrl)
|
||||
strong: text profile.fullname
|
||||
|
||||
proc renderMediaTags(tags: seq[Profile]): VNode =
|
||||
buildHtml(tdiv(class="media-tag-block")):
|
||||
icon "user"
|
||||
for i, p in tags:
|
||||
a(class="media-tag", href=("/" & p.username), title=p.username):
|
||||
text p.fullname
|
||||
if i < tags.high:
|
||||
text ", "
|
||||
|
||||
proc renderQuoteMedia(quote: Quote): VNode =
|
||||
buildHtml(tdiv(class="quote-media-container")):
|
||||
if quote.thumb.len > 0:
|
||||
|
|
@ -286,6 +295,9 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class="";
|
|||
if mainTweet:
|
||||
p(class="tweet-published"): text getTweetTime(tweet)
|
||||
|
||||
if tweet.mediaTags.len > 0:
|
||||
renderMediaTags(tweet.mediaTags)
|
||||
|
||||
if not prefs.hideTweetStats:
|
||||
renderStats(tweet.stats, views)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue