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.
36 lines
858 B
36 lines
858 B
-
|
|
var sizeMap = {
|
|
"xxsmall": "small",
|
|
"xsmall": "small",
|
|
"list-item": "small",
|
|
"navbar": "small",
|
|
"small": "small",
|
|
"medium": "large",
|
|
"large": "large",
|
|
"full": "full",
|
|
};
|
|
|
|
mixin renderProfileIcon (user, title, size = "small")
|
|
if user.coreUserId
|
|
img(
|
|
src=`http://${user.core.meta.domain}/core/user/${user.coreUserId}/picture?s=${sizeMap[size]}`,
|
|
class= "site-profile-picture",
|
|
class= `sb-${size}`,
|
|
title= title,
|
|
)
|
|
else
|
|
if user.picture && user.picture.small
|
|
img(
|
|
src= `/image/${user.picture[sizeMap[size]]._id}`,
|
|
class= "site-profile-picture",
|
|
class= `sb-${size}`,
|
|
title= title,
|
|
)
|
|
else
|
|
img(
|
|
src= "/img/default-member.png",
|
|
class= "site-profile-picture",
|
|
class= `sb-${size}`,
|
|
title= title,
|
|
)
|