Cleaner image code
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#end if
|
||||
<div class="media-heading">
|
||||
<div class="heading-name-row">
|
||||
<img class="avatar" src=${tweet.profile.getUserpic("_bigger").getSigUrl("pic")}>
|
||||
${genImg(tweet.profile.getUserpic("_bigger"), "avatar")}
|
||||
<div class="fullname-and-username">
|
||||
${linkUser(tweet.profile, class="fullname")}
|
||||
${linkUser(tweet.profile, class="username")}
|
||||
@@ -38,7 +38,7 @@
|
||||
<div class="quote-media-container">
|
||||
<div class="quote-media">
|
||||
#if quote.thumb.isSome():
|
||||
<img src=${quote.thumb.get().getSigUrl("pic")}>
|
||||
${genImg(quote.thumb.get())}
|
||||
#if quote.badge.isSome():
|
||||
<div class="quote-badge">
|
||||
<div class="quote-badge-text">${quote.badge.get()}</div>
|
||||
@@ -75,7 +75,7 @@
|
||||
##TODO: why doesn't this work?
|
||||
<a href=${getSigUrl(photo & "?name=orig", "pic")} target="_blank" class="image-attachment">
|
||||
<div class="still-image" style="${flex}">
|
||||
<img src=${getSigUrl(photo, "pic")} referrerpolicy="">
|
||||
${genImg(photo)}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -4,11 +4,9 @@
|
||||
#include "tweet.nimf"
|
||||
#
|
||||
#proc renderProfileCard*(profile: Profile): string =
|
||||
#let pic = profile.getUserpic().getSigUrl("pic")
|
||||
#let smallPic = profile.getUserpic("_200x200").getSigUrl("pic")
|
||||
<div class="profile-card">
|
||||
<a class="profile-card-avatar" href="${pic}">
|
||||
<img src="${smallPic}">
|
||||
<a class="profile-card-avatar" href="${profile.getUserPic().getSigUrl("pic")}">
|
||||
${genImg(profile.getUserpic("_200x200"))}
|
||||
</a>
|
||||
<div class="profile-card-tabs">
|
||||
<div class="profile-card-tabs-name">
|
||||
@@ -50,9 +48,7 @@
|
||||
<div style="${profile.banner}" class="profile-banner-color"></div>
|
||||
#else:
|
||||
#let url = getSigUrl(profile.banner, "pic")
|
||||
<a href="${url}">
|
||||
<img src="${url}">
|
||||
</a>
|
||||
<a href="${url}">${genImg(profile.banner)}</a>
|
||||
#end if
|
||||
#end proc
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user