Improved upload scripts
This commit is contained in:
@ -11,6 +11,12 @@ component AvatarNoLink(user *arn.User)
|
||||
else
|
||||
SVGAvatar(user)
|
||||
|
||||
component ProfileImage(user *arn.User)
|
||||
if user.HasAvatar()
|
||||
img.profile-image.lazy(data-src=user.LargeAvatar(), data-webp="true", alt="Profile image")
|
||||
else
|
||||
SVGProfileImage(user)
|
||||
|
||||
component SVGAvatar(user *arn.User)
|
||||
svg.user-image(viewBox="0 0 50 50")
|
||||
circle.head(cx="25", cy="19", r="10")
|
||||
@ -19,4 +25,9 @@ component SVGAvatar(user *arn.User)
|
||||
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]
|
||||
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")
|
Reference in New Issue
Block a user