mirror of
https://github.com/wekan/wekan.git
synced 2026-02-20 06:58:07 +01:00
We use a embedded svg to scale the initials text to its container size. The user is free to overwrite its initials in the profile form.
56 lines
1.7 KiB
Text
56 lines
1.7 KiB
Text
template(name="userAvatar")
|
|
a.member.js-member(title="{{userData.profile.fullname}} ({{userData.username}})")
|
|
if userData.profile.avatarUrl
|
|
img.avatar.avatar-image(src=userData.profile.avatarUrl)
|
|
else
|
|
+userAvatarInitials(userId=userData._id)
|
|
|
|
if showStatus
|
|
span.member-presence-status(class=presenceStatusClassName)
|
|
span.member-type(class=memberType)
|
|
|
|
template(name="userAvatarInitials")
|
|
svg.avatar.avatar-initials(viewBox="0 0 {{viewPortWidth}} 15")
|
|
text(x="0" y="13")= initials
|
|
|
|
template(name="userPopup")
|
|
.board-member-menu
|
|
.mini-profile-info
|
|
+userAvatar(userId=user._id)
|
|
.info
|
|
h3.bottom
|
|
a.js-profile(href="{{pathFor route='Profile' username=user.username}}")= user.profile.name
|
|
p.quiet.bottom @{{ user.username }}
|
|
|
|
template(name="memberName")
|
|
a.js-show-mem-menu(href="{{pathFor route='Profile' username=user.username}}")
|
|
= user.profile.fullname
|
|
if username
|
|
| ({{ user.username }})
|
|
|
|
template(name="changeAvatarPopup")
|
|
ul.pop-over-list
|
|
each uploadedAvatars
|
|
li: a.js-select-avatar
|
|
.member
|
|
img.avatar.avatar-image(src="{{url avatarUrlOptions}}")
|
|
| Uploaded avatar
|
|
if isSelected
|
|
i.fa.fa-check
|
|
p.sub-name
|
|
unless isSelected
|
|
a.js-delete-avatar
|
|
| Delete
|
|
| -
|
|
= original.name
|
|
li: a.js-select-initials
|
|
.member
|
|
+userAvatarInitials(userId=currentUser._id)
|
|
| Initials
|
|
if noAvatarUrl
|
|
i.fa.fa-check
|
|
p.sub-name Default avatar
|
|
input.hide.js-upload-avatar-input(accept="image/*;capture=camera" type="file")
|
|
button.full.js-upload-avatar
|
|
i.fa.fa-upload
|
|
| Upload an avatar
|