mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 14:49:32 +00:00
parent
53edbbc4e9
commit
45f34c2da1
1 changed files with 15 additions and 5 deletions
|
|
@ -25,7 +25,7 @@
|
||||||
#end proc
|
#end proc
|
||||||
#
|
#
|
||||||
#proc getDescription(desc: string; cfg: Config): string =
|
#proc getDescription(desc: string; cfg: Config): string =
|
||||||
Twitter feed for: ${desc}. Generated by ${cfg.hostname}
|
Twitter feed for: ${desc}. Generated by ${getUrlPrefix(cfg)}
|
||||||
#end proc
|
#end proc
|
||||||
#
|
#
|
||||||
#proc getTweetsWithPinned(profile: Profile): seq[Tweets] =
|
#proc getTweetsWithPinned(profile: Profile): seq[Tweets] =
|
||||||
|
|
@ -51,10 +51,6 @@ Twitter feed for: ${desc}. Generated by ${cfg.hostname}
|
||||||
#let urlPrefix = getUrlPrefix(cfg)
|
#let urlPrefix = getUrlPrefix(cfg)
|
||||||
#let text = replaceUrls(tweet.text, defaultPrefs, absolute=urlPrefix)
|
#let text = replaceUrls(tweet.text, defaultPrefs, absolute=urlPrefix)
|
||||||
<p>${text.replace("\n", "<br>\n")}</p>
|
<p>${text.replace("\n", "<br>\n")}</p>
|
||||||
#if tweet.quote.isSome and get(tweet.quote).available:
|
|
||||||
# let quoteLink = getLink(get(tweet.quote))
|
|
||||||
<p><a href="${urlPrefix}${quoteLink}">${cfg.hostname}${quoteLink}</a></p>
|
|
||||||
#end if
|
|
||||||
#if tweet.photos.len > 0:
|
#if tweet.photos.len > 0:
|
||||||
# for photo in tweet.photos:
|
# for photo in tweet.photos:
|
||||||
<img src="${urlPrefix}${getPicUrl(photo)}" style="max-width:250px;" />
|
<img src="${urlPrefix}${getPicUrl(photo)}" style="max-width:250px;" />
|
||||||
|
|
@ -72,6 +68,20 @@ Twitter feed for: ${desc}. Generated by ${cfg.hostname}
|
||||||
<img src="${urlPrefix}${getPicUrl(card.image)}" style="max-width:250px;" />
|
<img src="${urlPrefix}${getPicUrl(card.image)}" style="max-width:250px;" />
|
||||||
# end if
|
# end if
|
||||||
#end if
|
#end if
|
||||||
|
#if tweet.quote.isSome and get(tweet.quote).available:
|
||||||
|
# let quoteTweet = get(tweet.quote)
|
||||||
|
# let quoteLink = urlPrefix & getLink(quoteTweet)
|
||||||
|
<hr/>
|
||||||
|
<blockquote>
|
||||||
|
<b>${quoteTweet.user.fullname} (@${quoteTweet.user.username})</b>
|
||||||
|
<p>
|
||||||
|
${renderRssTweet(quoteTweet, cfg)}
|
||||||
|
</p>
|
||||||
|
<footer>
|
||||||
|
— <cite><a href="${quoteLink}">${quoteLink}</a>
|
||||||
|
</footer>
|
||||||
|
</blockquote>
|
||||||
|
#end if
|
||||||
#end proc
|
#end proc
|
||||||
#
|
#
|
||||||
#proc renderRssTweets(tweets: seq[Tweets]; cfg: Config; userId=""): string =
|
#proc renderRssTweets(tweets: seq[Tweets]; cfg: Config; userId=""): string =
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue