hubl/src/page-channel-profile.pug

37 lines
868 B
Plaintext
Raw Normal View History

2018-09-28 19:20:15 +00:00
script.
document.addEventListener('WebComponentsReady', function(event) {
2018-09-28 22:48:46 +00:00
class HDAppMember extends SIBWidget {
get template() {
return `
<div name="${this.name}">
<img src="${this.value.avatar}"/>
</div>
`;
}
2018-09-28 19:20:15 +00:00
2018-09-28 22:48:46 +00:00
render() {
store.get(this.value).then( (value) => {
this._value = value;
this.innerHTML = this.template;
});
2018-09-28 19:20:15 +00:00
}
2018-09-28 22:48:46 +00:00
}
customElements.define("hdapp-member", HDAppMember);
2018-09-28 19:20:15 +00:00
});
#channel-profile(style='display: none')
sib-display(
data-fields='name, description, owner',
widget-owner='hdapp-member',
bind-resources=''
)
h2.section.skills Participants
sib-display(
id-suffix='members',
data-fields='avatar, user',
widget-avatar='sib-display-img',
widget-user='hdapp-userinfo',
bind-resources=''
)