parent
e4cbbf2fd5
commit
bd386b3acf
|
@ -97,7 +97,7 @@ proc showTimeline*(request: Request; query: Query; cfg: Config; prefs: Prefs;
|
||||||
|
|
||||||
let pHtml = renderProfile(p, t, r, prefs, getPath())
|
let pHtml = renderProfile(p, t, r, prefs, getPath())
|
||||||
result = renderMain(pHtml, request, cfg, prefs, pageTitle(p), pageDesc(p),
|
result = renderMain(pHtml, request, cfg, prefs, pageTitle(p), pageDesc(p),
|
||||||
rss=rss, images = @[p.getUserpic("_200x200")])
|
rss=rss, images = @[p.getUserpic("_400x400")])
|
||||||
|
|
||||||
template respTimeline*(timeline: typed) =
|
template respTimeline*(timeline: typed) =
|
||||||
let t = timeline
|
let t = timeline
|
||||||
|
|
|
@ -15,8 +15,11 @@ proc renderProfileCard*(profile: Profile; prefs: Prefs): VNode =
|
||||||
buildHtml(tdiv(class="profile-card")):
|
buildHtml(tdiv(class="profile-card")):
|
||||||
tdiv(class="profile-card-info"):
|
tdiv(class="profile-card-info"):
|
||||||
let url = getPicUrl(profile.getUserPic())
|
let url = getPicUrl(profile.getUserPic())
|
||||||
|
var size = "_400x400"
|
||||||
|
if prefs.autoplayGifs and profile.userpic.endsWith("gif"):
|
||||||
|
size = ""
|
||||||
a(class="profile-card-avatar", href=url, target="_blank"):
|
a(class="profile-card-avatar", href=url, target="_blank"):
|
||||||
genImg(profile.getUserpic("_400x400"))
|
genImg(profile.getUserpic(size))
|
||||||
|
|
||||||
tdiv(class="profile-card-tabs-name"):
|
tdiv(class="profile-card-tabs-name"):
|
||||||
linkUser(profile, class="profile-card-fullname")
|
linkUser(profile, class="profile-card-fullname")
|
||||||
|
|
|
@ -15,7 +15,7 @@ proc renderMiniAvatar(profile: Profile): VNode =
|
||||||
buildHtml():
|
buildHtml():
|
||||||
img(class="avatar mini", src=url)
|
img(class="avatar mini", src=url)
|
||||||
|
|
||||||
proc renderHeader(tweet: Tweet; retweet=""): VNode =
|
proc renderHeader(tweet: Tweet; retweet: string; prefs: Prefs): VNode =
|
||||||
buildHtml(tdiv):
|
buildHtml(tdiv):
|
||||||
if retweet.len > 0:
|
if retweet.len > 0:
|
||||||
tdiv(class="retweet-header"):
|
tdiv(class="retweet-header"):
|
||||||
|
@ -27,7 +27,10 @@ proc renderHeader(tweet: Tweet; retweet=""): VNode =
|
||||||
|
|
||||||
tdiv(class="tweet-header"):
|
tdiv(class="tweet-header"):
|
||||||
a(class="tweet-avatar", href=("/" & tweet.profile.username)):
|
a(class="tweet-avatar", href=("/" & tweet.profile.username)):
|
||||||
genImg(tweet.profile.getUserpic("_normal"), class="avatar")
|
var size = "_normal"
|
||||||
|
if not prefs.autoplayGifs and tweet.profile.userpic.endsWith("gif"):
|
||||||
|
size = "_400x400"
|
||||||
|
genImg(tweet.profile.getUserpic(size), class="avatar")
|
||||||
|
|
||||||
tdiv(class="tweet-name-row"):
|
tdiv(class="tweet-name-row"):
|
||||||
tdiv(class="fullname-and-username"):
|
tdiv(class="fullname-and-username"):
|
||||||
|
@ -290,7 +293,7 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class=""; index=0;
|
||||||
|
|
||||||
tdiv(class="tweet-body"):
|
tdiv(class="tweet-body"):
|
||||||
var views = ""
|
var views = ""
|
||||||
renderHeader(tweet, retweet)
|
renderHeader(tweet, retweet, prefs)
|
||||||
|
|
||||||
if not afterTweet and index == 0 and tweet.reply.len > 0 and
|
if not afterTweet and index == 0 and tweet.reply.len > 0 and
|
||||||
(tweet.reply.len > 1 or tweet.reply[0] != tweet.profile.username):
|
(tweet.reply.len > 1 or tweet.reply[0] != tweet.profile.username):
|
||||||
|
|
Loading…
Reference in New Issue