The DTP Sites web app development engine. https://digitaltelepresence.com/
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.
 
 
 
 

42 lines
1.5 KiB

mixin renderAuthorCredit (author)
div(uk-grid).uk-grid-small
.uk-width-auto
+renderProfileIcon(author)
.uk-width-expand
.uk-margin-small
div(uk-grid).uk-flex-middle
.uk-width-expand
- var userUrl = !!author.coreUserId ? `/user/core/${author._id}` : `/user/${author.username}`;
a(href= userUrl, title="View member profile")
.uk-text-bold(style="line-height: 1em;")= author.displayName || author.username
.uk-width-auto
.uk-text-small.uk-text-muted(style="line-height: 1em;")
if author.coreUserId
a(href=`${process.env.DTP_CORE_AUTH_SCHEME}://${author.core.meta.domain}/user/${author.coreUserId}`)= author.core.meta.name
if !Array.isArray(posts)
a(href= `/post/author/${author.username}`)= `View posts by author`
.uk-text-small= author.bio
mixin renderUserIcon (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,
)