22 lines
693 B
Plaintext
Raw Normal View History

2016-11-19 02:58:00 +09:00
component Avatar(user *arn.User)
2017-07-21 11:43:54 +02:00
CustomAvatar(user, user.Link(), user.Nick)
component CustomAvatar(user *arn.User, link string, title string)
a.user.ajax(href=link, title=title)
AvatarNoLink(user)
component AvatarNoLink(user *arn.User)
2017-06-18 13:50:53 +02:00
if user.HasAvatar()
2017-07-18 00:04:43 +02:00
img.user-image.lazy(data-src=user.SmallAvatar(), data-webp="true", alt=user.Nick)
else
2017-11-30 16:40:52 +01:00
SVGAvatar(user)
2017-11-30 16:40:52 +01:00
component SVGAvatar(user *arn.User)
2017-06-13 00:06:35 +02:00
svg.user-image(viewBox="0 0 50 50")
circle.head(cx="25", cy="19", r="10")
circle.body(cx="25", cy="50", r="20")
2017-11-30 16:40:52 +01:00
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]