Skip to content

Commit 6dd37f2

Browse files
committed
Merge pull request #656 from LearningLocker/issue/avatar
Fixes avatar size and default.
2 parents 3f2c5d8 + 8cd1757 commit 6dd37f2

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

app/views/partials/statements/item.blade.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
$json = $statement;
66
77
if( isset($statement['actor']['mbox']) ){
8-
$avatar = \Locker\Helpers\Helpers::getGravatar( substr($statement['actor']['mbox'], 7), '20');
9-
}else{
10-
$avatar = 'http://placehold.it/20x20';
8+
$avatar_id = substr($statement['actor']['mbox'], 7);
9+
} else {
10+
$avatar_id = '[email protected]';
1111
}
1212
13+
$avatar = \Locker\Helpers\Helpers::getGravatar( $avatar_id, '20');
14+
1315
if( isset($statement['actor']['name']) && $statement['actor']['name'] != ''){
1416
$name = $statement['actor']['name'];
1517
}elseif(isset($statement['actor']['mbox']) && $statement['actor']['mbox'] != '' ){
@@ -83,7 +85,7 @@
8385
<span onclick="$('.state-{{ $statement['id'] }}').toggle();"><i class="icon icon-cog lightgrey pull-left"></i></span>
8486

8587
<span class="pull-left statement-avatar">
86-
<img src="{{ $avatar }}" alt='avatar' class="img-circle" />
88+
<img src="{{ $avatar }}" alt='avatar' class="img-circle avatar" />
8789
</span>
8890

8991
{{ $name }}

public/assets/css/app.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ table.break-words td, table.break-words th {
215215
word-wrap: break-word;
216216
}
217217

218+
.avatar {
219+
width: 20px;
220+
height: 20px;
221+
}
222+
218223
/* Bootstrap extensions (note: looks like we're not using LESS?)
219224
--------------------------------------------------------------*/
220225
@media(max-width: 480px){

0 commit comments

Comments
 (0)