You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
499 B
17 lines
499 B
mixin renderProfilePicture (user, options)
|
|
-
|
|
var iconImageUrl = '/img/default-member.svg';
|
|
if (user?.picture?.large) {
|
|
iconImageUrl = `/image/${user.picture.large._id}`;
|
|
} else if (user?.picture?.small) {
|
|
iconImageUrl = `/image/${user.picture.small._id}`;
|
|
}
|
|
options = Object.assign({
|
|
title: user.displayName || user.username,
|
|
iconClass: 'sb-xxsmall',
|
|
}, options);
|
|
|
|
img(
|
|
src= iconImageUrl,
|
|
class= `profile-picture ${options.iconClass}`,
|
|
)
|