Add account links to contributor profiles

This commit is contained in:
2019-07-11 15:33:17 +02:00
parent 0bbca079c5
commit d83d671580
14 changed files with 131 additions and 3 deletions
@@ -0,0 +1,16 @@
import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
tagName: "",
account: null,
iconComponentName: computed('account.site', function() {
if (this.account.site.match(/github|gitea|wiki/)) {
console.log('wtf');
return 'icon-account-' + this.account.site.replace(/\./g, '-');
} else {
return 'icon-web-globe';
}
})
});
@@ -0,0 +1,4 @@
<a href={{account.url}} target="_blank" rel="noopener" title="{{account.username}} on {{account.site}}">
<span class="site">{{account.site}}</span>
{{component iconComponentName}}
</a>