Improved caching of avatars

This commit is contained in:
2017-06-18 13:50:53 +02:00
parent bf1d87c33e
commit 137db5997f
3 changed files with 30 additions and 37 deletions

View File

@ -3,8 +3,8 @@ component Avatar(user *arn.User)
AvatarNoLink(user)
component AvatarNoLink(user *arn.User)
if user.Avatar != ""
img.user-image(src=user.Avatar + "/small", alt=user.Nick)
if user.HasAvatar()
img.user-image(src=user.SmallAvatar(), alt=user.Nick)
else
SVGAvatar

View File

@ -1,6 +1,6 @@
component ProfileImage(user *arn.User)
if user.Avatar != ""
img.profile-image(src=user.Avatar, alt="Profile image")
if user.HasAvatar()
img.profile-image(src=user.LargeAvatar(), alt="Profile image")
else
svg.profile-image(viewBox="0 0 50 50", alt="Profile image")
circle.head(cx="25", cy="19", r="10")