use avatar url with mm fallback
This commit is contained in:
parent
065796bc76
commit
ab9697892f
|
@ -10,15 +10,13 @@ Controller = Ember.Controller.extend
|
|||
|
||||
avatarURL: (->
|
||||
if @get('model.avatar_url')
|
||||
"#{@get('model.avatar_url')}?s=128"
|
||||
"#{@get('model.avatar_url')}?s=125"
|
||||
else
|
||||
'https://secure.gravatar.com/avatar/?d=mm&s=128'
|
||||
'https://secure.gravatar.com/avatar/?d=mm&s=125'
|
||||
).property()
|
||||
|
||||
owner: (->
|
||||
data = @get('model')
|
||||
console.log(data)
|
||||
|
||||
{
|
||||
login: data.login
|
||||
name: data.name
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<header class="owner-header row">
|
||||
<section class="columns small-10 medium-6">
|
||||
<div class="owner-avatar">
|
||||
<img {{bind-attr src="owner.avatarUrl"}} alt="" width="125" height="125">
|
||||
<img {{bind-attr src="avatarURL"}} alt="" width="125" height="125">
|
||||
</div>
|
||||
<div class="owner-info">
|
||||
<h1 class="owner-title">{{owner.name}}</h1>
|
||||
|
|
Loading…
Reference in New Issue
Block a user