Improved user lists

This commit is contained in:
2017-11-30 16:40:52 +01:00
parent 4f4a6e7f13
commit 5284698e73
9 changed files with 187 additions and 16 deletions

View File

@ -9,10 +9,14 @@ component AvatarNoLink(user *arn.User)
if user.HasAvatar()
img.user-image.lazy(data-src=user.SmallAvatar(), data-webp="true", alt=user.Nick)
else
SVGAvatar
SVGAvatar(user)
component SVGAvatar
component SVGAvatar(user *arn.User)
svg.user-image(viewBox="0 0 50 50")
circle.head(cx="25", cy="19", r="10")
circle.body(cx="25", cy="50", r="20")
//- text(x="25", y="44", text-anchor="middle") TODO
if len(user.Nick) <= 6
text.svg-nick(x="25", y="44", text-anchor="middle")= user.Nick
else
text.svg-nick(x="25", y="44", text-anchor="middle")= user.Nick[:6]