41 lines
1.2 KiB
Plaintext
Raw Normal View History

2016-11-18 17:58:00 +00:00
component Avatar(user *arn.User)
2017-07-21 09:43:54 +00:00
CustomAvatar(user, user.Link(), user.Nick)
component CustomAvatar(user *arn.User, link string, title string)
2018-04-18 09:26:40 +00:00
a.user.tip(href=link, aria-label=title)
AvatarNoLink(user)
2018-07-01 02:52:28 +00:00
if user.IsPro()
.user-pro-icon
RawIcon("star")
component AvatarNoLink(user *arn.User)
2017-06-18 11:50:53 +00:00
if user.HasAvatar()
2018-03-05 16:49:24 +00:00
img.user-image.lazy(data-src=user.AvatarLink("small"), data-webp="true", alt=user.Nick)
else
2017-11-30 15:40:52 +00:00
SVGAvatar(user)
2018-04-18 09:31:55 +00:00
component AvatarNoTip(user *arn.User)
a.user(href=user.Link(), title=user.Nick)
AvatarNoLink(user)
2018-03-03 17:29:39 +00:00
component ProfileImage(user *arn.User)
if user.HasAvatar()
img.profile-image.lazy(data-src=user.AvatarLink("large"), data-webp="true", alt="Profile image", importance="high")
2018-03-03 17:29:39 +00:00
else
SVGProfileImage(user)
2017-11-30 15:40:52 +00:00
component SVGAvatar(user *arn.User)
2017-06-12 22:06:35 +00: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 15:40:52 +00:00
if len(user.Nick) <= 6
text.svg-nick(x="25", y="44", text-anchor="middle")= user.Nick
else
2018-03-03 17:29:39 +00:00
text.svg-nick(x="25", y="44", text-anchor="middle")= user.Nick[:6]
component SVGProfileImage(user *arn.User)
svg.profile-image(viewBox="0 0 50 50", alt="Profile image")
circle.head(cx="25", cy="19", r="10")
circle.body(cx="25", cy="50", r="20")